You will need to boot into recovery mode, then issue
apt-get remove --purge nvidia-current on the root terminal, followed by
apt-get install nvidia-current - to rebuild the nvidia driver for the new kernel. I had this problem as well when I upgraded.
Please do not install the drivers from nVidia's website btw! You could cause serious trouble if you then try to install the recommended driver later without cleanly removing the previous one.
You will need to run these commands from a terminal. I cannot guarantee a perfect result, since I am going based on what I've found via the internet and from memory.
The problem you are getting is caused by having differing user mode components and kernel modules. To fix it, the nvidia kernel module has to be rebuilt. This is supposed to happen on reboot, but it often does not.
First you need to install the linux kernel headers:
sudo apt-get install linux-headers-generic
Then you will need to run dkms to remove the old nvidia kernel module:
sudo apt-get install nvidia-current
- this should make it install correctly, so all you need to do is run
sudo nvidia-xconfig and reboot.
- If you still get an error about the module version, run:
sudo dkms build nvidia
This should solve the problem.
Sorry if things are a little confusing, I tried to put back together the process I had to use to the best of my memory :)! If you run into problems don't hesitate to let me know (and if anyone spots any problems with the instructions please let me know ASAP)!!!!
I found another possible cause. Nouveau might not have been blacklisted, and nvidia-current may not have placed itself in the .conf file that is used to choose your display driver. Here is how to fix it:
Before you continue, ensure that you have the nvidia-current driver from the repositories. Downloading the driver from nvidia's website can cause problems later, as it does not use the debian package format and leaves things behind that can conflict with later installations. So make sure you clear any traces of it first, and then install the standard driver from the Ubuntu repos. If you do not, you will get a driver mismatch, and this fix will be pointless.
- If you are stuck on the console, log in and install the nouveau X.org driver:
sudo apt-get install xserver-xorg-video-nouveau
- Restart your computer (you will have working graphics, yay! But this is temporary).
- Open gedit as root:
- From gedit open
- Add this line at the bottom:
- Save the file, and open
- Add these lines:
alias nvidia nvidia-current
- Now save this file, and close gedit.
- and then:
sudo apt-get remove xserver-xorg-video-nouveau,
- followed by:
sudo shutdown -r now.
- When your system restarts, you should have working nvidia drivers.
By the way, this problem of not blacklisting nouveau seems to exist in the newer drivers (nvidia-current), so I would suggest after fixing the problem, that you wait for an update on this bug (I am going to report the bug soon).
If you did install the NVIDIA drivers from their web site, then you must boot into a text terminal, (hold at boot to see grub menu and select 'recovery' mode of the kernel version that last worked with the NVIDIA drivers, and select the command line as root option)
Then run the original NVIDIA install shell script you ran to install the NVIDIA drivers from their website. e.g.
sudo ./NVIDIA-Linux-x86-290.10.run --uninstall. (Your version may differ.)
You won't need to run the "sudo dkms remove nvidia" command, as this doesn't apply for your case.