Monday, June 30, 2008

HowTo install NVIDIA Drivers on Ubuntu Hardy x64

Ok i have faced lot of problems while installing the Nvidia drivers for my 9600GT graphics card on my Quad Core 2.4Ghz machine. Tried a couple of things , it worked once but next time it didn't, anyways so i decided to write a howto for installing Nvidia drivers keeping 9600GT in mind. I am posting two solutions, however the second one worked only once and it didn't really work when i reinstalled my system with Ubuntu 8.04(previous was Kubuntu 8.04). so here it is:

Solution #1:
The Simplest way is to install 'Envyng' (for x64) which is a GUI based(text mode also available) Nvidia and ATI Drivers installer. To install Envyng download the following packages

envyng-gtk -> Ubuntu
envyng-qt -> for Kubuntu

there are two ways to install packages in Ubuntu(for those of you who are new to ubuntu)
a)goto Administration->Synaptic Package Manager(for Gnome)
search for 'envyng-gtk' .right click->mark for installation and click on apply

b) open terminal and type 'sudo apt-get install envyng-gtk' and press Enter. It will ask for your password and it will start downloading.

c )Launch EnvyNG's GUI (inside a Desktop Environment such as GNOME,KDE, etc.) by selecting it in the "Applications/System Tools" menu OR if you need to use EnvyNG's textual interface you will have to type:

'sudo envyng -t'

d) Once you open Envy's User Interface its pretty much straight forward from there :)

e) Envy will ask you to Reboot the computer after its finished installing. Reboot and see the changes in affect.


Solution #2:
OK now this method works for most Cards(at least till 8800GT) reliably and it worked for me ONCE for my 9600GT. Anyhow here is what you need to do:

a) Go to Nvidia website and download the drivers for your Graphics Card and your OS(x86 or x64). you will have a file like this '
NVIDIA-Linux-x86_64-173.14.09-pkg2.run'. Save it anywhere you would like (preferably your /home directory).

b) now before you go ahead and install the drivers it is important that you have the following packages:
In the terminal run the following command-> 'sudo apt-get install build-essential ia32-libs linux-headers-`uname -r`

c) Here comes the INSTALLATION steps, once you have the above packages installed and the Nvidia Drivers
follow these steps:
  1. Log out and log back in but instead choose console log in from the login options. This will take you directly to the terminal log in prompt.
  2. Backup your X configuration file(Display configuration ) 'sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup'
  3. Go to your directory where you have downloaded the Nvidia driver file (NVIDIA-Linux-x86_64-173.14.09-pkg2.run) which in my case is /home/karan directory.
    Execute this command to make sure you have all the permissions required 'sudo chmod a+x
    NVIDIA-Linux-x86_64-173.14.09-pkg2.run'
  4. sudo /etc/init.d/gdm stop (use kdm in case of Kubuntu)
  5. sudo ./NVIDIA-Linux-x86_64-173.14.09-pkg2.run
  6. Follow the instructions and you are done.
  7. now Restart your computer to see the change.
  8. "Aaaaand that's how its DONE!"
NOTE:
  • In case your X (display)doesn't start and is forcing you to log in by Console , that means something somewhere has gone wrong. so in that case you can uninstall drivers by 'sudo ./NVIDIA-Linux-x86_64-173.14.09-pkg2.run --uninstall' and also get your original xorg.conf file by 'sudo mv /etc/X11/xorg.conf.back /etc/X11/xorg.conf'
  • I have used 'NVIDIA-Linux-x86_64-173.14.09-pkg2.run' as an example the name may differ depending on your Graphics card.
Please post your comments/suggestions in case i missed out something.

3 comments:

Syed M Agha said...

maha!

Rens said...

I also have a 9600gt and a 64-bit install of hardy heron, however your first method doesn't work for me as envyNG tells me there is no driver for me when I press the automatic button. Could you tell me which driver you picked?

tshann said...

This puppy, the first with envy got my NVIDIA running on Crunchbang 9.04 - Awesome!