• 5 min read
  • Ensuring that your graphic card works the way you want it to in Linux can be a long and tenious task if you are encountering problems. This guide will show you how to setup the nv, nouveau or proprietary nvidia driver with your nVidia graphics card to make sure your card is functioning as it should.

    Getting nVidia cards to work

    Need more help or want to ask a question? Discuss this topic here.
     

    Requirements

    The 'nv' or 'nouveau' driver

    The nv and nouveau drivers are the open-source alternatives to the proprietary nvidia driver, offering support for many of the nVidia cards. The downside to the nv driver is that unlike the open source 'radeon' driver for ATI cards, it does not support direct rendering, also called DRI or hardware-accelerated rendering. The nouveau project, however, aims to fix this by developing a new free driver with working DRI for nVidia cards. Currently, it is (as the name goes ;) ) a new project and it's not ready for everyday use quite yet.
     
    Either way, both of these drivers are included in part of the standard Xorg driver packages in Fedora, so they requires almost no configuration at all! Simply edit the /etc/X11/xorg.conf file and in the "Device" section you will come across a line like this:
    Driver "DriverNameHere"

     Change this line to:

    Driver "Name"

    Where 'Name' is either 'nv' (recommended) or 'nouveau' if you're feeling lucky. Once you restart the computer everything should be functioning (or maybe not if you chose the 'nouveau' driver)

     

    The 'nvidia' driver

    A note on legacy drivers:

    Please note that any card below the GeForce FX series is no longer supported by the mainstream nvidia drivers.

    If you have a Riva or TNT card, you are going to have to use the nvidia legacy drivers. Simply follow the instructions below like normal but replace all instances of:

    • kmod-nvidia with kmod-nvidia-legacy
    • xorg-x11-drv-nvidia with xorg-x11-drv-nvidia-legacy
    • xorg-x11-drv-nvidia-libs.i386 with xorg-x11-drv-nvidia-legacy-libs.i386
    • service nvidia [action] with service nvidia-legacy [action]

    A full product support list for legacy is available here.

    If you are using a GeForce2, 3 or 4 (including MX) card, a you are going to have to use the 96xx series nvidia drivers as your card is not designated as legacy but is no longer supported by the 97xx series drivers.
    Simply follow the instructions like normal but replace:

    • kmod-nvidia with kmod-nvidia-96xx
    • xorg-x11-drv-nvidia with xorg-x11-drv-nvidia-96xx
    • xorg-x11-drv-nvidia-libs.i386 with xorg-x11-drv-nvidia-96xx-libs.i386
    • service nvidia [action] with service nvidia-96xx [action]

    A full product support list for the 96xx series driver is available here.

     
    To install the nvidia driver, simply run the following commands:
    su -
    yum install kmod-nvidia xorg-x11-drv-nvidia
    nvidia-config-display enable
    service nvidia restart

    Please note that for a xen kernel, 'kmod-nvidia-xen' will need to be installed. This rule is applied to all the kernel variants, such as PAE (kmod-nvidia-PAE) and so on. 

    Additionally, if you are running a x86_64 (a 64-bit) operating system the 32bit libraries can be installed for compatibility reasons:

    yum install -y xorg-x11-drv-nvidia-libs.i386

    Common Questions

    Q: How can I test if the driver works now that it's installed?

    A: Simply run 'glxgears' like this:

    glxgears 

    Alternatively you can also check the output of 'glxinfo':

    glxinfo | grep direct -i
    glxinfo | grep OpenGL -i
    It should return "direct rendering: yes" and also various OpenGL information concerning "NVIDIA Corporation" along with your card name and version - NOT "Mesa Indirect".
     
    Q: Help! I followed the instructions and DRI still isn't working!
    A: If you're using the drivers from the nVidia website or if you've previously installed them, please see this post on the RedHat mailinglists as to why it could be a problem. In short, those drivers tend to overwrite other system files which can cause problems, where as the packaged drivers from Livna or other third party repositories do not. If you think this is your problem, pease reinstall all Mesa GL and Xorg server packages to restore the replaced system files.
    Q: What if it still doesn't work?
    A: If you are not using the Livna drivers, then your xorg.conf may not be automatically edited for you. You may need to add this option to your /etc/X11/xorg.conf under the "Device" section:
    Option      "AddARGBGLXVisuals" "True"
    Option "DisableGLXRootClipping" "True"
    Q: How come I can't use Beryl or Compiz?
    A: Please take a look at your xorg.conf and remove the 'Module' section if you have it. Xorg can autoconfigure and guess at a lot of things and even run without a xorg.conf (but that's not recommended). Without a Module section, you're sure that Xorg will load all the modules you need where as with one it will only load what is specified, not more.
     
    Need more help or want to ask a question? Discuss this topic here.