Results 1 to 9 of 9

Thread: nvidia driver select in grub2

Threaded View

  1. #1
    Join Date
    Mar 2007
    Beans
    162
    Distro
    Ubuntu Studio 11.04 Natty Narwhal

    nvidia driver select in grub2

    Nvidiadriver 173.14... for my geforce 5200fx works in generic kernel but not in -rt. Also there are experiences that proprietary-drivers in realtime kernels impair performance and latencies.
    So I asked aunt Google for help and found this:
    wiki.ubuntuusers.de/Treiber_per_Grub_wählen
    It's written in my native language and for legacy grub, so I had to use my own brain a little.
    Here is the switch:
    altoptions I had to ignore cause there is no such option in new /etc/default/grub
    But elsewhere I followed this wiki - tx to the author:
    As root I copied /etc/X11/xorg.conf to /etc/X11/xorg.conf.nv and /etc/X11/xorg.conf.nvidia and edited them for the suitable drivers.

    /proc/cmdline is created by grub at boot-time and contents the optional commands to be run at start time.

    As root I created /etc/init.d/DriverSelect.sh
    for the following script:

    Code:
    #!/bin/sh
    if grep -q nvdriver /proc/cmdline
    then
            cp -lf /etc/X11/xorg.conf.nv /etc/X11/xorg.conf
    else
            cp -lf /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
    fi
    made it executable
    and run

    Code:
    sudo update-rc.d DriverSelect.sh defaults 10
    to make it run at start up

    I remembered there was a file in /etc/grub.d named 40_custom:

    As root I opened /boot/grub/grub.conf and copied menuentry of 2.6.31-6-rt into this 40_custom
    and added (nv) to title and nvdriver to boot line,
    so looks my new 40_custom like:

    Code:
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    menuentry "Ubuntu, Linux 2.6.31-6-rt (nv)" {
            recordfail=1
            save_env recordfail
    	set quiet=1
    	insmod ext2
    	set root=(hd0,4)
    	search --no-floppy --fs-uuid --set 0f2825f0-1aee-45ef-a7d6-85d2d8227c3e
    	linux	/boot/vmlinuz-2.6.31-6-rt root=UUID=0f2825f0-1aee-45ef-a7d6-85d2d8227c3e ro   nvdriver
    	initrd	/boot/initrd.img-2.6.31-6-rt
    }
    Now
    Code:
    sudo update-grub
    reboot and select the entry with (nv), it's at the end of the list.
    If you select an other entry it will start with proprietary nvidia driver (as long as it's properly installed)
    Last edited by bluesscream; October 11th, 2009 at 12:55 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •