我的安装nvidia驱动的方法

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
loves
帖子: 30
注册时间: 2005-09-13 17:43

我的安装nvidia驱动的方法

#1

帖子 loves » 2007-02-12 20:43

看到很多朋友在装nvidia驱动时碰到很多问题,我也碰到过。后来看到一个方法很好,朋友们可以试用一下
(1)到nvidia网站上下载nvidia的驱动
(2)进入控制台下(同时按下Ctrl, Alt, F1),在终端输入sudo /etc/init.d/gdm stop
(3)安装驱动sudo sh ./<nvidia_installation_pkg_filename>
(4)sudo nvidia-xconfig --add-argb-glx-visuals(到时就可以用beryl了)
(5)sudo /etc/init.d/gdm start

这时驱动就正常工作了,但会有一个问题,就是重新启动不能进入X,这是因为系统会调用内核中默认的nv驱动,所以需要禁掉。
(6)sudo rmmod nvidia && sudo modprobe nvidia
(7)sudo cp /etc/default/linux-restricted-modules-common /etc/default/_linux-restricted-modules-common.backup,并修改此文件,在这句中加入DISABLED_MODULES="nv"
按照这样安装之后,我的系统就可以正常工作了

附上英文手册,本人英文不行,有些步骤是猜测的,希望英文好的朋友,能够翻译一下

Users planning to install the officially distributed version of the beta nVidia drivers should be advised that X.org may fail to start upon upgrading the kernel as modules are built for specific kernel configurations. Thus, installing from a repository (see Install Beryl on Ubuntu Edgy with nVidia#Installing the nVIDIA Beta Driver) is recommended. The following instructions, however, document methods for performing the installation of the official packages, should you decide to make use of them.

[edit]Retrieval of package files from the nVidia webserver
To retrieve the current version of the nVidia driver complied for 32-bit x86 systems, execute:

wget http://us.download.nvidia.com/XFree86/L ... 6-pkg1.run
Otherwise, if you are using an AMD64/EM64T system, you may run

wget http://us.download.nvidia.com/XFree86/L ... 6-pkg2.run
instead.

[edit]Installation of packages required to build kernel modules
Because the process of installing nVidia driver involves some compilation, it is necessary to install some header files, software, and libraries. To do so, simply issue:

sudo apt-get install linux-headers-$(uname -r) build-essential
[edit]About TTY sessions
Note: This section is intended mainly for inexperienced users. If you are experienced using Linux and are confident you will be able to work effectively in a TTY (teletypewriter) environment, see Install Beryl on Ubuntu Edgy with nVidia#Running the nVidia installation package.

For the installation of the official packages to be possible, it is necessary to temporarily shut down the X server, meaning that for a brief period of time, you will not have access to a graphical interface. For this reason, viewing this documentation in Firefox or any other graphical browser is not possible if you only have one computer available for use.

To continue viewing this documentation while performing the installation of the driver, it is necessary to first install a browser which requires no graphical environment to operate.

It is extremely likely that you are currently viewing output from the X server from TTY0. Thus to access a graphical environment whenever an implementation of the X Window System is running, one should press CTRL + ALT + F7. Making note of this important keystroke combination is advisable.

A recommended means to access the documentation on this webpage from a command line interface is to launch links while the X.org is still running. Select a terminal to use for viewing the documentation; the teletypewriter interfaces available most likely include TTY1-TTY6. To access any one of the these terminals, press CTRL + ALT + Ftty_number, where tty_number corresponds to terminal you wish to view. For instance, to access TTY2, one would press CTRL + ALT + F2.

Links will access any URL passed to it in the form of a command line argument immediately. However, switching to and from the graphical environment to transfer the URI from the browser into the TTY interface may prove to be unpleasant and frustrating. To ease the process, you might run

echo "http://wiki.beryl-project.org/index.php ... ith_nVidia" > beryl-nvidia-doc-uri
which will create a text file containing the URI that corresponds to this page.

To view the documentation, you should run the command above if you have not already. Install Links by running

sudo aptitude install links
Now, press CTRL + ALT + F2 to access TTY2 (assuming it is not in use, if so, you may select a different terminal; also recall that CTRL + ALT + F7 will return you to the graphical interface while X.org is running) and execute

links $(cat beryl-nvidia-doc-uri)
You may scroll across documents using either the arrow keys or Page Up and Page Down buttons. Press q at anytime to quit Links and return to your TTY interface. Of course, running the above command again will return you to the documentation after Links is closed. <RETURN> accesses links to other webpages, and <BACKSPACE> will cause links to return to the most recently viewed webpage.

Copying and pasting across multiple TTY terminals may not be possible, and therefore the user is encouraged to use <TAB> completion whenever possible. Assuming no other files in your home directory or in your path contain "NVIDIA", it possible to insert the name of the previously downloaded file simply by entering

sudo sh ./NVIDIA<TAB>
into the terminal. The above keystokes should result in, for instance

sudo sh ./NVIDIA-Linux-x86-1.0-9746-pkg1.run
being displayed. Thus, it is not always necessary to type long filenames manually.

Now, press CTRL + ALT + F1 to access TTY1. Assuming the terminal is not in use, you will now be able to log in and perform tasks related to the installation of the nVidia drivers without the need for X11.

[edit]Running the nVidia installation package
For the installation of the nVidia drivers to continue, X.org must be shut down. Note that after executing the following command, it is not possible to return to a graphical interface until X.org is restarted.

One way to shutdown the X.org server is by stopping GDM. To do so, execute

sudo /etc/init.d/gdm stop
Now, actually running the installer is possible. Run

sudo sh ./<nvidia_installation_pkg_filename>
where <nvidia_installation_pkg_filename> is the filename of the previously downloaded package. The actual installation and compilation of the kernel modules is automatic and, in general, the selection of the default choice at each prompt should suffice. However, you should not run the nvidia-xconfig (configuration) utility from the installation, please wait until after the installation to do so (the default invocation will not enable the required ARGBGLXVisuals option in /etc/X11/xorg.conf).

After the installation of the drivers is complete, a prompt will appear. Execute

sudo nvidia-xconfig --add-argb-glx-visuals
and restart GDM and X11 with

sudo /etc/init.d/gdm start
In most cases, the graphical interface should reappear immediately. If not, please see Install Beryl on Ubuntu Edgy with nVidia#If problems with an installation with an official package occur.

[edit]Upon upgrading the kernel at a later time
Unfortunately, X11 will most likely refuse to start if the kernel is upgraded after a manual installation of the nVidia drivers. Because new modules will need to be compiled and installed, it is necessary to rerun the installation procedures documented above (see Install Beryl on Ubuntu Edgy with nVidia#Running the nVidia installation package), with one exception: nvidia-xconfig will not need to be reinvoked in most cases.

[edit]If problems with an installation with an official package occur
After the installation of the official nVidia package, it is possible (though perhaps unlikely) that X11 will refuse due its attempt to utilize the older version of the nVidia kernel module. In such a situation, you should unload and subsequently reload the nvidia kernel module by running:

sudo rmmod nvidia && sudo modprobe nvidia

--------------------------------------------------------------------------------

In the case that the user receives an API mismatch error upon restarting Ubuntu, it is necessary disable the "nv" module. To simultaneously backup linux-restricted-modules-common and automatically disable the nv module, you may execute:

sudo cp /etc/default/linux-restricted-modules-common /etc/default/_linux-restricted-modules-common.backup && sudo sed -i -e 's/^DISABLED_MODULES="/DISABLED_MODULES="nv /' -e 's/ "/"/' /etc/default/linux-restricted-modules-common
Or, to simultaneously backup linux-restricted-modules-common and edit the file manually, run:

sudo cp /etc/default/linux-restricted-modules-common /etc/default/_linux-restricted-modules-common.backup && sudo nano /etc/default/linux-restricted-modules-common
and add "nv, " the following line:

DISABLED_MODULES="nv, [...]" # Edit only this line.
ghost0
帖子: 364
注册时间: 2006-08-11 0:28

#2

帖子 ghost0 » 2007-02-12 21:47

nv的驱动源里更新还是比较及时的,好像没什么必要手动装
helai
帖子: 216
注册时间: 2007-01-28 21:27

#3

帖子 helai » 2007-02-22 18:31

不错
我安装时有错误消息
WARNING: You appear to be using a modular Xorg release, but nvidia-installer
was unable to determine the correct X library installation path with
the `pkg-config` utility. Please install the Xorg SDK/development
package for your distribution.
WARNING: nvidia-installer was unable to determine the correct X library
installation path and will install the NVIDIA X libraries to
'/usr/lib'.
WARNING: You appear to be using a modular Xorg release, but nvidia-installer
was unable to determine the correct X module installation path with
the `pkg-config` utility. Please install the Xorg SDK/development
package for your distribution.
WARNING: nvidia-installer was unable to determine the correct X module
installation path and will install the NVIDIA X driver components to
'/usr/lib/xorg/modules'. If X fails to find the NVIDIA X driver
module, please correct any `pkg-config` problems warned about earlier
and reinstall the driver.

不知道如何解决?
RolandZheng
帖子: 13
注册时间: 2007-02-23 13:34

#4

帖子 RolandZheng » 2007-02-24 13:38

:o 根据你的方法安装成功
头像
嗜血的兔子
帖子: 208
注册时间: 2005-11-11 5:10

#5

帖子 嗜血的兔子 » 2007-02-25 9:00

前几天碰见这问题,到现在也没有解决,一会用你的方法试试
头像
dzhsurf
帖子: 221
注册时间: 2007-02-21 17:06
来自: 广州

#6

帖子 dzhsurf » 2007-02-25 10:06

helai 写了:不错
我安装时有错误消息
WARNING: You appear to be using a modular Xorg release, but nvidia-installer
was unable to determine the correct X library installation path with
the `pkg-config` utility. Please install the Xorg SDK/development
package for your distribution.
WARNING: nvidia-installer was unable to determine the correct X library
installation path and will install the NVIDIA X libraries to
'/usr/lib'.
WARNING: You appear to be using a modular Xorg release, but nvidia-installer
was unable to determine the correct X module installation path with
the `pkg-config` utility. Please install the Xorg SDK/development
package for your distribution.
WARNING: nvidia-installer was unable to determine the correct X module
installation path and will install the NVIDIA X driver components to
'/usr/lib/xorg/modules'. If X fails to find the NVIDIA X driver
module, please correct any `pkg-config` problems warned about earlier
and reinstall the driver.

不知道如何解决?
是没有安装pkg-config吗?
sudo apt-get install pkg-config试试
头像
booker
帖子: 116
注册时间: 2006-04-22 10:50
来自: Mito
联系:

#7

帖子 booker » 2007-02-25 12:31

官方驱动,自己编译内核模块,然后让它自己修改xorg.conf就可以了。要用beryl的话,再自己修改xorg.conf,加上相应的选项,例如:

代码: 全选

    Option         "AddARGBGLXVisuals" "True"
    Option         "TripleBuffer" "true"
Ubuntu only now on Dell XPS M1710
helai
帖子: 216
注册时间: 2007-01-28 21:27

#8

帖子 helai » 2007-03-04 10:46

sudo apt-get install build-essential pkg-config xserver-xorg-dev
efort
帖子: 6
注册时间: 2008-04-05 23:21

Re: 我的安装nvidia驱动的方法

#9

帖子 efort » 2009-05-04 9:07

不成功,提示x系统还在运行。
回复