“UbuntuHelp:NvidiaManual”的版本间的差异
来自Ubuntu中文
小 (New page: {{From|https://help.ubuntu.com/community/NvidiaManual}} {{Languages|php5}} '''This is not the recommended way to install the Nvidia drivers. Please see [[UbuntuHelp:BinaryDriverHowto/Nvidi...) |
小 |
||
第11行: | 第11行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup | sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup | ||
− | </nowiki></ | + | </nowiki></pre> |
Next, download the right drivers for your platform from [http://www.nvidia.com/object/unix.html here], and save them to your home directory. | Next, download the right drivers for your platform from [http://www.nvidia.com/object/unix.html here], and save them to your home directory. | ||
第18行: | 第18行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo apt-get install build-essential linux-headers-`uname -r` | sudo apt-get install build-essential linux-headers-`uname -r` | ||
− | </nowiki></ | + | </nowiki></pre> |
attachment:IconsPage/IconDialog-Warning1.png '''This next step is optional.''' Most people willnot need it, and it takes a fair amount of bandwidth and diskspace. It installs the Linux kernel source. If later steps fail, consider this a last resort. | attachment:IconsPage/IconDialog-Warning1.png '''This next step is optional.''' Most people willnot need it, and it takes a fair amount of bandwidth and diskspace. It installs the Linux kernel source. If later steps fail, consider this a last resort. | ||
第26行: | 第26行: | ||
sudo tar xvjf linux-source-`uname -r` | sudo tar xvjf linux-source-`uname -r` | ||
sudo ln -s linux-source-`uname -r` /usr/src/linux | sudo ln -s linux-source-`uname -r` /usr/src/linux | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Remove Conflicting Software === | === Remove Conflicting Software === | ||
第35行: | 第35行: | ||
<pre><nowiki> | <pre><nowiki> | ||
DISABLED_MODULES="" | DISABLED_MODULES="" | ||
− | </nowiki></ | + | </nowiki></pre> |
replace it with: | replace it with: | ||
<pre><nowiki> | <pre><nowiki> | ||
DISABLED_MODULES="nv" | DISABLED_MODULES="nv" | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Prepare Configuration Files === | === Prepare Configuration Files === | ||
第46行: | 第46行: | ||
<pre><nowiki> | <pre><nowiki> | ||
gksudo gedit /etc/X11/xorg.conf | gksudo gedit /etc/X11/xorg.conf | ||
− | </nowiki></ | + | </nowiki></pre> |
Find the section <code><nowiki>Module</nowiki></code> and comment out DRI using the # symbol, such as in the following example. | Find the section <code><nowiki>Module</nowiki></code> and comment out DRI using the # symbol, such as in the following example. | ||
第63行: | 第63行: | ||
Load "vbe" | Load "vbe" | ||
EndSection | EndSection | ||
− | </nowiki></ | + | </nowiki></pre> |
Now find the section <code><nowiki>Device</nowiki></code>, and change the Driver from '''nv''' (or vesa, fb, etc) to '''nvidia''', as in the following example, and then save it. | Now find the section <code><nowiki>Device</nowiki></code>, and change the Driver from '''nv''' (or vesa, fb, etc) to '''nvidia''', as in the following example, and then save it. | ||
<pre><nowiki> | <pre><nowiki> | ||
第70行: | 第70行: | ||
Driver "nvidia" #This is where you change it | Driver "nvidia" #This is where you change it | ||
EndSection | EndSection | ||
− | </nowiki></ | + | </nowiki></pre> |
Now that your Xorg.conf is saved, we need to shutdown the X11 server so that we can install the new drivers. To do this, save your work and press <code><nowiki>ctrl-alt-f1</nowiki></code>, and log in. Then run the following command to shutdown X11. '''Make sure your work is saved, Gnome is going to shutdown too'''. | Now that your Xorg.conf is saved, we need to shutdown the X11 server so that we can install the new drivers. To do this, save your work and press <code><nowiki>ctrl-alt-f1</nowiki></code>, and log in. Then run the following command to shutdown X11. '''Make sure your work is saved, Gnome is going to shutdown too'''. | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo /etc/init.d/gdm stop | sudo /etc/init.d/gdm stop | ||
− | </nowiki></ | + | </nowiki></pre> |
=== Install the Driver === | === Install the Driver === | ||
第82行: | 第82行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo chmod +x NVIDIA* | sudo chmod +x NVIDIA* | ||
− | </nowiki></ | + | </nowiki></pre> |
Useful tip, typing the first few letters and hitting the <code><nowiki>tab</nowiki></code> key will autocomplete the name, saving you from using wildcards like * | Useful tip, typing the first few letters and hitting the <code><nowiki>tab</nowiki></code> key will autocomplete the name, saving you from using wildcards like * | ||
第89行: | 第89行: | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo ./NVIDIA* | sudo ./NVIDIA* | ||
− | </nowiki></ | + | </nowiki></pre> |
attachment:IconsPage/IconDialog-Warning1.png '''Warning!''' If you're using Breezy Badger (5.10), then you will need to use the following commands '''instead of the one above''': | attachment:IconsPage/IconDialog-Warning1.png '''Warning!''' If you're using Breezy Badger (5.10), then you will need to use the following commands '''instead of the one above''': | ||
第95行: | 第95行: | ||
sudo apt-get install gcc-3.4 | sudo apt-get install gcc-3.4 | ||
CC=gcc-3.4 sudo ./NVIDIA* | CC=gcc-3.4 sudo ./NVIDIA* | ||
− | </nowiki></ | + | </nowiki></pre> |
The installer will now walk you through the steps required. Assuming success, you can now restart your X11 server using | The installer will now walk you through the steps required. Assuming success, you can now restart your X11 server using | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo /etc/init.d/gdm start | sudo /etc/init.d/gdm start | ||
− | </nowiki></ | + | </nowiki></pre> |
=== It didn't work! === | === It didn't work! === |
2007年5月13日 (日) 12:50的版本
This is not the recommended way to install the Nvidia drivers. Please see UbuntuHelp:BinaryDriverHowto/Nvidia for the supported method
Sometimes, using the available nvidia-glx package in Ubuntu is not feasable for the user, either because of bugs that are present in the older version, or because the user will obtain a needed feature using the official drivers. The purpose of this page is to detail the neccessary work to install the official Nvidia drivers from Nvidia.com. Note that this will not fix resolution problems, for that you need to go Here.
目录
Obtaining Needed Software
Before you begin, it is strongly advised that your already have Xorg working acceptably with the 'nv' drivers included. First, make sure that your /etc/X11/xorg.conf is backed up.
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
Next, download the right drivers for your platform from here, and save them to your home directory.
Open a terminal, and run the following command:
sudo apt-get install build-essential linux-headers-`uname -r`
attachment:IconsPage/IconDialog-Warning1.png This next step is optional. Most people willnot need it, and it takes a fair amount of bandwidth and diskspace. It installs the Linux kernel source. If later steps fail, consider this a last resort.
sudo apt-get install linux-source-`uname -r` cd /usr/src sudo tar xvjf linux-source-`uname -r` sudo ln -s linux-source-`uname -r` /usr/src/linux
Remove Conflicting Software
Using Synaptic or Apt, uninstall nvidia-glx, nvidia-settings, and nvidia-kernel-common packages. These will cause the dreaded "version mismatch" X error.
Alternatively, edit the /etc/default/linux-restricted-modules-common file. Open it with an editor and find the line:
DISABLED_MODULES=""
replace it with:
DISABLED_MODULES="nv"
Prepare Configuration Files
The next step is to edit your xorg.conf file. Open it with an editor,
gksudo gedit /etc/X11/xorg.conf
Find the section Module
and comment out DRI using the # symbol, such as in the following example.
Section "Module" Load "bitmap" Load "dbe" Load "ddc" # Load "dri" <------ this is 'commented' Load "extmod" Load "freetype" Load "glx" Load "int10" Load "record" Load "type1" Load "vbe" EndSection
Now find the section Device
, and change the Driver from nv (or vesa, fb, etc) to nvidia, as in the following example, and then save it.
Section "Device" Identifier "Card0" Driver "nvidia" #This is where you change it EndSection
Now that your Xorg.conf is saved, we need to shutdown the X11 server so that we can install the new drivers. To do this, save your work and press ctrl-alt-f1
, and log in. Then run the following command to shutdown X11. Make sure your work is saved, Gnome is going to shutdown too.
sudo /etc/init.d/gdm stop
Install the Driver
Now we need to run the Nvidia installer script. First, it needs to be made executable.
sudo chmod +x NVIDIA*
Useful tip, typing the first few letters and hitting the tab
key will autocomplete the name, saving you from using wildcards like *
For Dapper users: now that you can run the script, you do so with the following command; make sure to include the ./
:
sudo ./NVIDIA*
attachment:IconsPage/IconDialog-Warning1.png Warning! If you're using Breezy Badger (5.10), then you will need to use the following commands instead of the one above:
sudo apt-get install gcc-3.4 CC=gcc-3.4 sudo ./NVIDIA*
The installer will now walk you through the steps required. Assuming success, you can now restart your X11 server using
sudo /etc/init.d/gdm start
It didn't work!
If the installer fails, go through the following checklist
- Was Xorg already properly configured for the nv drivers?
- Did you remove the nvidia-glx, nvidia-settings, and nvidia-kernel-common packages installed via apt or synaptic?
- Did you read the log found in /var/log/nvidia-installer-log for errors that can guide you?
- Did you install the kernel headers (and possibly source package)?
- Did you check the Nvidia readme found on their site to make sure your card is supported with that version of driver?
- Did you check the Nvidia Linux Forums for any current 'known issues' with the latest drivers?
- Did you ask in #ubuntu on irc.freenode.net?
CategoryDocumentation CategoryCleanup