How to Install Nvidia Drivers in Ubuntu with Upgraded Kernel

With each upgrade to kernel, some proprietary drivers need to be reintegrated. However, the built-in process is sometimes broken and leaves blank screen, rendering the system useless.

Here I will show you steps to correctly install the latest Nvidia display drivers on Ubuntu 12.04 after kernel upgrade. At the time of writing, I upgraded my system from kernel 3.2.0 to 3.5.0. Before we can install the drivers, it is necessary to have the headers for the new kernel installed.

Install new kernel headers for your new kernel, if not already done, by entering the following command:

sudo apt-get install linux-headers-`uname -r`

Reboot the machine. At the login screen, do NOT login just yet, instead go to the alternate (text-only) console by pressing Ctrl+Alt+F1.

Log in using your normal account, and bring up the root prompt by typing:

sudo su

Now install the drivers.

apt-get install nvidia-current-updates

Many people (including me) were excited when they see the installation finished following the apt-get command and reboot straight away. The next thing they notice is a black/low resolution desktop mode and the driver does not seem to work. The problem is, after installation is done we need to initialise the correct settings before rebooting: