Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

4 Answers 4

up vote 2 down vote accepted

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).

share|improve this answer
    
I installed the nvidia driver through an Ubuntu package. But updating the kernel didnt trigger the recompilation of my nvidia module. Thanks for your tips anyway. –  fazineroso Aug 9 '12 at 12:04

Please note that neither installing a kernel upgrade nor drivers from officially unsupported repositories is recommended! Follow these instructions at your own risk and only if you know what you're doing!

If you installed an kernel that's ahead of current official Ubuntu repositories (e.g. kernel 3.4 or 3.5) you might not succeed with simply reinstalling nvidia drivers.

The only way I found so far to get nvidia-drivers to work again is by adding the following ppa to your repositories. In a terminal type:

sudo add-apt-repository ppa:xorg-edgers/ppa

After that, do a sudo apt-get update and sudo apt-get install nvidia-current.

That should do the trick. If not, run an additional sudo apt-get upgrade.

share|improve this answer

If you want to rebuild the kernel modules only, then you might just want to execute

sudo apt-get install --reinstall nvidia-current

if you have nvidia-current installed, or if you have nvidia-331 installed then this should do the work:

sudo apt-get install --reinstall nvidia-331

no need to add a repo or install new software :-)

share|improve this answer
1  
I spend most of my time in sudo shell so forgot to mention it, thanks for reminding :-) –  Steel Brain Aug 17 at 22:05

For me dpkg-reconfigure rebuilds the Nvidia driver with the latest kernel. This then requires a reboot to take effect. I use the older nvidia-304-updates. However, I do want to automate this so it happens automatically after a kernel update / install.

sudo dpkg-reconfigure nvidia-304-updates
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.