Ubuntu – nVidia driver reset after each kernel update

driverskernelnvidiaupdates

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.

  1. Switch to console (After waiting for the nVidia driver to crash, as it does when you switch consoles :p)

  2. Run a complete uninstall

    sudo ./<DRIVER>.run -uninstall
    
  3. Reboot and switch to the on-board card

  4. Update

    sudo apt-get update
    sudo apt-get dist-upgrade
    
  5. Reboot again

  6. Reinstall driver

    sudo ./<DRIVER>.run
    
  7. Reboot and switch back to the NVIDIA GPU

Is there a better/easier/faster way to update without going through all this?

Best Answer

  • After 1st boot failure and switching to console (Ctrl+Alt+F1 or any to F6).

    1. Build driver modules for the current kernel (which just installed)

      sudo sh ./<DRIVER>.run -K
      
    2. 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.

    1. Install DKMS (For some reasons, it may not be installed already)

      sudo apt-get install dkms
      
    2. 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: