CSUF LogoCSUF Site Navigation
optics.csufresno.edu

F12 Multimedia-Based Applications & Setup Nvidia Driver

Department of Electrical and Computer Engineering
Associate Professor Gregory R. Kriehn
Forums
Wiki
F12 Nvidia Driver

As of Fedora 11, the default "nv" driver has been replaced with the "nouveau" driver. The goal of the "nouveau" driver is to provide 3D hardware accelerated graphics, but it currently only supports 2D. The "nouveau" driver is certainly much better than the old 2D "nv" driver, but I still enjoy having 3D hardware acclerated support. However, before you go trotting off to www.nvidia.com, there is an important warning that has been given with respect to third party proprietary video drivers:

https://www.redhat.com/archives/fedora-test-list/2006-February/msg01565.html

As a result of this, it is strongly advisable that you do not install a driver directly from nvidia. Instead, install the kmod-nvidia module from RPM Fusion.

The "nvidia" driver has recently been broken into separate groups, with older hardware supported by legacy drivers. There is currently one main driver for the newest hardware, and 3 legacy drivers. These include the current version, and the 173.xx, 96.xx, and 71.xx series of legacy drivers.

To determine which driver needs to be installed on your system, you can use lspci to identify your hardware
:
~> lspci -nn |grep 'VGA\|NV'
01:00.0 VGA compatible controller [0300]: nVidia Corporation Quadro NVS 160M [10de:06eb] (rev a1)
~>
From there, head over to Appendix A. Supported NVIDIA GPU Products, find your device, and check to see which driver supports it. The PCI ID for my card happens to be 06EB, which is the Quadro NVS 160M, and is supported by their main driver. Next, check to see which kernel module (KMOD) supports your driver:

KMOD's Supported under Fedora 11 and 12
Latest NVIDIA Driver
Legacy Version 173.xx
Legacy Version 96.xx
kmod-nvidia
kmod-nvidia-173xx
kmod-nvidia-96xx

At this point, normally all that is required is to install the appropriate driver via yum and you are off and running. However, there are a couple of issues for Fedora 12. First of all, the Common F12 Bugs page indicates that the nvidia driver has a bug which has not yet been fixed by NVIDIA (surprise, surprise). If you are using KDE, I would not suggest installing the driver. If you are using GNOME or Enlightenment, you will probably be ok, but I have not tested the stability of the driver myself. Because of the bug, the driver is currently not in the main repository for RPM Fusion, but is sitting in their testing repository. If you want to install it,
~> sudo yum install kmod-nvidia --enablerepo=rpmfusion-nonfree-updates-testing
Hit Enter, and and 'y' when asked if you want to install the rpm package and any dependencies.

From there, adjust SELinux:

~> sudo setsebool -P allow_execstack on
Finally, due to inclusion of the nouveau driver in Fedora 12, the following steps are also required to disable it:
~> sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
~> sudo dracut /boot/initramfs-$(uname -r).img $(uname -r)
If you get an error, it is probably because your kernel is more recent than the kernels for which livna has built its Nvidia kernel modules. If this is the case, simply switch back to an older kernel on your Fedora boot menu (I typically keep 2 kernels around), or wait a few days until RPM Fusion builds the most recent graphics acceleration module rpm for your respective kernel. If your kernel is updated, yum should automatically resolve the dependencies and install a new kmod-nvidia module as well. Since you have already setup SELinux properly, it should not prevent the kernel module from loading. If you have not setup SELinux yet, please see the SELinux page first. Once installed, log out of Gnome, KDE, or Enlightenment, and the Nvidia driver should automatically load. You should see the Nvidia logo quickly flash on your screen before your Login Manager launches.

Note:  There are times when
RPM Fusion seems to have a bit of difficulty resolving the proper dependencies for a particular kernel, especially if a i586 and a i686 kernel are available both for download.  The quickest way to solve this problem is go to the Fedora Updates page and download the new kernel by hand:

http://download.fedora.redhat.com/pub/fedora/linux/updates/12/i386/

Download the latest i686 kernel version and install it using rpm:

~> sudo rpm -vhi ~/Download/kernel-*.i686.rpm
Once installed, try installing or updating kmod-nvidia again using yum. Hopefully, the problem should now be solved.

Removing Old kmod-nvidia modules

After a while you will start to accumulate a number of older nvidia kernel modules. To check how many you have on your system, type:
~> rpm -q kmod-nvidia
Compare these against the kernels installed under /boot, or against the kernel you are currently running:
~> ls /boot
Any kernel modules that are installed that no longer correspond to kernels on your system can be deleted. For example, if I wanted to delete the kernel module associated with the 2.6.23.8-63 kernel, I would type:
~> sudo rpm -e kmod-nvidia-2.6.23.8-63.fc0.14.19-19.lvn8
Repeat this process for all of your old nvidia kernel modules to keep your system clean. That's about it. The next time you reboot, your nvidia driver should load. To verify, take a look at /etc/X11/xorg.conf, and look for a line that says:
Driver    "nvidia"
If you want to get a feel for how well it performs, there is a nifty little program called glxgears that draws three rotating gears and prints out frame rate information based upon its performance. It is a nice way to get a feel for how fast your graphics card is working. I typically only get about 2000 FPS or so, but that is because I am using a single video card to drive both an analog and digital monitor simultaneously (I've setup a dual head system on my server). On other computers, I've seen it reach much higher. To use the program, type:
~> glxgears
Close the window when finished. On the whole, you should notice X responding much more quickly than it was before.