If you only use this method for automatically selecting the fitting graphicdriver at booting -generic xor -rt kernels, editing /etc/grub.d/40_custom is not needed.
Let system read out /proc/version instead of /cmdline. Just edit (create if you didn't before)
/etc/init.d/DriverSelect.sh
as follows:
Code:
#!/bin/sh
if grep -q -e -rt /proc/version
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
If you not have done this before
make sure it's executable
Code:
sudo chmod +x DriverSelect.sh
, and
Code:
sudo update-rc.d DriverSelect.sh defaults 10
You can restore original /etc/grub.d/40_custom, remove it's x-flag
Code:
sudo chmod -x /etc/grub.d/40_custom
and again .
Make sure Section "Device" in /etc/X11/xorg.conf.nv
Code:
Section "Device"
Identifier "Device0"
Driver "nv"
VendorName "NVIDIA Corporation"
EndSection
and in
/etc/X11/xorg.conf.nvidia
Code:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
are edited for the suitable drivers
Now for me on selection of each -rt kernel ubuntu starts with driver "nv" and on a -generic with "nvidia"
Bookmarks