nVidia driver reset after each kernel update
I am using the official nVidia driver because my card (GeForce 750 Ti) isn't yet supported by the Ubuntu one. Every time the kernel updates, my system breaks.
I've formatted my system two-three times because of kernel updates and today I decided to try to fix it. I tried to fix it with this method and surprisingly it works.
Switch to console (After waiting for the nVidia driver to crash, as it does when you switch consoles :p)
-
Run a complete uninstall
sudo ./<DRIVER>.run -uninstall
Reboot and switch to the on-board card
-
Update
sudo apt-get update sudo apt-get dist-upgrade
Reboot again
-
Reinstall driver
sudo ./<DRIVER>.run
Reboot and switch back to the NVIDIA GPU
Is there a better/easier/faster way to update without going through all this?
-
After 1st boot failure and switching to console (Ctrl+Alt+F1 or any to F6).
-
Build driver modules for the current kernel (which just installed)
sudo sh ./<DRIVER>.run -K
-
Reboot:
sudo reboot
No need to reboot multiple times and switch adapters.
Reference: Ubuntu Wiki: Nvidia Manual - Kernel and Mesa Updates
-
-
To be complete, For driver release >=304 it is possible to register its module to DKMS. DKMS will take care of building it for each newly installed kernel.
-
Install DKMS (For some reasons, it may not be installed already)
sudo apt-get install dkms
-
Reinstall nVidia driver with DKMS option.
sudo sh ./<DRIVER>.run --dkms
After this, it should be no need to redo the steps above any more. A way to verify/check after new kernel install:
dkms status
References:
- Registering the NVIDIA Kernel Module with DKMS
sh ./<DRIVER>.run --advanced-options
-