个人工具

NVIDIA显卡安装配置指南

来自Ubuntu中文

Wl1336412讨论 | 贡献2007年5月15日 (二) 22:28的版本

跳转至: 导航, 搜索

原文出处: <p class="line874">原文作者:

 

 

授权许可:

翻译人员:

校正人员:

贡献人员:

适用版本:

文章状态:等待翻译

 

 

 

1. 系统需求

 

  • 命令 lspci | grep nVidia 输出一行文字
  • 您需要3D硬件加速支持
  • 您需要 TV-Out 支持

 

2. 安装

 

 

2.1. 允许 restricted 软件包

 

Note: If you are running Ubuntu 6.10 (Edgy Eft) or later, the Restricted repositories might already be enabled. Also if you are running Kubuntu, gedit is not installed by default, so you should use kate instead of gedit.
注意:如果您正在运行的是 Ubuntu 6.10 (Edgy Eft) 或以后版本,Restricted 软件库则已被允许。如果您正在运行 Kubuntu 的话,gedit 缺省是没有安装的,您可以使用 kate 来代替 gedit。

NVIDIA驱动位与Ubuntu软件仓库的 "restricted" 模块中.因此,在准备安装该驱动前,请在您的系统中允许 restricted 软件库.

  1. 选择屏幕上方的系统菜单.

  2. 选择系统管理, 新立得软件包管理器. 当提示消息时请输入密码.

  3. 在软件包管理器中, 选择设置菜单,然后选择软件库.

  4. 当出现软件源窗口时,点击添加按钮.

  5. 编辑软件库 窗口中,请确保选择了 Restricted copyright 复选框,然后按下确定按钮.

  6. 按下确定按钮以关闭软件源对话框, 当新立得软件包管理器问您是否重新加载软件源时,请选择 是 .

现在您可以添加很多额外的软件包了,NVIDIA驱动也包含在其中.

 

2.2. 安装并激活驱动

 

可以通过右键单击所选的软件包并选择标记以便安装来安装该软件包.

注意:

  1. Click the Search button and search for "linux-restricted-modules". You must have restricted modules enabled (see above).

  2. Find the appropriate module for your kernel. For example, if you have linux-image-amd64-k8 installed, then you should install linux-restricted-modules-amd64-k8. Selecting one will also install nvidia-kernel-common. (Note: you have to select the restricted modules first because the nvidia-glx package automatically installs the i386 one - and if you have a generic kernel image, the X will not work.)

  3. Click the Search button and search for "nvidia".

  4. You will install either nvidia-glx-legacy or nvidia-glx. If your graphics card is at the end of <a class="http" href="http://download.nvidia.com/XFree86/Linux-x86/1.0-8762/README/appendix-a.html">this list of cards</a> (marked as "legacy"), you will need to install nvidia-glx-legacy. Otherwise, install nvidia-glx.

  5. If you are going to compile 3D applications, install nvidia-glx-dev.

  6. If you are running Hoary Hedgehog or Breezy Badger, then install nvidia-settings and nvidia-xconfig. DO NOT install either package in Ubuntu 6.06 LTS because it will remove nvidia-glx. These programs are now provided in nvidia-glx.

  7. Click the Apply button to install the new packages.

  8. Once Synaptic has finished applying your changes, exit the application.
  9. Select the Applications menu at the top of the screen, then Accessories, then Terminal.

  10. In the terminal window, if you are running Ubuntu 6.10 Edgy, type the following:
    • sudo nvidia-xconfig

If you are running an earlier version, type the following instead:

  • sudo nvidia-glx-config enable
  1. Close all your applications, then press Ctrl-Alt-Backspace, or restart your computer, to restart the X server. If you see an NVIDIA splashscreen after hitting Ctrl-Alt-Backspace, your drivers are properly installed.

  2. 单击 Search 搜索按钮并搜索 "linux-restricted-modules"。您必须要启用 restricted 软件库(参见上节)

  3. 找到与您内核匹配的模块。例如,如果您安装了 linux-image-amd64-k8,那么您将

  4. 如果您的显卡为 TNT, TNT2, TNT Ultra, <a class="nonexistent" href="http://127.0.0.1:8000/GeForce1">GeForce1</a>, 或 <a class="nonexistent" href="http://127.0.0.1:8000/GeForce2">GeForce2</a>, 请安装 nvidia-glx-legacy, 否则,请安装 nvidia-glx 软件包.

  5. 如果您准备编译3D应用程序,请安装 nvidia-glx-dev 软件包.

  6. 如果您的系统为 Hoary Hedgehog 或 Breezy Badger, 请安装 nvidia-settingsnvidia-xconfig 软件包. 在 Ubuntu 6.06 LTS中 不要 安装其他软件包因为其会删除 nvidia-glx 软件包.

  7. 单击 Search 搜索 按钮并搜索 "linux-restricted-modules". 您必须确保在Ubuntu软件仓库中选择了 restricted 模块 (见上方说明).

  8. 选择适合您内核的相关模块.例如如果您安装了 linux-image-amd64-k8 内核,您应该安装 linux-restricted-modules-amd64-k8软件包.

  9. 单击 Apply 应用 按钮来安装新的(已标记的)软件包.

  10. 一旦新立得软件包管理程序完成变更,将其关闭.
  11. 选择屏幕上方的 Applications 应用程序菜单,然后选择 Accessories 附件, Terminal 终端.

  12. 在终端窗口中输入如下命令:
    • sudo nvidia-xconfig(如果是6.06及以前的版本输入则:sudo nvidia-glx-config enable)
  13. 关闭所有程序,按下 Ctrl-Alt-Backspace 以重启 X server. 如果您在按下Ctrl-Alt-Backspace后看见 NVIDIA 标志的屏幕闪过, 则说明您的驱动已经安装正确了.

 

2.3. Nvidia Legacy Driver in Edgy

 

The above instructions did not work for me in Edgy on a <a class="nonexistent" href="http://127.0.0.1:8000/GeForce">GeForce</a> 1 using the legacy drivers nvidia-glx-legacy 1.0.7184+2.6.17.6-1. I had to manually edit /etc/X11/xorg.conf and change

  • Section "Device" <br />        Identifier      "NVIDIA Corporation NV10DDR [GeForce 256 DDR]"<br />        Driver          "nv"<br />        BusID           "PCI:1:0:0"<br />EndSection

to

  • Section "Device" <br />        Identifier      "NVIDIA Corporation NV10DDR [GeForce 256 DDR]"<br />        Driver          "nvidia"<br />        BusID           "PCI:1:0:0"<br />EndSection

If Driver "nvidia" is not found in xorg.conf then attempting to modprobe nvidia will result in an error message (thus sudo nvidia-glx-config enable would not work for me). After this change, to allow OpenGL programs to run the following had to be added to the bottom of /etc/X11/xorg.conf :

  • Section "Extensions" <br />        Option  "Composite" "Disable"<br />EndSection

This is not documented anywhere in the the legacy drivers (i.e. there is no mention of this in /usr/share/doc/nvidia-glx-legacy/*) but thankfully the following warning will appear in /var/log/Xorg.0.log:

  • (EE) GLX is not supported with the Composite extension

By default Composite is turned on and this will prevent OpenGL from working. The above stanza simply turns Composite off. These steps are probably only needed for the *legacy* driver.

 

2.4. Remove the nVidia logotype

 

If you want to get rid of the nVidia logotype that shows up before your login screen you need to perform some manual edits in the Xorg configuration file.

  1. Select the Applications menu at the top of the screen, then Accessories and then Terminal.

  2. Type the following:
    • gksudo gedit /etc/X11/xorg.conf
       or if you are using Kubuntu:
    
    • kdesu kate /etc/X11/xorg.conf
  3. Find the line Driver "nvidia" in the Device section
  4. Just after this line, add
    • Option          "NoLogo"
  5. Save the file and exit
  6. Close all your applications, then press Ctrl-Alt-Backspace to restart the X server. If the logotype is gone and everything seems to work you are done.

 

3. Troubleshooting

 

  • It seems that a reboot is sometimes necessary for these changes to take effect. If 3D acceleration isn't working, try this first.
  • If 3D acceleration still isn't working, be sure that you have the right version of linux-restricted-modules installed. It must match the version of the running kernel.

  • If you have the right version of linux-restricted-modules installed and 3D acceleration still isn't working, open your /etc/X11/xorg.conf file for editing with gksudo gedit /etc/X11/xorg.conf or kdesu kate /etc/X11/xorg.conf if using Kubuntu. Be sure that the Driver entry under Section "Device" is set to "nvidia".

  • You may need to activate the "kernel framebuffer device interface" in X server. Copy/paste the below command into the terminal. The terminal will then start stepping you through each configuration setting. Most of the settings can be left at their defaults by pressing the ENTER button, but when you get to "Select the desired X server driver" (question 2), make sure to select "nvidia" and NOT "nv". At question 7 ("Activate kernel framebuffer device interface?") select "yes". Finish the rest of the questions (the rest of the settings can be left at their defaults) and then restart X server (or just restart your computer). If, when you reboot, you can't see the login screen, but instead get a message saying "X server failed to start (etc. etc.)", you will start in text mode (white text on black background) and it will ask you to login. After logging you will still be in text mode. Retype the same command below (make sure to write it down!) and then the configuration sequence will start again. This time at the "Activate kernel framebuffer device interface?") select "no" then restart your computer and your login screen will be restored.
    sudo dpkg-reconfigure xserver-xorg
  • If you get an error while loading NVIDIA module try to rebuild module dependencies by running depmod.
    sudo depmod
  • If suspend no longer works, see <a class="nonexistent" href="http://127.0.0.1:8000/NvidiaLaptopBinaryDriverSuspend">NvidiaLaptopBinaryDriverSuspend</a>

  • If you're feeling frisky and decide to fiddle around with the X Server Options for your Device in /etc/X11/xorg.conf and Firefox refuses to load (returns segmentation fault when launched from a terminal), this line may be the culprit:

    Option "NoRenderExtension" "On"

    Either comment it out (using a # at the beginning the line) or set it to Off.

  • If you have problems with video playback, e.g. in mplayer, gxine, or mythtv frontend with a legacy card, it maybe too high a color depth (e.g. using NT6 Vanta/Vanta LT nvidia driver, I experienced flickering vertical bars & blue screen flashing). To fix this, manually edit /etc/X11/xorg.conf and change <a class="nonexistent" href="http://127.0.0.1:8000/DefaultDepth">DefaultDepth</a> to 16.

  • For other problems, please visit the forums at <a class="http" href="http://www.ubuntuforums.org">http://www.ubuntuforums.org</a>

 

4. See Also

 

<a class="http" href="http://doc.gwos.org/index.php/Latest_Nvidia_Edgy">Install Nvidia proprietary drivers, Howto @gwos</a>

Part of <a href="http://127.0.0.1:8000/UserDocumentation">UserDocumentation</a>

<a href="http://127.0.0.1:8000/CategoryDocumentation">CategoryDocumentation</a> <a href="http://127.0.0.1:8000/CategoryCleanup">CategoryCleanup</a>

备注:

 

4.1. 删除 nVidia 标志

 

如果您不想在启动界面之前显示 nVidia 标志,您需要手动编辑您的 Xorg 配置文件.

  • 1.选择屏幕上方的 Applications 应用程序菜单,然后选择 Accessories 附件, Terminal 终端.

  • 输入如下命令:
    • sudo gedit /etc/X11/xorg.conf
  • 在Device一节中找到 "nvidia" 所在行
  • 在该行后添加
    • Option          "NoLogo"
  • 保存文件并退出
  • 关闭所有程序,按下 Ctrl-Alt-Backspace 以重启 X server. 如果标志消失且其他一切正常则说明更改已生效.

 

5. 故障排除

 

  • 某些情况下需要重新启动系统来使某些更改生效.如果3D加速没有起作用,请先重启试试.
  • 如果3D加速在重启后依旧没有工作,请确保您选择了linux-restricted-modules软件包的正确版本.该版本必须与您的内核版本一致.
  • 如果您的linux-restricted-modules版本正确但是3D加速依旧没有工作,打开 /etc/X11/xorg.conf 文件进行编辑 sudo gedit /etc/X11/xorg.conf 并确保Section "Device" 条目下面 Driver 项目设置成 "nvidia".

  • 如果您在加载NVIDIA模块时出现错误,请通过运行depmod命令来重建模块依赖关系.
    sudo depmod
  • 如果 suspend 模块不工作,请查看 <a class="nonexistent" href="http://127.0.0.1:8000/NvidiaLaptopBinaryDriverSuspend">NvidiaLaptopBinaryDriverSuspend</a>

  • 其他问题,请访问论坛 <a class="http" href="http://www.ubuntuforums.org">http://www.ubuntuforums.org</a>

BinaryDriverHowto/Nvidia (2007-03-12 08:38:41由localhost