From ArchWiki
Jump to navigation Jump to search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

How to install Nvidia Driver with pacman

Info from Package Maintainer tpowa

The package is for those people who run a stock arch kernel! I only test with kernel 2.6 and xorg.

Multiple kernel users: You need to install nvidia package for each extra!

Installing drivers

You have to use extra repository, enable it for pacman. Leave X-Server, else pacman cannot finish installation and it will not work! As root, run:

pacman -Sy nvidia (for newer cards)
pacman -Sy nvidia-96xx or pacman -Sy nvidia-173xx (for older cards)

For newer-newer cards you may need to install nvidia-beta from AUR, because stable drivers are not available. (See /usr/share/doc/nvidia/supported-cards.txt in nvidia package if your card is supported.)

If you use the -mm kernel, adjust the above command appropriately.

See the README from nvidia for details on which card is supported by which driver.

Configuring X-Server

Edit /etc/X11/XF86Config or your /etc/X11/xorg.conf config file: Disable in modules section: GLcore and DRI

Add to modules section:

Load "glx"

Make sure you DON'T have a line

Load           "type1"

in the Module section since recent versions of xorg-server does not include the type1 font module (completely replaced by freetype).

Disable Section DRI completely:

#Section "DRI"
# Mode 0666


Driver "nv"


Driver "vesa"


Driver "nvidia"

If it exists, disable the Chipset option (only needed for nv driver):

#Chipset "generic"

This was for basic setup; if you need more tweaking options, have a look at /usr/share/doc/nvidia/README.

You can also run:


See installing and configuring xorg.

Enabling Composite in Xorg

Note: As of the NVidia 180.44 driver, support for GLX with the Damage and Composite X extensions is enabled by default.

Refer to the Composite wiki for detailed instructions.

Modifying Arch rc.conf file

Add nvidia to /etc/rc.conf MODULES section (not needed anymore if you run xorg and udev). Needed for nvidia-71xx and kernel >=2.6.13!

Problems that might occur

Nvidia specific

Xorg7: Please remove your old /usr/X11R6 dir it can cause trouble during installation. Also make sure you've installed pkgconfig. The NVIDIA installer uses pkgconfig to determine where modular Xorg components are installed.

If you experience slow 3D Performance have a look at /usr/lib/libGL.so.1, /usr/lib/libGL.so, /usr/lib/libGLcore.so.1 Perhaps they are wrong linked to mesa or something else. Try reinstalling with pacman -S nvidia.

When you get this message when you try to start an openGL application (for example enemy-territory, or glxgears):

Error: Could not open /dev/nvidiactl because the permissions are too
restrictive. Please see the FREQUENTLY ASKED QUESTIONS 
section of /usr/share/doc/NVIDIA_GLX-1.0/README 
for steps to correct.

Add yourself to the video group using gpasswd -a yourusername video (don't forget to log out and back in, or type: source /etc/profile).

While validating modes all are rejected. X loads but at a very low resolution with multiple "ghosted" displays:

Option	"ModeValidation" "NoTotalSizeCheck" in Device.
Arch specific

x86_64 and lib32-* (stale files problem): If you have previously used the nvidia binary installer, and switch to the packages pacman provides, you will probably run into a problem where 32-bit proprietary GL apps won't start anymore (they throw segfaults now, and you have no idea what went wrong); examples of this are google earth and wine with GL apps. The difficulty here is that the installer stores its files in other places, and you might have stale files in either


or similar. The solution is to do a

updatedb; locate libnvidia-tls

then identify the mismatching tls libs, and remove them (if they live in a /tls directory, remove that directory). Contrary to popular belief, the installer does not always find and remove them, and the problem can go unnoticed a long time. If you cannot identify the mismatching versions, just remove nvidia-utils and lib32-nvidia-utils packages on the command line (with pacman -Rd), do the command above again, and you will know which ones have not been in the package. Delete them and reinstall nvidia-utils and lib32-nvidia-utils.

GCC update: You must compile the module with the compiler that was used for the kernel else it may fail. A simple pacman -S nvidia should do it, if not wait for a new kernel release and stay with old kernel and gcc.

Kernel update: Kernel updates will require reinstalling the driver.

Driver Config Tool

The new config tool for the nvidia-drivers is included called 'nvidia-settings' You don't have to use it it's only a add-on!
For more information about the use, have a look at the following file:
Please install gtk2 with "pacman -S gtk2" in order to use this tool.

NOTE: If you experience problems like crashing the X-Server while running the tool you have to delete your .nvidia-settings-rc file in your home directory.

Nvidia-Settings Autostart: You might like to apply the settings chosen using nvidia-settings at startup, firstly run nvidia-settings at least once in order for settings to be restored. The settings file is stored in ~/.nvidia-settings-rc. Then add the following to the auto-startup method of your DE:

nvidia-settings --load-config-only

Known Issues

If you experience crashes, try to disable RenderAccel "True" option.

If you have Xorg crashing and complaining about a "conflicting memory type" just add nopat at the end of your kernel line in /boot/grub/menu.lst.

If you have nvidia installer complaining about different versions of gcc between the current one and the one used for compiling the kernel then see on how to install the traditional way but remember to export IGNORE_CC_MISMATCH=1

If you have Xorg crashing with a "Signal 11" while using nvidia-96xx drivers try disabling PAT. To disable PAT pass the argument "nopat" to your kernel (edit the GRUB configuration and add the string nopat to the line that loads your kernel.).

gr00vy ~ $  cat /boot/grub/menu.lst | grep kernel
kernel /boot/vmlinuz26 nopat vga=775 root=/dev/disk/by-uuid/1d156a73-4293-4e4b-ac36-54e85243ffe2 ro

If you have comments on the package please post it here: http://bbs.archlinux.org/viewtopic.php?t=10692 If you have a problem with the drivers have a look at the nvidia forum: http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14 For a Changelog please look here: http://www.nvidia.com/object/linux_display_ia32_1.0-8762.html

Note: please don't change the above part without notifying me.

Bad performance after installing new nvidia-driver

If you experience very slow fps rate in compare with older driver first check if You have Direct Rendering turned on. You can do it by:

glxinfo | grep direct

If You get: direct rendering: No then that's your problem. Next check if You have the same versions of glx for the client and server by this:

glxinfo | egrep "glx (vendor|version)"

And if you see different vendors or versions for the client and server run this:

ln -fs /usr/lib/libGL.so.$VER /usr/X11R6/lib/libGL.so
ln -fs /usr/lib/libGL.so.$VER /usr/X11R6/lib/libGL.so.1
ln -fs /usr/lib/libGL.so.$VER /usr/lib/libGL.so.1.2

Where $VER is the version of nvidia package, that you're using. You can check it by nvidia-settings

That's all. Now restart your Xserver and you should have normal acceleration.

Tweaking NVIDIA drivers

Open /etc/X11/xorg.conf or /etc/X11/XFree86Config with your editor of choice and try the following options to improve performance. Not all options may work for your system, try them carefully and always backup your configuration file.

Disable NVIDIA Graphics Logo on startup

Under Device section add the "NoLogo" Option

Option "NoLogo" "True"

Enable hardware acceleration

Under Device section add the "RenderAccel" Option.

Option "RenderAccel" "True"

NOTE: The RenderAccel is enabled by default since drivers version 9746.

Override monitor detection

The "ConnectedMonitor" Option under Device section allows to override the monitor detection when X server starts. This may save a bunch of seconds at start up. The available options are: "CRT" (cathode ray tube), "DFP" (digital flat panel), or "TV" (television).

The following statement force NVIDIA drivers to use DFP monitors.

Option "ConnectedMonitor" "DFP"

NOTE: use "CRT" for all analog 15 pin VGA connections (even if you have a flat panel). "DFP" is intended for DVI digital connections only!

Enable TripleBuffer

Enable the use of triple buffering by adding under Device section the "TripleBuffer" Option.

Option "TripleBuffer" "True"

Use this option if your GPU has plenty of ram (128mb and more) and combined with "Sync to VBlank". You may enable sync to vblank in nvidia-settings.

Enable BackingStore

This option is used to enable the server's support for backing store, a mechanism by which pixel data for occluded window regions is remembered by the server thereby alleviating the need to send expose events to X clients when the data needs to be redisplayed. BackingStore is not bound to NVIDIA drivers but to X server itself. ATI users would benefit from this option as well.

Under Device section add:

Option "BackingStore" "True"

Template:Box Note

Use OS-level events

Taken from NVIDIA drivers README file: "Use OS-level events to efficiently notify X when a client has performed direct rendering to a window that needs to be composited." Whatever it means, it may help improve performance. This option is currently incompatible with SLI and Multi-GPU modes.

Under Device section add:

Option "DamageEvents" "True"

This option is enabled by default in newer driver.

Enable power saving

... For a greener planet (not strictly related to NVIDIA drivers). Under Monitor section add:

Option "DPMS" "True"

Force Powermizer performance level (for laptops)

In your xorg.conf, add the following to Section "Device"

#force Powermizer to a certain level at all times
# level 0x1 = highest
# level 0x2 = med
# level 0x3 = lowest
Option "RegistryDwords" "PowerMizerLevelAC=0x3"
Option	"RegistryDwords"	"PowerMizerLevel=0x3"
  • note from brazzmonkey

On my laptop (featuring a Nvidia Geforce Go 7600), I need to set

Option "RegistryDwords" "PerfLevelSrc=0x2222"

into /etc/X11/xorg.cong (in "Device" or "Screen" section). Otherwise I get artefacts, or even display corruption and occasional lockups in KDE4 with OpenGL desktop effects.

  • NVIDIA™ driver for X.org: performance and power saving hints

Here is a page that explains these options quite well.

Let the GPU set its own performance level (based on temperature)

In your xorg.conf, add the following to the Section "Device"

Option "RegistryDwords" "PerfLevelSrc=0x3333"

Disable vblank interrupts (for laptops)

When running the interrupt detection utility powertop, it is seen that the nvidia driver will generate an interrupt for every vblank. to disable, place in the Device section:

Option         "OnDemandVBlankInterrupts" "True"

This will reduce interrupts to about one or two per second.

Enable overclocking via nvidia-settings

To enable overclocking, place the following line in the "device" section:

Option         "Coolbits" "1"

This will enable on the fly overclocking by running nvidia-settings inside X.

Please note that overclocking may damage your hardware and that no responsibility may be placed on the authors of this page due to any damage to any information technology equipment from operating products out of specifications set by the manufacturer.

Enable screen rotation through XRandR

To enable screen rotation place the following line in the "device" session:

Option         "RandRRotation" "on"

Restart Xorg, and then type in

xrandr -o left

The Screen should be rotated. To restore, type in

xrandr -o normal

Further readings

Using TV-out on your NVIDIA card

Good article on the subject can be found from:


Why is the refresh rate not reported correctly by utilities that use the XRandR X extension (e.g., the GNOME "Screen Resolution Preferences" panel, `xrandr -q`, etc)?

The XRandR X extension is not presently aware of multiple display devices on a single X screen; it only sees the MetaMode bounding box, which may contain one or more actual modes. This means that if multiple MetaModes have the same bounding box, XRandR will not be able to distinguish between them.

In order to support DynamicTwinView, the NVIDIA X driver must make each MetaMode appear to be unique to XRandR. Presently, the NVIDIA X driver accomplishes this by using the refresh rate as a unique identifier.

You can use `nvidia-settings -q RefreshRate` to query the actual refresh rate on each display device.

The XRandR extension is currently being redesigned by the X.Org community, so the refresh rate workaround may be removed at some point in the future.

This workaround can also be disabled by setting the "DynamicTwinView" X configuration option to FALSE, which will disable NV-CONTROL support for manipulating MetaModes, but will cause the XRandR and XF86VidMode visible refresh rate to be accurate.

How to install NVIDIA Driver with custom kernel

It's an advantage to know how the ABS system works by reading some of the other wiki pages about it, first:

We will create our own pacman package quickly by using ABS, which will build the module for the currently running kernel:

Make sure you have ABS installed, and the tree generated

  pacman -Sy abs

then, as root:


Make a temporary directory for creating our new package:

 mkdir -p /var/abs/local/

Make a copy of the nvidia package directory:

 cp -r /var/abs/extra/nvidia/ /var/abs/local/

Set the ownership permissions of the nvidia package directory (in case you are using sudo, makepkg will fail because it can't create the directories, and makepkg yells at you if you run it as root):

 chown -hR <username>:<username> /var/abs/local/nvidia

Go into our temporary nvidia directory:

 cd /var/abs/local/nvidia

We need to edit the two files nvidia.install and the PKGBUILD file, so they contain the right kernel version variables, so we don't have to move it from the stock kernel /lib/modules/2.6.xx-ARCH directory.

You can get your kernel version and local version name if you type:

 uname -r
  • In nvidia.install replace the KERNEL_VERSION="2.6.xx-ARCH" variable with your kernel version, such as KERNEL_VERSION="" or KERNEL_VERSION"" depending on what your kernels version is and local version text/number. Do this for all instances of the version number within this file.
  • In PKGBUILD change the _kernver='2.6.xx-ARCH' variable to match your kernel version again, like above.
  • If you have more than one kernel coexisting in parallel with another, (such as a custom kernel alongside the default -ARCH kernel) change the "pkgname=nvidia" variable in the PKGBUILD to a unique identifier, such as nvidia-2622 or nvidia-custom. This will allow both kernels to use the nvidia module, since the custom nvidia module has a different package name and will not overwrite the original.

Then do:

 makepkg -i -c

.. Now it will automatically build the NVIDIA module for your custom kernel and clean up the leftover files from creating the package. Enjoy!

If X doesn't start on x86_64

If, after installing nvidia video drivers, X doesn't start; solve this problem by editing /etc/X11/xorg.conf. In section ServerLayout add:

Option      "AutoAddDevices" "false"

And add in ServerFlags (if it doesn't exist - add it):

Option      "AllowEmptyInput" "false"

X on TV (DFP) as single monitor

If you have a TV as DFP (DVI/HDMI) only, you might want to start the X server on the DFP monitor even if it is still turned off. You have to force the nvidia driver to use the DFP because it looks for all connected monitors, falling back to CRT-0 if none is found. To force nvidia to use the DFP, even if turned off or otherwise disconnected, you can store a copy of the EDID somewhere on disk and use it instead of reading EDID from the TV/DFP.

To acquire EDID, you need a tool called nvidia-settings (pacman -Sy nvidia-utils). Run it, it will show you some information in tree format, go to your GPU (for me it's "GPU-0"), click the DFP section ("DFP-0" for me). Click on the "Acquire Edid" Button and store it somewhere (/etc/X11/dfp0.edid).

Edit /etc/X11/xorg.conf, in the section "Device" add:

Option "ConnectedMonitor" "DFP"
Option "CustomEDID" "DFP-0:/etc/X11/dfp0.edid"

The "ConnectedMonitor" option forces the driver to "detect" the DFP, even if turned off or something. The "CustomEDID" provides EDID data for this device, it will start up just as if the TV/DFP was connected during X server start.

This way I can automatically start a display manager at boot time and still have a working and properly configured X screen when I decide to switch on the TV.

Laptops: X hangs on login/out, worked around by ctrl+alt+bkspc

If you are using the legacy nvidia drivers and Xorg hangs on login and logout (particularly with an odd screen split into two pieces of black + white or gray), but you can still log in if you ctrl-alt-backspace (or whatever the new "kill X" keybind is) after waiting a few seconds, you probably need this in Template:Filename:

options nvidia NVreg_Mobile=1

One user had luck with this instead, but it makes performance drop significantly for some:

options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660 NVreg_SoftEDIDs=0 NVreg_Mobile=1

Note that NVreg_Mobile there needs to be changed according to what kind of laptop you're using:

  • 1: Dell laptops
  • 2: non-Compal Toshiba laptops
  • 3: all other laptops
  • 4: Compal Toshiba laptops
  • 5: Gateway laptops

See Appendix K of the nvidia readme (here) for more information/help.