NVIDIA显卡安装配置指南
nVidia 显卡安装配置指南
原文出处:https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia
原文作者:
授权许可:
翻译人员:
校正人员:
贡献人员:
适用版本: 文章状态:等待翻译
系统需求
- 命令 lspci | grep nVidia 输出一行文字
- 您需要3D硬件加速支持
- 您需要 TV-Out 支持
安装
允许 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 软件库.
- 选择屏幕上方的系统菜单.
- 选择系统管理, 新立得软件包管理器. 当提示消息时请输入密码.
- 在软件包管理器中, 选择设置菜单,然后选择软件库.
- 当出现软件源窗口时,点击添加按钮.
- 在 编辑软件库 窗口中,请确保选择了 Restricted copyright 复选框,然后按下确定按钮.
- 按下确定按钮以关闭软件源对话框, 当新立得软件包管理器问您是否重新加载软件源时,请选择 是 .
现在您可以添加很多额外的软件包了,NVIDIA驱动也包含在其中.
安装并激活驱动
可以通过右键单击所选的软件包并选择标记以便安装来安装该软件包.
注意:
- Click the Search button and search for "linux-restricted-modules". You must have restricted modules enabled (see above).
- 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.)
- Click the Search button and search for "nvidia".
- You will install either nvidia-glx-legacy or nvidia-glx. If your graphics card is at the end of this list of cards (marked as "legacy"), you will need to install nvidia-glx-legacy. Otherwise, install nvidia-glx.
- If you are going to compile 3D applications, install nvidia-glx-dev.
- 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.
- Click the Apply button to install the new packages.
- Once Synaptic has finished applying your changes, exit the application.
- Select the Applications menu at the top of the screen, then Accessories, then Terminal.
- 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
- 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.
- 单击 Search 搜索按钮并搜索 "linux-restricted-modules"。您必须要启用 restricted 软件库(参见上节)
- 找到与您内核匹配的模块。例如,如果您安装了 linux-image-amd64-k8,那么您将
- 如果您的显卡为 TNT, TNT2, TNT Ultra, GeForce1, 或 GeForce2, 请安装 nvidia-glx-legacy, 否则,请安装 nvidia-glx 软件包.
- 如果您准备编译3D应用程序,请安装 nvidia-glx-dev 软件包.
- 如果您的系统为 Hoary Hedgehog 或 Breezy Badger, 请安装 nvidia-settings 和 nvidia-xconfig 软件包. 在 Ubuntu 6.06 LTS中 不要 安装其他软件包因为其会删除 nvidia-glx 软件包.
- 单击 Search 搜索 按钮并搜索 "linux-restricted-modules". 您必须确保在Ubuntu软件仓库中选择了 restricted 模块 (见上方说明).
- 选择适合您内核的相关模块.例如如果您安装了 linux-image-amd64-k8 内核,您应该安装 linux-restricted-modules-amd64-k8软件包.
- 单击 Apply 应用 按钮来安装新的(已标记的)软件包.
- 一旦新立得软件包管理程序完成变更,将其关闭.
- 选择屏幕上方的 Applications 应用程序菜单,然后选择 Accessories 附件, Terminal 终端.
- 在终端窗口中输入如下命令:
sudo nvidia-xconfig
- 关闭所有程序,按下 Ctrl-Alt-Backspace 以重启 X server. 如果您在按下Ctrl-Alt-Backspace后看见 NVIDIA 标志的屏幕闪过, 则说明您的驱动已经安装正确了.
Nvidia Legacy Driver in Edgy
我在Edgy版Ubuntu下安装nvidia-glx-legacy 1.0.7184+2.6.17.6-1后, 用以上方法并不能驱动我的GeForce 1,必须自己修改配置文件/etc/X11/xorg.conf
的如下段落。
把
Section "Device" Identifier "NVIDIA Corporation NV10DDR [GeForce 256 DDR]" Driver "nv" BusID "PCI:1:0:0" EndSection
改成
Section "Device" Identifier "NVIDIA Corporation NV10DDR [GeForce 256 DDR]" Driver "nvidia" BusID "PCI:1:0:0" EndSection
如果在Section "Device"部分没有发现标为"nvidia"的驱动, 那运行modprobe nvidia会产生错误信息,sudo nvidia-glx-config也不能运行。做了以上修改后, 还要在文件末尾再加一个段落:
Section "Extensions" Option "Composite" "Disable" EndSection
加这个段落的操作并没有在legacy drivers中提到,但我们可以从/var/log/Xorg.0.log中的一个错误信息判断出来, 添加Extension段是有理由的。错误信息是:
/var/log/Xorg.0.log
:
默认情况下, Composite选项是打开的,这会禁止OpenGL的运行。以上设置会关闭Composite, 并且貌似只有legacy类型的驱动需要做这样的修改。
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.
- Select the Applications menu at the top of the screen, then Accessories and then Terminal.
- Type the following:
gksudo gedit /etc/X11/xorg.conf
or if you are using Kubuntu:
kdesu kate /etc/X11/xorg.conf
- Find the line Driver "nvidia" in the Device section
- Just after this line, add
Option "NoLogo"
- Save the file and exit
- 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.
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 withgksudo gedit /etc/X11/xorg.conf
orkdesu kate /etc/X11/xorg.conf
if using Kubuntu. Be sure that theDriver
entry underSection "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 NvidiaLaptopBinaryDriverSuspend
- 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 (returnssegmentation 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 DefaultDepth to 16.
- For other problems, please visit the forums at http://www.ubuntuforums.org
See Also
Install Nvidia proprietary drivers, Howto @gwos
Part of UserDocumentation
备注:
删除 nVidia 标志
如果您不想在启动界面之前显示 nVidia 标志,您需要手动编辑您的 Xorg 配置文件.
- 选择屏幕上方的 Applications 应用程序菜单,然后选择 Accessories 附件, Terminal 终端.
- 输入如下命令:
sudo gedit /etc/X11/xorg.conf
- 在Device一节中找到 "nvidia" 所在行
- 在该行后添加
Option "NoLogo"
- 保存文件并退出
- 关闭所有程序,按下 Ctrl-Alt-Backspace 以重启 X server. 如果标志消失且其他一切正常则说明更改已生效.
故障排除
- 某些情况下需要重新启动系统来使某些更改生效.如果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 模块不工作,请查看 NvidiaLaptopBinaryDriverSuspend
- 其他问题,请访问论坛 http://www.ubuntuforums.org