Installing nVIDIA drivers in Ubuntu
Posted by stringofthoughts on April 3, 2009
‘ve been trying to install nVIDIA drivers in my friends laptop ( Dell XPS M1530) for quite sometime. Tried a few months back but no luck and I gotta tell you there is not one simple step by step procedure written anywhere out there. Everybody is writing about it but i guess those people are Linux experts but for a new user it doesn’t help much. when I failed once again 2 days ago i brought his laptop to my room this morning and after a few trial and few hours of reading README files and other crap on net. I was finally able to install it correctly. So I’m gonna write a step by step procedure for installing nVIDIA drivers in Linux.
This is a very detailed version with a lot of explanation. If you want a short version of this click here.
System : Dell XPS M150 with Ubuntu 8.04 LTS (Hardy Heron)
Graphics card : nVIDIA GeForce 8400M GS
1) Update the system. This is very important step (especially for new users)
$ sudo apt-get update
or you can use the graphical update manager.
3) The nVIDIA driver installation script needs a precompiled Linux kernel ( of the version you are using). If you don’t ‘ve a precompiled kernel it’ll try to download from ftp://download.nvidia.com , just say NO. It’ll say something like it couldn’t find any precompiled kernel interface so it needs to compiles the kernel . It is for this step you need the GCC compiler (latest version of-course) and the kernel source (for the image you are using). This was one of the the reason behind running updates but you should always keep system updated.
4)Open synaptic Package Manager and download the source for your kernel. or from command line
$ sudo apt-get install linux-source
$ sudo apt-get install linux-headers
Tip : Ubuntu repositories only keeps source for the latest kernel so once again don’t start without running update
4) Although you updated the system, Check if you have GCC compiler installed but if you don’t have it just run
$ sudo apt-get install gcc build-essential
After these steps you ‘ve the files need for installing nVIDIA driver . 1) The driver file NVIDIA-Linux-x86-180.44-pkg1.run .2) The Linux kernel source 3) The GCC compiler.
5) Now we need to remove the remove the driver for X.Org X server, which is currently running your system :). This is very important that you remove this package before installing new driver.
$ sudo apt-get remove xserver-xorg-video-nv
Restart the system. In the next boot you would get a very low resolution like (800 x 600 ) but don’t worry about it. When the login screen comes type Ctrl+Alt+F1 . It’ll take you to command prompt. See before you can run nVIDIA driver file you need to stop GDM (Graphical Display Manager). so Log in and execute these commands.
$ sudo /etc/init.d/gdm stop
$ sudo sh NVIDIA-Linux-x86-180.44-pkg1.run // be in the same directory
6) Follow the instructions. Say No when it asks for downloading the kernel from it’s ftp site. Say YES when it asks for compiling the kernel. It’ll do the magic and in the last step say YES when it asks for updating the xorg.conf (Otherwise you ‘ll have to do it yourself and I know you don’t wanna do that )
7) Reboot the system
$ sudo reboot
And you are done . See that was not that difficult, If only someone would ‘ve explained in this much detail ….. Now Have fun with Compiz .