开源驱动

Debian 有三种支持NVIDIA显卡的开源驱动,你可以查看到你正在使用哪一种:

$ grep -B2 'Module class: X.Org Video Driver' /var/log/Xorg.0.log

你可以简单地 配置X 来改变所使用的开源驱动。

没有一个开源驱动能够完全支持3D加速, 即使是 Nouveau 驱动拥有3D加速. 只有闭源的 nvidia 支持完全的3D加速。

vesa

vesa 驱动是一个通用的视频驱动程序。

nv

nv 驱动通常比vesa驱动得到更好的性能,但是它没有包含在wheezy或者更新的版本中。

Nouveau

除了vesanv, Debian从squeeze开始包含Nouveau驱动. Nouveau驱动从官方NVIDIA驱动经过逆向工程得到。这些驱动都是实验性的,这个驱动是不推荐的,除非你的nv驱动有问题并且你不想使用nvidia驱动。 Nouveau 驱动从Wheezy开始变得稳定.

驱动安装

为了使用 nouveau 驱动, 你的内核 drm 版本和你的 libdrm 版本需要匹配。基本上安装可以以这种方式来做:

# apt-get install xserver-xorg-video-nouveau

然后 配置X并且设置 nouveau 作为你的设备驱动。

英伟达专有驱动

步骤

选择驱动程序版本

Debian 7 "Wheezy"有三种可用的驱动程序版本:

Debian 6.0 "Squeeze"有三种可用的驱动程序版本:

所有上面的驱动程序版本都只有 x86 和 x86-64 架构可用,分别对应 (Debian i386AMD64).

安装

Debian 7 "Wheezy"

版本 304.88

为了支持英伟达(?GeForce)6xxx 和更高的GPUs (支持的设备). 对于更老的设备,参见 Version 173.14.35 (legacy GPUs) and 版本 96.43.23 (legacy GPUs).

  1. 增加 "contrib" 和 "non-free" 组件到 /etc/apt/sources.list, 例如:

    # Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy main contrib non-free
  2. 更新的可用的软件包列表.安装适当的 linux-headers 和 kernel module 软件包:

    # aptitude update
    # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms
    • 这也将安装推荐的 nvidia-glx 软件包. DKMS将为系统构建nvidia模块。

  3. 使用 手动方式 或者 nvidia-xconfig,这将创建一个基本的xorg.conf文件

  4. 重启系统以在启动时将nouveau(内核驱动)加入黑名单.

版本 173.14.35 (legacy GPUs)

为了支持英伟达(?GeForce)5xxx / FX GPUs (支持的设备).

  1. 增加 "contrib" 和 "non-free" 组件到 /etc/apt/sources.list, 例如:

    # Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy main contrib non-free
  2. 更新的可用的软件包列表。安装适当的 linux-headers 和 kernel module软件包:

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

    这也将安装推荐的 nvidia-glx-legacy-173xx 软件包。DKMS将为系统构建nvidia模块。

  3. 使用 手动方式 或者 nvidia-xconfig,这将创建一个基本的xorg.conf文件

  4. 重启系统以在启动时将nouveau(内核驱动)加入黑名单.

版本 96.43.23 (legacy GPUs)

为了支持?GeForce 2, GeForce 3 和 GeForce 4 GPUs (支持的设备).

  1. 增加 "contrib" 和 "non-free" 组件到 /etc/apt/sources.list, 例如:

    # Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy main contrib non-free
  2. 更新的可用的软件包列表。安装适当的 linux-headers 和 kernel module软件包:

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

    这也将安装推荐的 nvidia-glx-legacy-96xx 软件包。DKMS将为系统构建nvidia模块。

  3. 使用 手动方式 或者 nvidia-xconfig,这将创建一个基本的xorg.conf文件.

  4. 重启系统以在启动时将nouveau(内核驱动)加入黑名单.

Debian 6.0 "Squeeze"

版本 195.36.31

为了支持英伟达 6xxx 和更新的 GPUs (supported devices), 以及包括一些 GeForce 400 系列的设备. 对于更老的设备, 参见 版本 173.14.27 (legacy GPUs)版本 96.43.18 (legacy GPUs).

  1. 增加 "contrib" 和 "non-free" 组件到 /etc/apt/sources.list, 例如:

    # Debian 6.0 "Squeeze"
    deb http://http.debian.net/debian/ squeeze main contrib non-free
  2. 更新的可用的软件包列表。安装适当的 linux-headers 和 kernel module软件包:

    # aptitude update
    # aptitude -r install linux-headers-2.6-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms
    • 这也将安装推荐的 nvidia-glx 软件包. DKMS将为系统构建nvidia模块。

  3. 更新 initial ramdisk 使其把 nouveau 包含在黑名单中.(613951):

    # update-initramfs -u
  4. 创建 Xorg server configuration 文件.

  5. 重启系统以在启动时将nouveau(内核驱动)加入黑名单.

版本 173.14.27 (legacy GPUs)

为了支持 GeForce 5xxx / GeForce FX GPUs (supported devices).

  1. 增加 "contrib" 和 "non-free" 组件到 /etc/apt/sources.list, 例如:

    # Debian 6.0 "Squeeze"
    deb http://http.debian.net/debian/ squeeze main contrib non-free
  2. 更新的可用的软件包列表。 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. 创建 Xorg server configuration 文件.

  5. 重启系统以在启动时将nouveau(内核驱动)加入黑名单.

版本 96.43.18 (legacy GPUs)

为了支持 GeForce 2, GeForce 3 and GeForce 4 GPUs (supported devices).

  1. 增加 "contrib" 和 "non-free" 组件到 /etc/apt/sources.list, 例如:

    # Debian 6.0 "Squeeze"
    deb http://http.debian.net/debian/ squeeze main contrib non-free
  2. 更新的可用的软件包列表。 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. 创建 Xorg server configuration 文件.

  5. 重启系统以在启动时将nouveau(内核驱动)加入黑名单.

配置

由于 Xorg不会自动检测英伟达显卡驱动,因此必须提供一个配置文件。例如:

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

上面的配置文件可以通过以下命令来创建:

请注意这个命令在使用了“英伟达-优驰”技术的系统中会破坏你的Xorg配置。对于这样的硬件, 参见 Bumblebee

这时候重启系统使 nouveau 驱动加入黑名单。

更多的配置信息 .

检查驱动是否工作

为了检查是否正在使用加速, 使用 glxinfo程序. 这个程序是在 mesa-utils 软件包中. 如果

$ glxinfo |grep rendering

返回值为 "direct rendering: Yes", 加速已经启用.

更多信息

另请参阅


CategoryProprietarySoftware