Just a thought

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

Steps ::

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.

2) Go to nVIDIA page and download the fileΒ  NVIDIA-Linux-x86-180.44-pkg1.run . This driver support these graphics cards.Β  For your reference use this README file on nVIDIA driver installation.

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 πŸ˜€ .


23 Responses to “Installing nVIDIA drivers in Ubuntu”

  1. metric said

    I exactly followed the step by step instruction, however after step 6, It was compiling kernel msg came 1% ….43 …100%

    after that error was thrown

    ERROR: Unable to build the NVIDIA kernel module.

    I download the linux kernal source and GCC compiler as per the earlier steps.

    I have in built NVIDIA 610i/7050 graphic card, for which i download

    Please assist


    • stringofthoughts said


      You should use the latest driver NVIDIA-Linux-x86-173.14.12-pkg1.run is old. Go to nvidia driver download page and download latest driver.

      I think you don’t ‘ve the linux-headers installed in your system that’s why you are getting error message. Install headers.

      $ sudo apt-get install linux-headers

      Try again after this.

  2. metric said

    Thanks a bunch, I tried NVIDIA-Linux-x86-180.51-pkg1.run and the drivers got installed in a jiffy. This comment am writing from my linux box, with NVIDIA drivers installed.

    Thank you once again,

  3. […] This comment am writing from my linux box, with NVIDIA drivers installed. This link helped me http://stringofthoughts.wordpress.co…tu/#comment-33. Thanks to every one, specially hellnoire for taking out the valuable time in assisting me. […]

  4. phs said

    Thank you so much for publishing this, it worked like a charm!

  5. Chris said

    Great instructions.

    I downloaded the file to the desktop and i drag and dropped it to my home folder, and followed your steps.

    However after stopping the GDM, I typed the sudo sh NVIDIA… for the driver, and i get a one line response saying that it can’t open NVIDIA-Linux…

    Another forum suggested double clicking the icon and opening it in the terminal, but then i get a message saying that “nvidia installer must be run as root”

    Does this sound like a familiar problem and what can you suggest to solve it.

    Thanks chris

    • stringofthoughts said


      The driver file might be incomplete. You go to nVidia driver download page and download the latest driver for your system and try again. I’ve never tried double clicking for nVidia drivers . I ‘ve documented my steps in this post and i always do it exactly the same for all my systems. Try again it’ll work.

      Good Luck πŸ™‚

  6. Martin said

    A much easier way – install EnvyNG, and let point and click goodness do its thing. πŸ™‚ (It says that the ION chipset isn’t supported, but ignore that and install anyway.)

    • stringofthoughts said

      Envy sure is an easier way to install nVidia drivers but my experience is that Envy doesn’t always work in all systems, like my friend’s laptop (Dell XPS) which i described in the post. This procedure of compiling and installing is guarantied to work. Although there is a flaw that you need to recompile the driver every time you upgrade your kernel. I myself would use Envy if it’s working in my system.


  7. denis6902 said

    Thank you soo much.

    When i installed the jaunty 64-bit, the driver from nvidia 180 [recommended] through SYSTEM > ADMINISTRATION > HARDWARE DRIVERS was working fine, but after reboot the laptop (dell vostro 1510) compiz was not working anymore.

    I tried going to SYSTEM > PREFERENCES > APPEARANCE > VISUAL EFFECTS and tried the (extra) and still wasnt working.

    I am very new to linux too, and i managed to get compiz in 3D again, really thank you!

    Now it only works to have compiz working through SYSTEM > PREFERENCES > APPEARANCE > VISUAL EFFECTS (EXTRA), the hardware drivers does not activate the NVIDIA 180 driver [recommended]

    Take it easy,


  8. denis6902 said

    forgot to say that i tried through envy pior to this and it didnt do it!

  9. Dan said

    In a time when most of the population can’t drive a standard 5 speed, you want the general public to do this to install a video driver?
    Your instructions are great, and the fact the you found a way to make it work is great.
    I’ve been a PC tech since 1995 and have played with computers since 1984, and am just trying out Ubuntu. I spent 45 minutes reading and trying different things to install these drivers. At least Windows can install a graphics driver with the gui open! While the underlying parts of Linux are rock solid and dependable, their gui still leaves much to be desired. Linux has a LONG way to go if it wants to be accepted by the general public. I’ll NEVER recommend Linux to an average user.

    • stringofthoughts said

      Hello Dan,

      Thank you for taking the time to comment.

      I won’t recommend Linux to a person who is very comfortable in windows environment. It’s very difficult to switch. But i do believe that Linux and the FOSS is better way for the future and that’s why I recommend kids to use Linux and get used to it. Kids are blank slate they’ll learn anything we find difficult and in better way. Windows doesn’t give ’em the freedom Linux provides. Linux is more friendly than windows you just need to know it. The more time you spend with Linux the more you are gonna love it.

      I hope in a decade the next generation will be using Linux and FOSS.


  10. dare said

    thanks, works like a charm

  11. Mike said

    THANK YOU! I’d spent a day trying to do this before I found this clear & concise guide.
    This has successfully updated the Nvidia driver on a Apple TV running Ubuntu Jaunty.

  12. Andi said

    Many thanks for this great guide.

    Tried to install NVIDIA drivers following a German guide from the ubuntu wiki but ended in a mess with different xserver errors.

    With your guide it worked out fine at first try.

  13. olemartin said

    Great guide! Worked great, even for a linux newbie πŸ™‚

  14. Juan said

    Thank you so much for publishing this,

  15. […] Sources: https://stringofthoughts.wordpress.com/2009/04/03/installing-nvidia-drivers-in-ubuntu/ […]

  16. Richard said

    Thanks a lot. Followed these instructions and it worked like a charm. The only thing that came up for me is when I installed linux-headers, it gave me a list of available headers and I had to specify one exactly.


  17. Henry Lee said

    Thanks for your work. Your solution is probably the most comprehensive and best explained I’ve seen. I just thought I’d say my appreciations.

  18. Mark Husk said

    Acer Revo Ubuntu install desperate help needed.

    Due to a number of reasons I’ve been trying to get xubuntu, kubuntu and now ubuntu installed on my Acer Revo R3600. I’ve found a resolution to every single barrier so far (and there have been many!) and I’ve rebooted and clean installed this at least 20 times now and I’ve bumped into a real deal breaker for me, my Acer and linux. There seem to be no answers out on the web so here goes.

    After trying at least 10 separate (and different) set up instructions for Ubuntu on the Revo I tried yours and I get the same fail. After the restart the mouse and keyboard freeze and fail. It is not clear what is causing the problem as this fail essentially means I can’t find out what is causing the problem as there is no response from the keyboard or the mouse. It is a frozen system.

    If I run the system off the USB stick the freeze didn’t happen. When installed to the HD it freezes on restart.

    Following your guide it has frozen again. I see that a number of people have had a similar problem and bailed out to Windows 7 as nobody in the usually brilliant Linux community has solved it.

    I am now clueless. I’ve tried everything and Windows is once again looking like the way forward as this Acer Revo Ubuntu combination has wasted a good 3 days of my life so far. I’m becoming bitterly obsessed with solving the never ending bugs.

    Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: