For the test I took one of the latest Nvidia drivers released by official Nvidia, the driver version 304.119 and tested it on Ubuntu 12.04.4 LTS 32bit
Download the driver from Nvidia official Source.
it'll be named something like nvidia-304.119.run for example.
before going to do anything backup your current nvidia configuration simply run:
it'll automatically backup your current configuration and create a new config file.
next login to tty terminal (Ctrl+Alt+F1) and remove and purge your current configuration doing next commands:
sudo /etc/init.d/lightdm stop
(or whatever display manager installed on your system xdm for Xubuntu kdm for Kubuntu for example)
sudo apt-get install build-essential linux-headers-`uname -r`
or find the right ones for your platform with command
uname -r for example:
sudo apt-get install build-essential linux-headers-`3.8.0-36-generic`
(if it says already the latest installed or something like that go next)
Disable conflicting software (recommended!) to avoid any problems during installation. Open or create the /etc/default/linux-restricted-modules-common file with an editor, in Ubuntu use:
gksudo gedit /etc/default/linux-restricted-modules-common
and paste or replace a line:
Done! Next remove what is installed:
sudo apt-get remove --purge nvidia-*
(removes nvidia-common for some might need to
sudo apt-get install ubuntu-desktop to bring it back manually, wasn't necessary for me)
sudo rm /etc/X11/xorg.conf
(removes xorg configuration)
sudo apt-get remove --purge xserver-xorg-video-nouveau
(WARNING! removes open-source video driver from the system! the step is optional, I did this to prevent all conflicts with Nvidia do this at your own risk or leave it alone if you you're not sure)
Next when all is done, let's install the driver navigate to your location where's driver at, for example:
and make it executable and run:
sudo chmod +x nvidia-304.119.run
(don't forget to install as a root otherwise it won't continue)
ok (commonly) during installation pop ups and at the end of installation wizard you'll be asked if you want Nvidia to configure and activate driver for you? Click
Now you have to bring back the Display Manager:
sudo /etc/init.d/lightdm start
sudo lightdm start
When logged in do not run
sudo nvidia-xconfig as it's already been configured just run
The driver works basically on all Nvidia video cards including old ones.
If for any reason after reboot you are not able to login or get stuck during boot make sure you followed all the steps if you did and still got problems login to
Recovery Mode press and hold Shift enter
Recovery Mode and start
Failsafe boot for some reason your xorg.conf maybe named differently even when you run
sudo nvidia-xconfig it names itself for example
XF86Config it's actually good working configuration and if needed you can just simply rename it:
sudo /etc/init.d/lightdm stop (just to be sure)
sudo mv /etc/X11/XF86Config /etc/X11/xorg.conf
sudo dpkg-reconfigure xserver-xorg
sudo /etc/init.d/lightdm start
now you should be at the login screen, enter your initials and when logged in run:
gksudo nvidia-settings (just to be sure)
it didn't work!
When trying to start X, if you get an error about nvidiactl (you will need to see the X log), try the following:
sudo update-rc.d -f nvidia-kernel remove
If you want to go back to the Restricted Manager method after performing the above instructions, do this
sudo update-rc.d nvidia-kernel defaults
If the installer fails, go through the following checklist
Was Xorg already properly configured for the nv driver?
Did you disable the loading of Ubuntu provided NVIDIA drivers using
DISABLED_MODULES="nv nvidia_new" in
/etc/default/linux-restricted-modules-common? This is a common cause of driver mismatch errors on manual installations due to conflicts with the Ubuntu provided NVIDIA binary driver.
You may need to remove the file
Did you remove the
Did you read the log found in
/var/log/nvidia-installer-log for errors that can guide you?
Did you check the output of
Did you install the kernel headers (and possibly source package)?
Did you check the NVIDIA readme found on their site to make sure your card is supported with that version of driver?