Fedora Nvidia Driver Install Guide

Mauriat Miranda (http://www.mjmwired.net/contact/)

Other Guides/Resources

Published: 25 November 2008 (updated: 25 November 2008)

Post To: del.icio.us, furl, digg, spurl, gmail this, Blog this
Show-Hide Menu

This guide is meant to help explain how to determine and install the proper kernel driver to enable hardware accelerated graphics on your Nvidia based video card. This guide is intended for Fedora users however much of the information applies to other Linux distributions as well.

NOTE: If you need the quick steps, please read: Determining PCI ID and Installation Using RPMFusion.


Graphics Driver Options

There are 3 different drivers that currently support Nvidia hardware in some form. They are:


Proprietary Nvidia Driver Versions

The proprietary nvidia driver supports specific hardware in groups. Typically older hardware is supported through various legacy drivers. Currently there is 1 main driver for newest hardware, and 3 legacy drivers. The names of the drivers are not very informative, but according to Nvidia's website they are provided as:


Determining PCI ID

Which driver depends on the specific hardware. While the name of the product may be useful (e.g. GeForce FX5900, Quaddro NV140M), hardware is best identified using PCI ID's.

To find the PCI ID of a particular device use the lspci command. depending on the version and usage of the lspci command various output is shown. In Fedora, I use the following to identify the PCI ID (Note: the grep is added to filter the output):

[mirandam@charon ~]$ /sbin/lspci -nn | grep 'VGA\|NV'
01:00.0 VGA compatible controller [0300]: nVidia Corporation NV34 [GeForce FX 5200] [10de:0322] (rev a1)

Use the PCI ID and look it up under Appendix A. Supported NVIDIA GPU Products in any Nvidia driver documentation (also provided on the Nvidia website).

In this example the PCI ID is 0322. According to Appendix A, this ID corresponds to the Legacy version (173.14.xx series) driver.

Note: It is very important to know which driver your hardware requires. Typically many users will have newer hardware and not have to worry about this issue. However users with older hardware who install a newer driver may have non functional X-servers.


Driver Packaging

There are 2 common ways of installing a driver for Nvidia hardware. Both methods will work and install the driver, however each has advantages and disadvantages.

Nvidia.com Binary Installer

Using the installer from Nvidia will try to compile a driver for your specific Linux distribution and install it. It will also modify any needed configuration files to make sure it loads. The only requirements for the installer are the necessary kernel files (usually kernel headers and the gcc compiler). This installer is only available through the Nvidia website and has the filename in the form of: NVIDIA-Linux-x86-XYZ.AB.pkg1.run.

The advantage of this method is that it can be run in almost any version or distribution and can be installed for custom kernels. It is usually immediately available.

The disadvantage of this method is that the installer is the only application that tracks the modification of the system. If you are using a distribution that uses packag management (i.e. RPM's for Fedora) then the installer may interfere with your package manager and cause problems when you add/remove some RPM's. The most critical problem with this method is that since each install depends on a specific kernel version, if you update and boot into a new kernel the driver will not load. You must manually re-install the driver from the command line since the X-server will not load.

3rd Party Repository

The Nvidia Installer can be extracted and reconfigured into an installable package which is specific to the distribution (RPM, DEB, etc.). Since Fedora uses RPM the driver would be an RPM package(s). The recommended 3rd Party Repository for the Nvidia driver with Fedora is RPMFusion.

The advantage of this method is that it can be installed faster and easier (often a smaller download) using the package manager e.g. YUM in Fedora. The packages can be automatically updated with new kernels and easily added or removed. The most beneficial advantage with this method is that if a newer kernel, X-server or driver is incompatible the package will automatically switch to using the standard 2D nv driver. This way the X-server access is never lost.

The disadvantage of this method is that depends entirely on the 3rd Party Repository to ensure that updates are available on their servers and properly built to match current kernel releases. Typically in the past many problems relating to repositories, mirror syncing and build issues have reduced the advantages of this method of installation.

NOTE: It is recommended by most distribution developers to use the installation method that most closely aligns with the distribution's package management. Fedora users are strongly recommended to use the RPMFusion repository.


Installation Using RPMFusion

To install the nvidia driver using RPMFusion and YUM.

1. First Install the repository configuration files for YUM. Run the following (enter 'root' password when prompted):

[mirandam@charon ~]$ su -c 'rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
[mirandam@charon ~]$ su -c 'rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-*'

2. Second Select the proper KMOD (Fedora Kernel Module) which matches the driver you need. This MUST match the specific driver for the PCI ID you determined earlier.

KMOD's for Fedora 10:

Latest VersionLegacy 173.14.xxLegacy version 96.43.xx
kmod-nvidiakmod-nvidia-173xxkmod-nvidia-96xx

KMOD's for Fedora 9 (Note the specific names between the legacy and newest drivers):

Latest VersionLegacy 173.14.xxLegacy 96.43.xxLegacy 71.86.xx
kmod-nvidia-newestkmod-nvidiakmod-nvidia-96xxkmod-nvidia-legacy

3. Third Install the proper KMOD using the yum command (enter 'root' password when prompted):

[mirandam@charon ~]$ su -c 'yum install kmod-nvidia'

NOTE: YUM will automatically determine any extra packages needed for the installation. If a new kernel is needed, then a reboot is required before the Nvidia driver will load.

Note: Advanced users who use 'XEN' or 'PAE' kernels, may have support for the nvidia driver. To see other KMOD's for your kernel search through yum:

[mirandam@charon ~]$ yum list *kmod-nvidia\*

Installation Using Nvidia Installer

INCOMPLETE.

Installing:

[mirandam@charon Download]$ su -c 'sh NVIDIA-Linux-x86-XYZ.AB.pkg1.run'

Uninstalling:

[mirandam@charon Download]$ su -c 'sh NVIDIA-Linux-x86-XYZ.AB.pkg1.run --uninstall'

Comments, suggestions, questions or any feedback welcome for this page or any of my Resources. Please use the contact link.

Help Out: If you found this guide or any Resource helpful, please consider supporting this site by recommending this page to others or linking to this page. I appreciate all the support I receive. Thank you in advance.

Disclaimer: The author makes no claim to the accuracy of the information provided. This information is provided in the hope that it will be useful, but WITHOUT ANY WARRANTY. There is no implied support from referencing this guide. Any help that is provided is at will. Use this information at your own risk. Always make proper backups and use caution when modifying critical system files.

PLEASE DO NOT mirror, translate or duplicate this page without contacting me. I have spent countless hours of work personally researching and verifying these steps.

Copyright © 2003-2008 by Mauriat Miranda (mjmwired.net). Hosted by MidPhase.