szal
July 17th, 2011, 10:51 AM
Preliminary remarks. As this question pops up quite often on IRC and, as a quick search told me, on this board as well, I decided to put together some directions that, with some or the other variation, also apply to other Linux distributions and have never failed me. The following is confirmed to work for Kubuntu 11.04 “Natty Narwhal” 64bit with a NVIDIA GeForce GT 240 and on Kubuntu 11.04 “Natty Narwhal” 32bit with a NVIDIA GeForce FX 5900XT graphics card.
This HowTo will describe how to install the proprietary NVIDIA graphics card drivers using exclusively the command line. I strongly suggest you try this method for a fresh install of graphics drivers before trying any other method, especially a GUI-driven one (I never used a GUI for package management on a Debian-ish system, but I hear that the Ubuntu Software Center supposedly has a way of installing proprietary graphics drivers).
The restricted packages repository should be enabled by default.
To the more experienced users: This HowTo uses ‘apt-get’ for demonstrating the install process. If you prefer using ‘aptitude’, feel free to replace the commands accordingly.
First steps. As we’ll be doing everything on the command line, first open a terminal application from your desktop environment’s menu or from a shortcut icon on your panel, if you have one. You should be greeted by a prompt that looks like this:
username@machinename:~$with ~ signifying your currently logged in user’s home directory (/home/username/) and $ stating that you have no special privileges.
Know your graphics card! If you’re not 100% sure what graphics card is in your machine, find out by issuing the following command:
username@machinename:~$ lspci -kThis returns all devices that are connected to your machine’s PCI bus. Scroll to find the entry that describes your graphics card; it should look similar to this one:
02:00.0 VGA compatible controller: nVidia Corporation GT215 [GeForce GT 240] (rev a2)
Subsystem: CardExpert Technology Device 0401
Kernel driver in use: nvidia
Kernel modules: nvidia-current, nouveau, nvidiafbIn this example the proprietary NVIDIA driver is already installed (“Kernel driver in use: nvidia”). If the NVIDIA driver is not installed, it will most likely show “nouveau” as being used.
Which driver to choose? Ubuntu offers three different NVIDIA driver packages: nvidia-current, nvidia-173, and nvidia-96. These are for the following NVIDIA graphics cards:
nvidia-current: for GeForce 6 series (6xxx), GeForce 7 and GeForce Go 7 series (7xxx), GeForce 8 and 8M series (8xxx), GeForce 9 and 9M series (9xxx), GeForce 100 and 100M series (1xx), GeForce 200 and 200M series (2xx), GeForce 300 and 300M series (3xx), GeForce 400 and 400M series (4xx), GeForce 500 and 500M series (5xx). As far as I can see, this is also the driver to choose if you happen to run a Quadro graphics card (except Quadro 2 Pro and Quadro 2 MXR).
nvidia-173: for GeForce FX series (FX 5xxx).
nvidia-96: for GeForce 4 MX and Ti series, GeForce 3 series.
GeForce 2, GeForce 256, TNT, TNT2 and Riva graphics cards would require an even older driver, the installation of which is outside the scope of this HowTo, and for most users of these cards, proprietary drivers should offer no tangible advantage over the free nouveau driver.
For the purpose of demonstrating the installation, I will use “nvidia-current” below. Users of cards for which this driver doesn’t apply, please replace with “nvidia-173” or “nvidia-96” accordingly.
Install the driver. Now comes the moment where the elephant releases its water… ;) Issue the following command on the terminal:
username@machinename:~$ sudo apt-get update && sudo apt-get install nvidia-current && sudo nvidia-xconfigThis will (a) refresh your package sources cache, (b) install the NVIDIA driver and any dependencies it needs to pull in, and (c) create a new Xorg configuration file /etc/X11/xorg.conf.
If the process finished with no errors, reboot and you should be set. :)
Please feel free to post any questions arising from this description here.
This HowTo will describe how to install the proprietary NVIDIA graphics card drivers using exclusively the command line. I strongly suggest you try this method for a fresh install of graphics drivers before trying any other method, especially a GUI-driven one (I never used a GUI for package management on a Debian-ish system, but I hear that the Ubuntu Software Center supposedly has a way of installing proprietary graphics drivers).
The restricted packages repository should be enabled by default.
To the more experienced users: This HowTo uses ‘apt-get’ for demonstrating the install process. If you prefer using ‘aptitude’, feel free to replace the commands accordingly.
First steps. As we’ll be doing everything on the command line, first open a terminal application from your desktop environment’s menu or from a shortcut icon on your panel, if you have one. You should be greeted by a prompt that looks like this:
username@machinename:~$with ~ signifying your currently logged in user’s home directory (/home/username/) and $ stating that you have no special privileges.
Know your graphics card! If you’re not 100% sure what graphics card is in your machine, find out by issuing the following command:
username@machinename:~$ lspci -kThis returns all devices that are connected to your machine’s PCI bus. Scroll to find the entry that describes your graphics card; it should look similar to this one:
02:00.0 VGA compatible controller: nVidia Corporation GT215 [GeForce GT 240] (rev a2)
Subsystem: CardExpert Technology Device 0401
Kernel driver in use: nvidia
Kernel modules: nvidia-current, nouveau, nvidiafbIn this example the proprietary NVIDIA driver is already installed (“Kernel driver in use: nvidia”). If the NVIDIA driver is not installed, it will most likely show “nouveau” as being used.
Which driver to choose? Ubuntu offers three different NVIDIA driver packages: nvidia-current, nvidia-173, and nvidia-96. These are for the following NVIDIA graphics cards:
nvidia-current: for GeForce 6 series (6xxx), GeForce 7 and GeForce Go 7 series (7xxx), GeForce 8 and 8M series (8xxx), GeForce 9 and 9M series (9xxx), GeForce 100 and 100M series (1xx), GeForce 200 and 200M series (2xx), GeForce 300 and 300M series (3xx), GeForce 400 and 400M series (4xx), GeForce 500 and 500M series (5xx). As far as I can see, this is also the driver to choose if you happen to run a Quadro graphics card (except Quadro 2 Pro and Quadro 2 MXR).
nvidia-173: for GeForce FX series (FX 5xxx).
nvidia-96: for GeForce 4 MX and Ti series, GeForce 3 series.
GeForce 2, GeForce 256, TNT, TNT2 and Riva graphics cards would require an even older driver, the installation of which is outside the scope of this HowTo, and for most users of these cards, proprietary drivers should offer no tangible advantage over the free nouveau driver.
For the purpose of demonstrating the installation, I will use “nvidia-current” below. Users of cards for which this driver doesn’t apply, please replace with “nvidia-173” or “nvidia-96” accordingly.
Install the driver. Now comes the moment where the elephant releases its water… ;) Issue the following command on the terminal:
username@machinename:~$ sudo apt-get update && sudo apt-get install nvidia-current && sudo nvidia-xconfigThis will (a) refresh your package sources cache, (b) install the NVIDIA driver and any dependencies it needs to pull in, and (c) create a new Xorg configuration file /etc/X11/xorg.conf.
If the process finished with no errors, reboot and you should be set. :)
Please feel free to post any questions arising from this description here.