Differences between revisions 219 and 221 (spanning 2 versions)
Revision 219 as of 2014-01-08 10:04:22
Size: 12411
Editor: ?J. Lambrecht
Comment:
Revision 221 as of 2014-01-09 00:50:14
Size: 14149
Editor: ?J. Lambrecht
Comment:
Deletions are marked like this. Additions are marked like this.
Line 207: Line 207:
 * on some older machines, to compensate for a broken bios, older graphics cards the below can improve working with an nvidia card significantly   * on some older machines, to compensate for a broken bios, older graphics cards the below can improve working with an nvidia card significantly
Line 217: Line 217:
}}}
* additional performance tunings could be worth looking at, this will add a noticeable yet less significant performance increase and should remove any 'glitches', the most noticeable result is the GUI seems much more 'snappy'
{{{

+ Tune your systems's mtrr if required, the below is a workeable way
cat /proc/mtrr
should not display any large region as uncachable, mine says 4MB is uncachable
the output for lspci -v | grep -A 10 NVIDIA should show like

01:00.0 VGA compatible controller: NVIDIA Corporation G86M [Quadro FX 360M] (rev a1) (prog-if 00 [VGA controller])
 Subsystem: Dell Device 01ff
 Flags: bus master, fast devsel, latency 0, IRQ 16
 Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
 Memory at e0000000 (64-bit, prefetchable) [size=256M]
 Memory at f2000000 (64-bit, non-prefetchable) [size=32M]
 I/O ports at ef00 [size=128]
 [virtual] Expansion ROM at f4000000 [disabled] [size=128K]
 Capabilities: <access denied>
 Kernel driver in use: nvidia

this can then be used to make the performance bump happen
put the below in /etc/rc.local ( there might be better places but this works fine )

#### preparing mtrr space for maximum graphics performance
echo "base=0xf5000000 size=0x1000000 type=write-back" > /proc/mtrr
echo "base=0xe0000000 size=0x10000000 type=write-combining" > /proc/mtrr
echo "base=0xf2000000 size=0x2000000 type=write-back" > /proc/mtrr

+ An additional module option to consider could be, PAT is a supplement to MTRR and used in modern graphics cards, on systems with a broken bios this might be require in some cases
options nvidia NVreg_UsePageAttributeTable=1
Line 228: Line 259:
 * In case the Flash player behaves erratic, slows down your sytem after playing for a few minutes, check the updated https://wiki.debian.org/FlashPlayer Troubleshooting Section, configure the mms.cfg file and append the two parameters  * In case the Flash player behaves erratic, slows down your sytem after playing for a few minutes, check the updated [[https://wiki.debian.org/FlashPlayer#Troubleshooting|FlashPlayer]] Troubleshooting Section, configure the mms.cfg file and replace the two parameters as documented in the last part of this section.

Translation(s): English - Español - Français - Italiano - Русский - 简体中文


NVIDIA Proprietary Driver

This page describes how to install the NVIDIA proprietary display driver on Debian systems.

Identification

The NVIDIA graphics processing unit (GPU) series/codename of an installed video card can usually be identified using the lspci command. For example:

  • $ lspci -nn | grep VGA
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G80 [GeForce 8800 GTS] [10de:0193] (rev a2)

See HowToIdentifyADevice/PCI for more information. The PCI ID can be used to verify device support.

Drivers

The proprietary "NVIDIA Accelerated Linux Graphics Driver" provides optimized hardware acceleration of OpenGL applications via a direct-rendering X server. It is a binary-only Xorg driver requiring a Linux kernel module for its use.

Three driver versions are available for Debian 7 "Wheezy":

Three driver versions are available for Debian 6.0 "Squeeze":

The 71.86.xx driver - supporting NVIDIA NV4/NV5/NV6/NV10/NV15 GPUs and variants - is not available, as this does not support Xorg X server versions later than 1.4 (620526, 708338).

All versions above are available only for the x86 and x86-64 architectures (Debian i386 and AMD64 ports respectively).

Installation

Debian 7 "Wheezy"

Version 304.88

For support of GeForce 6xxx and higher GPUs (supported devices). For older devices, see Version 173.14.35 (legacy GPUs) and Version 96.43.23 (legacy GPUs).

  1. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy main contrib non-free
  2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

    # aptitude update
    # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms

    This will also install the recommended nvidia-glx package. DKMS will build the nvidia module for your system.

  3. Create an Xorg server configuration file.

  4. Restart your system to enable the nouveau blacklist.

Version 173.14.35 (legacy GPUs)

For support of GeForce 5xxx / GeForce FX GPUs (supported devices).

  1. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy main contrib non-free
  2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

    # aptitude update
    # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-legacy-173xx-dkms

    This will also install the recommended nvidia-glx-legacy-173xx package. DKMS will build the nvidia module for your system.

  3. Create an Xorg server configuration file.

  4. Restart your system to enable the nouveau blacklist.

Version 96.43.23 (legacy GPUs)

For support of GeForce 2, GeForce 3 and GeForce 4 GPUs (supported devices).

  1. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy main contrib non-free
  2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

    # aptitude update
    # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-legacy-96xx-dkms

    This will also install the recommended nvidia-glx-legacy-96xx package. DKMS will build the nvidia module for your system.

  3. Create an Xorg server configuration file.

  4. Restart your system to enable the nouveau blacklist.

Debian 6.0 "Squeeze"

Version 195.36.31

For support of GeForce 6xxx and higher GPUs (supported devices), up to and including some GeForce 400 series devices. For older devices, see Version 173.14.27 (legacy GPUs) and Version 96.43.18 (legacy GPUs).

  1. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 6.0 "Squeeze"
    deb http://http.debian.net/debian/ squeeze main contrib non-free
  2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

    # aptitude update
    # aptitude -r install linux-headers-2.6-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms

    This will also install the recommended nvidia-glx package. DKMS will build the nvidia module for your system.

  3. Update the initial ramdisk to include the nouveau blacklist (613951):

    # update-initramfs -u
  4. Create an Xorg server configuration file.

  5. Restart your system to enable the nouveau blacklist.

Version 173.14.27 (legacy GPUs)

For support of GeForce 5xxx / GeForce FX GPUs (supported devices).

  1. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 6.0 "Squeeze"
    deb http://http.debian.net/debian/ squeeze main contrib non-free
  2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

    # aptitude update
    # aptitude -r install linux-headers-2.6-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-legacy-173xx-dkms

    This will also install the recommended nvidia-glx-legacy-173xx package. DKMS will build the nvidia module for your system.

  3. Update the initial ramdisk to include the nouveau blacklist (613951):

    # update-initramfs -u
  4. Create an Xorg server configuration file.

  5. Restart your system to enable the nouveau blacklist.

Version 96.43.18 (legacy GPUs)

For support of GeForce 2, GeForce 3 and GeForce 4 GPUs (supported devices).

  1. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 6.0 "Squeeze"
    deb http://http.debian.net/debian/ squeeze main contrib non-free
  2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

    # aptitude update
    # aptitude -r install linux-headers-2.6-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-legacy-96xx-dkms

    This will also install the recommended nvidia-glx-legacy-96xx package. DKMS will build the nvidia module for your system.

  3. Update the initial ramdisk to include the nouveau blacklist (613951):

    # update-initramfs -u
  4. Create an Xorg server configuration file.

  5. Restart your system to enable the nouveau blacklist.

Configuration

As the nvidia driver is not autodetected by Xorg, a configuration file is required to be supplied. For example:

/etc/X11/xorg.conf.d/20-nvidia.conf

  • Section "Device"
            Identifier "My GPU"
            Driver "nvidia"
    EndSection

The configuration file above can be created using these commands:

  • # mkdir /etc/X11/xorg.conf.d
    # echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf

Please note that this command will break your Xorg configuration on Optimus systems. For such hardware, see Bumblebee instead.

Restart your system at this point to enable the nouveau driver blacklist.

Extended Configuration, Stability & Performance

  • The above configuration for the "Device" Section can/should be appended with the below Driver "nvidia" for increased performance

    Option         "NoLogo" "1"
    Option         "RenderAccel" "1"
    Option         "TripleBuffer" "true"
    Option         "MigrationHeuristic" "greedy"
  • in case you're using Icedove or Iceweasel or some vanilla Mozilla stuff like Firefox or Thunderbird, make sure the below is present on your system

in your homedirectory ~/.xinitrc should contain the below for a noticeable performance increase
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1
  • when encountering performance and stability issues it is advisable or even recommended to add on or more of the below, your boot parameters should read something like

GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset enable_mtrr_cleanup mtrr_spare_reg_nr=4"

add nomodeset as a boot parameter ( grub, lilo or whatever you use ) 
nomodeset is critical for some nvidia cards and/or drivers
  • on some older machines, to compensate for a broken bios, older graphics cards the below can improve working with an nvidia card significantly

adding enable_mtrr_cleanup as a boot parameter ( grub, lilo or whatever you use )
in addition adding mtrr_spare_reg_nr=4 ( or a suitable number for your set-up ) will show improvements, take note the value=4 is hardware dependant.
one more important change code be setting NVreg_EnableMSI=0 and/or NVreg_Mobile ( mobile gfx cards only ) in /etc/modprobe.d/ for the nvidia module, which could read like ...

alias char-major-195* nvidia
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=44 NVreg_DeviceFileMode=0660
options nvidia NVreg_EnableMSI=0
options nvidia NVreg_Mobile=1

* additional performance tunings could be worth looking at, this will add a noticeable yet less significant performance increase and should remove any 'glitches', the most noticeable result is the GUI seems much more 'snappy'

+ Tune your systems's mtrr if required, the below is a workeable way
cat /proc/mtrr 
should not display any large region as uncachable, mine says 4MB is uncachable
the output for      lspci  -v | grep -A 10 NVIDIA    should show like

01:00.0 VGA compatible controller: NVIDIA Corporation G86M [Quadro FX 360M] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Dell Device 01ff
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f2000000 (64-bit, non-prefetchable) [size=32M]
        I/O ports at ef00 [size=128]
        [virtual] Expansion ROM at f4000000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia

this can then be used to make the performance bump happen
put the below in /etc/rc.local ( there might be better places but this works fine )

#### preparing mtrr space for maximum graphics performance
echo "base=0xf5000000 size=0x1000000 type=write-back" > /proc/mtrr
echo "base=0xe0000000 size=0x10000000 type=write-combining" > /proc/mtrr
echo "base=0xf2000000 size=0x2000000 type=write-back" > /proc/mtrr

+ An additional module option to consider could be, PAT is a supplement to MTRR and used in modern graphics cards, on systems with a broken bios this might be require in some cases
options nvidia NVreg_UsePageAttributeTable=1

Troubleshooting

  • The NVIDIA driver conflicts with the nouveau DRM driver (580894). The nouveau kernel module is blacklisted by the nvidia-kernel-common package.

    • Restart your system after configuring Xorg for the NVIDIA driver.

    • From xserver-xorg-video-nouveau's README.Debian:

      If you decide to switch to the proprietary driver, it is highly
      recommended to reboot because it is incompatible with nouveau, and
      unloading the latter is not easy and may lead to a blank console.
  • In case the Flash player behaves erratic, slows down your sytem after playing for a few minutes, check the updated FlashPlayer Troubleshooting Section, configure the mms.cfg file and replace the two parameters as documented in the last part of this section.

See Also


CategoryProprietarySoftware