Manually Editing the Configuration File
Prev | Chapter 4. Configuring X for the NVIDIA Driver | Next

## Manually Editing the Configuration File

In April 2004 the X.Org Foundation released an X server based on the XFree86 server. While your release may use the X.Org X server, rather than XFree86, the differences between the two should have no impact on NVIDIA FreeBSD users with two exceptions:

- The X.Org configuration file is `/etc/X11/xorg.conf` while the XFree86 configuration file is `/etc/X11/XF86Config`. The files use the same syntax. This document refers to both files as “the X config file”.

- The X.Org log file is `/var/log/Xorg.#.log` while the XFree86 log file is `/var/log/XFree86.#.log` (where `#` is the server number -- usually 0). The format of the log files is nearly identical. This document refers to both files as “the X log file”.

In order for any changes to be read into the X server, you must edit the file used by the server. While it is not unreasonable to simply edit both files, it is easy to determine the correct file by searching for the line

        (==) Using config file:

in the X log file. This line indicates the name of the X config file in use.

If you do not have a working X config file, there are a few different ways to obtain one. A sample config file is included both with the XFree86 distribution and with the NVIDIA driver package (at `/usr/X11R6/share/doc/NVIDIA_GLX-1.0/`). The nvidia-xconfig utility, provided with the NVIDIA driver package, can generate a new X configuration file. Additional information on the X config syntax can be found in the XF86Config manual page (`man XF86Config` or `man xorg.conf`).

If you have a working X config file for a different driver (such as the “nv” or “vesa” driver), then simply edit the file as follows.

Remove the line:

          Driver "nv"
      (or Driver "vesa")
      (or Driver "fbdev")

and replace it with the line:

        Driver "nvidia"

Remove the following lines:

        Load "dri"
        Load "GLCore"

In the `Module` section of the file, add the line (if it does not already exist):

        Load "glx"

If the X config file does not have a `Module` section, you can safely skip the last step if the X server installed on your system is an X.Org X server or an XFree86 X release version 4.4.0 or greater. If you are using an older XFree86 X server, add the following to your X config file:

    Section "Module"
        Load "extmod"
        Load "dbe"
        Load "type1"
        Load "freetype"
        Load "glx"
    EndSection

There are numerous options that may be added to the X config file to tune the NVIDIA X driver. See Appendix F, X Config Options for a complete list of these options.

Once you have completed these edits to the X config file, you may restart X and begin using the accelerated OpenGL libraries. After restarting X, any OpenGL application should automatically use the new NVIDIA libraries. (NOTE: If you encounter any problems, see Chapter 6, Common Problems for common problem diagnoses.)

Prev | Up | Next
Chapter 4. Configuring X for the NVIDIA Driver | Home | Chapter 5. Frequently Asked Questions