Appendix F. Configuring AGP

There are several choices for configuring the NVIDIA kernel module's use of AGP on Linux. You can choose to either use NVIDIA's builtin AGP driver (NvAGP), or the AGP driver that comes with the Linux kernel (AGPGART). This is controlled through the "NvAGP" option in your X config file:

    Option "NvAGP" "0"  ... disables AGP support
    Option "NvAGP" "1"  ... use NvAGP, if possible
    Option "NvAGP" "2"  ... use AGPGART, if possible
    Option "NvAGP" "3"  ... try AGPGART; if that fails, try NvAGP

The default is 3 (the default was 1 until after 1.0-1251).

You should use the AGP driver that works best with your AGP chipset. If you are experiencing problems with stability, you may want to start by disabling AGP and seeing if that solves the problems. Then you can experiment with the AGP driver configuration.

You can query the current AGP status at any time via the /proc filesystem interface (see Appendix M, Proc Interface).

To use the Linux 2.4 AGPGART driver, you will need to compile it with your kernel and either statically link it in, or build it as a module and load it. To use the Linux 2.6 AGPGART driver, both the AGPGART frontend module, apggart.ko, and the backend module for your AGP chipset (nvidia-agp.ko, intel-agp.ko, via-agp.ko, ...) need to be statically linked into the kernel, or built as modules and loaded.

NVIDIA's builtin AGP support is unavailable if an AGPGART backend driver is loaded into the kernel. On Linux 2.4, it is recommended that you compile AGPGART as a module and make sure that it is not loaded when trying to use NVIDIA's AGP driver. On Linux 2.6, the agpgart.ko frontend module will always be loaded, as it is used by the NVIDIA kernel module to determine if an AGPGART backend module is loaded. When the NVIDIA AGP driver is to be used on a Linux 2.6 system, it is recommended that you make sure the AGPGART backend drivers are built as modules and that they are not loaded.

Please also note that changing AGP drivers generally requires a reboot before the changes actually take effect.

If you are using a recent Linux 2.6 kernel that has the Linux AGPGART driver statically linked in (some distribution kernels do), you can pass the

    agp=off

parameter to the kernel (via LILO or GRUB, for example) to disable AGPGART support. As of Linux 2.6.11, most AGPGART backend drivers should respect this parameter.

The following AGP chipsets are supported by NVIDIA's AGP driver; for all other chipsets it is recommended that you use the AGPGART module.

Supported AGP Chipsets
Intel 440LX
Intel 440BX
Intel 440GX
Intel 815 ("Solano")
Intel 820 ("Camino")
Intel 830M
Intel 840 ("Carmel")
Intel 845 ("Brookdale")
Intel 845G
Intel 850 ("Tehama")
Intel 855 ("Odem")
Intel 860 ("Colusa")
Intel 865G ("Springdale")
Intel 875P ("Canterwood")
Intel E7205 ("Granite Bay")
Intel E7505 ("Placer")
AMD 751 ("Irongate")
AMD 761 ("IGD4")
AMD 762 ("IGD4 MP")
AMD 8151 ("Lokar")
VIA 8371
VIA 82C694X
VIA KT133
VIA KT266
VIA KT400
VIA P4M266
VIA P4M266A
VIA P4X400
VIA K8T800
VIA K8N800
VIA PT880
VIA KT880
RCC CNB20LE
RCC 6585HE
Micron SAMDDR ("Samurai")
Micron SCIDDR ("Scimitar")
NVIDIA nForce
NVIDIA nForce2
NVIDIA nForce3
ALi 1621
ALi 1631
ALi 1647
ALi 1651
ALi 1671
SiS 630
SiS 633
SiS 635
SiS 645
SiS 646
SiS 648
SiS 648FX
SiS 650
SiS 651
SiS 655
SiS 655FX
SiS 661
SiS 730
SiS 733
SiS 735
SiS 745
SiS 755
ATI RS200M

If you are experiencing AGP stability problems, you should be aware of the following:

Additional AGP Information

On Athlon motherboards with the VIA KX133 or 694X chip set, such as the ASUS K7V motherboard, NVIDIA drivers default to AGP 2x mode to work around insufficient drive strength on one of the signals. You can force AGP 4x by setting NVreg_EnableVia4x to 1. Note that this may cause the system to become unstable.

Support for the processor's Page Size Extension on Athlon Processors

Some Linux kernels have a conflicting cache attribute bug that is exposed by advanced speculative caching in newer AMD Athlon family processors (AMD Athlon XP, AMD Athlon 4, AMD Athlon MP, and Models 6 and above AMD Duron). This kernel bug usually shows up under heavy use of accelerated 3D graphics with an AGP graphics card.

Linux distributions based on kernel 2.4.19 and later *should* incorporate the bug fix, but older kernels require help from the user in ensuring that a small portion of advanced speculative caching is disabled (normally done through a kernel patch) and a boot option is specified in order to apply the whole fix.

NVIDIA's driver automatically disables the small portion of advanced speculative caching for the affected AMD processors without the need to patch the kernel; it can be used even on kernels which do already incorporate the kernel bug fix. Additionally, for older kernels the user performs the boot option portion of the fix by explicitly disabling 4MB pages. This can be done from the boot command line by specifying:

    mem=nopentium

Or by adding the following line to /etc/lilo.conf:

    append = "mem=nopentium"

AGP Rate

You may want to decrease the AGP rate setting if you are seeing lockups with the value you are currently using. You can do so by extracting the .run file:

    # sh NVIDIA-Linux-x86-1.0-9746-pkg1.run --extract-only
    # cd NVIDIA-Linux-x86-1.0-9746-pkg1/usr/src/nv/

Then edit os-registry.c, and make the following changes:

    - static int NVreg_ReqAGPRate = 15;
    + static int NVreg_ReqAGPRate = 4;   /* force AGP Rate to 4x */

or

    + static int NVreg_ReqAGPRate = 2;   /* force AGP Rate to 2x */

or

    + static int NVreg_ReqAGPRate = 1;   /* force AGP Rate to 1x */

and enable the "ReqAGPRate" parameter:

    - { NULL, "ReqAGPRate",     &NVreg_ReqAGPRate,      0 },
    + { NULL, "ReqAGPRate",     &NVreg_ReqAGPRate,      1 },

Then recompile and load the new kernel module. To do this, run nvidia-installer with the -n command line option:

    # cd ../../..; ./nvidia-installer -n

AGP drive strength BIOS setting (Via-based motherboards)

Many Via-based motherboards allow adjusting the AGP drive strength in the system BIOS. The setting of this option largely affects system stability, the range between 0xEA and 0xEE seems to work best for NVIDIA hardware. Setting either nibble to 0xF generally results in severe stability problems.

If you decide to experiment with this, you need to be aware of the fact that you are doing so at your own risk and that you may render your system unbootable with improper settings until you reset the setting to a working value (w/ a PCI graphics card or by resetting the BIOS to its default values).

System BIOS version

Make sure you have the latest system BIOS provided by the motherboard manufacturer.

On ALi1541 and ALi1647 chipsets, NVIDIA drivers disable AGP to work around timing and signal integrity problems. You can force AGP to be enabled on these chipsets by setting NVreg_EnableALiAGP to 1. Note that this may cause the system to become unstable.

Early system BIOS revisions for the ASUS A7V8X-X KT400 motherboard misconfigure the chipset when an AGP 2.x graphics card is installed; if X hangs on your ASUS KT400 system with either Linux AGPGART or NvAGP enabled and the installed graphics card is not an AGP 8x device, make sure that you have the latest system BIOS installed.