Ubuntu – How to update the nvidia modules after updating the kernel

driverskernelmodulesnvidia

Every time there's a kernel update, nvidia graphics drivers stops working because there's not a valid kernel module.

What is the ubuntu way to 'recompile' the nvidia module for the new kernel?

Shouldn't it be done automatically? I am suffering a bug?

Best Answer

If you have installed the NVIDIA driver as an ubuntu package, it should be updated automatically after each kernel upgrade.

You can install the packaged driver using the Additional Drivers tool in the dashboard, or installing the package nvidia-current.

If you have installed the nvidia driver directly from their website it is probably sensible to remove it before installing this package - I'm not certain how good it will be at detecting the conflict.

If you have installed the package from the ubuntu repositories, you can try reconfiguring it with dpkg-reconfigure but I suspect building the nvidia module is triggered by installing a new kernel, and I'm not sure how to trigger this otherwise. The traditional uninstall and re-install might well work (sudo apt-get remove nvidia-current; sudo apt-get install nvidia-current).