Installing and using Compiz Fusion
Prev |  | Next

# 2 Setting up the FreeBSD nVidia driver

Desktop effects can cause quite a load on your graphics card. If you are using an nVidia-based graphics card, you will need to install and configure the proprietary FreeBSD driver that is suitable for your system. If you are using another card, that you know can handle desktop effects, you may skip this section and continue with the `xorg.conf` configuration.

## 2.1 Determining the correct driver to use

There are various versions of the nVidia drivers in the Ports Collection. The correct one to use depends on the actual model (and age) of your graphics card:

- The latest versions of nVidia cards are supported by the `x11/nvidia-driver` port.

- nVidia cards like the GeForce 2MX/3/4 series are supported by the 96`XX` series of drivers, available in the `x11/nvidia-driver-96xx` port.

- Even older cards, like GeForce and RIVA TNT are supported by the 71`XX` series of drivers, available in the `x11/nvidia-driver-71xx` port.

In fact, nVidia provides detailed information on which card is supported by which driver. This information is available directly on their web site: http://www.nvidia.com/object/IO_32667.html.

## 2.2 Installing the nVidia driver

Having determined the correct driver to use for your card, installation is as simple as installing any other port.

> Note: Make sure to update your ports tree using your favorite method (like csup, CVSup or portsnap) before you install any application from the ports system. Graphics drivers and the desktop effects programs are under heavy development, and are updated regularly.

For example, to install the latest driver:

    # cd /usr/ports/x11/nvidia-driver
    # make install clean

The driver will create a kernel module, which should be loaded at system startup. You will need to add the following line to the `/boot/loader.conf` file:

    nvidia_load="YES"

> Note: You may attempt to immediately load the kernel module into the running kernel by issuing a command like `kldload nvidia`, however it has been noted that the latest versions of Xorg will not function properly if the driver is not loaded at boot time. After editing `/boot/loader.conf`, a reboot is recommended.

With the kernel module loaded, you normally only need to change a single line in your `xorg.conf` file to enable the proprietary driver:

Find the following line in `/etc/X11/xorg.conf`:

    Driver      "nv"

and change it to:

    Driver      "nvidia"

Start your GUI as usual, and you should be greeted by the nVidia splash. Everything should work as usual. Note, that at this point you have only set up Xorg to use the nVidia driver, but further configuration is needed before you can actually use 3D desktop effects. This is described in the following sections.

> Note: Although not strictly necessary, you may also wish to install `x11/nvidia-xconfig` and `x11/nvidia-settings` ports. The former can assist you in writing settings to `/etc/X11/xorg.conf` from the command line, and the latter will allow you to modify screen settings from a GUI while running the Xorg system.

Prev | Home | Next
Installing and using Compiz Fusion |  | Configuring xorg.conf for desktop effects