# Ubuntu – Ubuntu stops using Nvidia driver after kernel upgrade

displaydriverskernelmonitornvidia

Just updated and restarted, Ubuntu's doesn't display correctly. After restart, the desktop now looks like this. I've temporarily switched to the Nouveau driver.

The update history reveals the kernel was updated, amongst many things; and the following were installed:

linux-image-3.5.0-19-generic (3.5.0-19.30)
linux-image-extra-3.5.0-19-generic (3.5.0-19.30)


I've encountered this type of problem quite recently, so I decided to reapply the same steps, to solve the problem, as follows:

sudo  apt-get install linux-headers-3.5.0-19
sudo  depmod -a
sudo  modprobe nvidia
sudo  /etc/init.d/*dm restart


When installing linux-headers-3.5.0-19-generic, I get an error, message from terminal as follows:

Setting up linux-headers-3.5.0-19-generic (3.5.0-19.30) ...
Error! Problems with depmod detected.  Automatically uninstalling this module.
DKMS: Install Failed (depmod problems).  Module rolled back to built state.


However, I ignored the above error and continued the steps with sudo depmod -a, re-installed nvidia-current(because it was removed when activating Nouveau driver), then did sudo modprobe nvidia, which yielded the following error:

FATAL: Error inserting nvidia_current (/lib/modules/3.5.0-19-generic/updates/dkms/nvidia_current.ko): No such device


Update: Upon restart, the Nvidia driver now works! BTW, do those error messages imply I broke something; am I on the right track? Just curious, cause I don't want to get happy I've fixed it, then it stops working later on.

Finally, how can I prevent this from happening in future?

The system is Dell XPS-L702X, with NVIDIA GeForce GT 555M, and 17" screen.