Revision 1 as of 2005-07-30 00:15:43

Clear message

Sometimes, using the available nvidia-glx package in Ubuntu is not feasable for the user, either because of bugs that are present in the older version, or because the user will obtain a needed feature using the official drivers. The purpose of this page is to detail the neccessary work to install the official Nvidia drivers from Nvidia.com. Note that this will not fix resolution problems, for that you need to go [:FixVideoResolutionHowto:Here].

Obtaining needed software

Before you begin, it is strongly advised that your already have Xorg working acceptably with the 'nv' drivers included. First, make sure that your /etc/X11/xorg.conf is backed up.

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Next, download the right drivers for your platform from [http://www.nvidia.com/object/unix.html here], and save them to your home directory.

Open a terminal, and run the following command:

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

This next step is optional, most people seem not to need it, and it takes a fair amount of bandwidth and diskspace.

sudo apt-get install linux-source-2.6.10 ; sudo tar xvjf /usr/src/linux-source-2.6.10.tar.bz2 ; sudo ln -s /usr/src/linux-source-2.6.10 /usr/src/linux

The next step is to edit your xorg.conf file. Open it with an editor,

sudo gedit /etc/X11/xorg.conf

Find the section Module and comment out DRI using the # symbol, such as in the following example.

Section "Module"
        Load    "bitmap"
        Load    "dbe"
        Load    "ddc"
#       Load    "dri"   <------ this is 'commented'
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "record"
        Load    "type1"
        Load    "vbe"
EndSection

Now find the section Device, and change the Driver from nv (or vesa, fb, etc) to nvidia, as in the following example, and then save it.

Section "Device"
        Identifier      "Card0"
        Driver          "nvidia" #This is where you change it
EndSection

Now that your Xorg.conf is saved, we need to shutdown the X11 server so that we can install the new drivers. To do this, save your work and press ctrl-alt-f1, and log in. Then run the following command to shutdown X11. Make sure your work is saved, Gnome is going to shutdown too.

sudo /etc/init.d/gdm stop

Now we need to run the Nvidia installer script. First, it needs to be made executable.

sudo chmod +x NVIDIA*

Useful tip, typing the first few letters and hitting the tab key will autocomplete the name, saving you from using wildcards like *

Now that you can run the script, you do so with the following command; make sure to include the ./.

sudo ./NVIDIA*

The installer will now walk you through the steps required. Assuming success, you can now restart your X11 server using

sudo /etc/init.d/gdm start

It didn't work!

If the installer fails, go through the following checklist

  • Was Xorg already properly configured for the nv drivers?

  • Did you remove the nvidia-glx, nvidia-settings, and nvidia-kernel-common packages installed via apt or synaptic?
  • Did you read the log found in /var/log/nvidia-installer-log for errors that can guide you?

  • 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?
  • Did you check the Nvidia Linux Forums for any current 'known issues' with the latest drivers?
  • Did you ask in #ubuntu on irc.freenode.net?