（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
（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.
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
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
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?title=Install_Beryl_on_Ubuntu_Edgy_with_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.
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.
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.
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.