主 選 單
 登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!
 版面風格

(10 個版面風格)
站長部落格 - lutuni 的日誌
 訂閱 lutuni 的日誌

2010/04/02
vga

作者: lutuni (12:09 pm)
Optional Step: If you'd rather install the latest RC drivers, do the following instead.

If you are on 32bit Ubuntu, run:
Code:

wget ftp://download.nvidia.com/XFree86/Linux-x86/190.42/NVIDIA-Linux-x86-190.42-pkg0.run -O NVIDIA-Linux-190.42.pkg.run

If you are on 64bit Ubuntu, run:
Code:

wget ftp://download.nvidia.com/XFree86/Linux-x86_64/190.42/NVIDIA-Linux-x86_64-190.42-pkg0.run -O NVIDIA-Linux-190.42.pkg.run

And again, move the installer to the /usr/src folder and make a link to the file.
Code:

sudo install NVIDIA-Linux-190.42.pkg.run /usr/src
sudo ln -fs /usr/src/NVIDIA-Linux-190.42.pkg.run /usr/src/nvidia-driver


Kill X
Now, it's time to stop X and the gdm (or kdm for Kubuntu Users)
This requires that you logout and switch to another tty console ( Ctrl+Alt+F1 ).

Login to the shell, and kill gdm:
Code:

sudo /etc/init.d/gdm stop

This may take a while to complete.

In some rare instances, stopping gdm won't stop Xorg, due to the Xsession being busy with whatever error has occurred (Ubuntu goes into Low Resolution mode, X failed to start, etc).
In these instances, it is required that you run a kill of Xorg before you can continue with the installation of the driver.
Code:

sudo killall Xorg


Installing NViDIA
Afterwards, its time to install the drivers.
Code:

sudo sh /usr/src/nvidia-driver

Follow the instructions, and everything should run smoothly. A few points that I'd like to reassure first though:

* Don't worry about pre-compiled binaries, just let the script compile the drivers itself.
* If you run a 64bit OS, then let NViDIA install the 32bit backward compatibility modules.
* When asked, double check to ensure you select 'NO' when the NViDIA installer asks to reconfigure the xorg.conf file.
We don't want to change the xorg.conf file just yet, at least not until we are back in X.


Once finished, it is now time to reboot:
Code:

sudo reboot


Before you Initiate the Driver
Now, since NViDIA didn't reconfigure the xorg.conf file, you will boot into the VESA drivers. To setup the xorg.conf file for nvidia, login, open a terminal, and run:
Code:

sudo cp /etc/X11/xorg.conf.original /etc/X11/xorg.conf
sudo nvidia-xconfig

Note: You may see this being outputted into the console
Quote:
Using X configuration file: "/etc/X11/xorg.conf".

VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
Device section "Configured Video Device" must have a Driver
line.

Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'
Ubuntu uses an automagically configured xorg.conf file, and nvidia-xconfig flags it only as a parser warning, and serves only as a warning. This does not affect the outputted xorg.conf file generated by the nvidia script, and you blissfully ignore it.

Now, not everyone may experience a smooth transition, and there are a number of small problems that you may run into that need addressing first. The most common one probably being a non-existent module listed in the xorg.conf file.

And if you have had a successful transition, and everything works. The first thing you may notice is a nice new NViDIA splash logo that you probably want to be removed too. If you get this, just run the following:
Code:

sudo sed -i '/Section\s*.Screen./a\ Option "NoLogo" "True"' /etc/X11/xorg.conf

For further information on fixing common problems, scroll down the thread to see if you are affected by one of them.


X Time
And that is it! To reload into your new nvidia drivers, close all running applications and logout/login again.
If you are running Ubuntu Hardy/Intrepid, this can be done by pressing Ctrl+Alt+Backspace.
If you are running Ubuntu Jaunty, then you'll have to manually logout, or in some cases, reboot your machine in order for the new driver to load and work.


Keep in sync with kernel updates
Now with custom compiled nvidia modules, you'll have to ensure that the drivers get recompiled whenever a new kernel gets released.
For reference on how to do this, follow this thread to set it up: http://ubuntuforums.org/showthread.php?t=835573

But, for clarification, open a new file named update-nvidia
Code:

gedit update-nvidia

Paste in the script listed in the thread, save and quit. Then run:
Code:

sudo mkdir -p /etc/kernel/postinst.d
sudo install update-nvidia /etc/kernel/postinst.d

to install the script.


Setting up Twin Graphics Cards
Some people I have been supporting use twin view with two NViDIA graphics cards. While this is perfectly fine, you may run into problems if your xorg.conf file is setup to handle only one card.

Such a setup will look like this when you go to edit the xorg.conf file.
PHP Code:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
To work around the issue, it is best advised to remove the secondary card from the computer, boot up and acquire the output of the following.
Code:

lspci | grep VGA

and you should see something like this:
Quote:
04:00.0 VGA compatible controller: nVidia Corporation GeForce 9800 GX2 (rev a2)
Make a note of the Bus ID of the card, and edit the xorg.conf file.
Code:

sudo nano /etc/X11/xorg.conf

Scroll to the Device section and add the Bus ID to the conf file, except remove all leading zeros, replace the period with a colon, and add 'PCI' as a prefix.
So, our example of 04:00.0 becomes:
PHP Code:
Section "Device"
BUSID "PCI:4:0:0"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
After doing this, save the file, then shutdown the workstation and reinsert the second GFX card back into the machine.


Folding@Home
Please don't ask any support questions on F@H, I am not the one to ask. There have been a few notes of people not being able to get F@H working after running through this guide.

Just for reference, someone has written a general walkthrough here.

When I get round to it, I'll look into setting it up cleanly and you'll see it here.


EDID Issues
This is a work-in-progress section that will be updated over the next week or so.
In this section I will attempt to address the rare cases that the EDID of the monitor is incorrect/invalid, and this forces the nvidia driver to load into a low resolution.

The way you can tell if you are affected by this is by running the following:
Code:

grep -n "EDID" /var/log/Xorg*log

If you see something along the lines of the following quote, then you are affect by the issue.
Quote:
(WW) NVIDIA(GPU-0): The EDID read for display device DFP-0 is invalid: the
(WW) NVIDIA(GPU-0): checksum for EDID version 1 extension is invalid.

Troubleshooting and Errors
So even after following the guide, it still doesn't work? Your situation is far greater than a simple "it works" or "it doesn't work".
Taking that small bit of effort into finding out why X won't start and working around it using what utilities you have at your dispense so you can work around it can go a long way, even if there is a small learning curve or eye training involved.

In the event that it doesn't work, switch to a tty console, login, and use the following techniques to debug X.

Review your xorg.conf file
Code:

grep -n "^(EE)" /var/log/Xorg*log

This will tell you if there are any errors with your '/etc/X11/xorg.conf' file.

If there is an error emitted, for example:
Quote:
(EE) Failed to load module "type1" (module does not exist, 0)
The module 'type1' doesn't exist on your system, to fix, open up your xorg.conf file and remove the line which references the module that doesn't exist.

Review the output of syslog
Code:

grep -i "nvidia\|NVRM" /var/log/syslog

If the Xorg.log errors are vague, this will hopefully return a more verbose answer as to why X is failing.

Another example of a typical error:
Quote:
Apr 7 23:03:57 intrepid kernel: [79531.760530] NVRM: API mismatch: the client has the version 185.18, but
Apr 7 23:03:57 intrepid kernel: [79531.760531] NVRM: this kernel module has the version 177.82. Please
Apr 7 23:03:57 intrepid kernel: [79531.760532] NVRM: make sure that this kernel module and all NVIDIA driver
Apr 7 23:03:57 intrepid kernel: [79531.760534] NVRM: components have the same version.
We have 2 versions of the same driver in conflict!

Usually this is because the old module is still in cache, and hasn't been unloaded yet. But in most cases, if a reboot doesn't solve it, then make sure you have removed all installed nvidia references with "--purge"
Code:

sudo aptitude purge $(dpkg -l | grep nvidia | awk '{print $2}')

and then reinstall the driver again for good measure.


Uninstalling NViDIA Drivers
If all else fails and you just can't make it work, or you aren't fully satisfied with the driver and wish to return to the maintained driver in the Ubuntu repositories.
Then you can easily uninstall the driver by running the following:
Code:

sudo nvidia-uninstall
sudo dpkg-reconfigure -phigh xserver-xorg
sudo apt-get install xserver-xorg-video-all
sudo rm /usr/src/nvidia-driver /usr/src/NVIDIA-Linux-185.pkg.run /etc/kernel/postinst.d/update-nvidia

And when you restart X, your desktop will load with the defaulted failsafe drivers, then run the 'Hardware Drivers' utility to restore NViDIA.


Help and Feedback
Please review this HowTo, and express anything you think should be added, changed, and/or removed.

If you would like support, after X fails to start, switch to a tty console, login, and run the following:
Code:

sudo /etc/init.d/gdm stop
sudo nvidia-bug-report.sh
sudo dpkg-reconfigure -phigh xserver-xorg
sudo /etc/init.d/gdm start

Then attach the nvidia-bug-report.log.gz file to your post, and I'll do my best to look into just where you are going wrong.

Lastly, if it is of any help, you may wish to review the NViDIA Readme documents listed for the x86 (Ubuntu 32bit) or the x86_64 (Ubuntu 64bit) drivers for any further information and help on getting your drivers setup and working properly.
Also, if you your problem is obscure, you may have better luck asking on the NViDIA forums: http://www.nvnews.net/vbulletin/forumdisplay.php?f=14

Regards
Iain
Last edited by ibuclaw; October 28th, 2009 at 01:32 PM..
ibuclaw is offline Reply With Quote
ibuclaw
View Public Profile
Send a private message to ibuclaw
Find More Posts by ibuclaw
Old April 14th, 2009 #2
TheDesertDragon
5 Cups of Ubuntu

Join Date: Oct 2008
Beans: 27

Re: HowTo: NViDIA 185.19 Beta Drivers in Intrepid
Continuation of:
http://ubuntuforums.org/showthread.php?t=1124372&page=4

I still get the same error... :/

Nice good though. Really nice! I'm sure it'd work great if it wasn't for this problem.

Now, your guide did quite a few things more than what I've read previously, and one of the steps generated an intriguing error.
On 'sudo nvidia-xconfig' I got:

Code:

Using X configuration file: "/etc/X11/xorg.conf".

VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
Device section "Configured Video Device" must have a Driver
line.

Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'

on the first run.

On the second run, it worked fine.
TheDesertDragon is offline Reply With Quote
TheDesertDragon
View Public Profile
Send a private message to TheDesertDragon
Find More Posts by TheDesertDragon
Old April 14th, 2009 #3
ibuclaw
Ubuntu Master Roaster

ibuclaw's Avatar

Join Date: Jan 2008
Beans: 3,714

Re: HowTo: NViDIA 185.19 Beta Drivers in Intrepid
Quote:
Originally Posted by TheDesertDragon View Post
Continuation of:
http://ubuntuforums.org/showthread.php?t=1124372&page=4

I still get the same error... :/

Nice good though. Really nice! I'm sure it'd work great if it wasn't for this problem.

Now, your guide did quite a few things more than what I've read previously, and one of the steps generated an intriguing error.
On 'sudo nvidia-xconfig' I got:

Code:

Using X configuration file: "/etc/X11/xorg.conf".

VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
Device section "Configured Video Device" must have a Driver
line.

Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'

on the first run.

On the second run, it worked fine.
That is from the following command:
Code:

sudo nvidia-xconfig

Is it, no?

If so, just ignore it... Ubuntu uses strange auto-magically-config tricks that flag warnings to the nvidia-xconfig parser. But serve only as warnings, and don't affect the resultant xorg.conf file.

[EDIT]
Also, is there anything else in the output of Xorg.log and Syslog that has changed?
I am really intrigued now.

Regards
Iain
Last edited by ibuclaw; April 20th, 2009 at 10:50 AM..
ibuclaw is offline Reply With Quote
ibuclaw
View Public Profile
Send a private message to ibuclaw
Find More Posts by ibuclaw
Old April 20th, 2009 #4
ibuclaw
Ubuntu Master Roaster

ibuclaw's Avatar

Join Date: Jan 2008
Beans: 3,714

Re: HowTo: NViDIA 185.19 Beta Drivers in Intrepid
* Small Update *

* I came across this page and decided to include the key bit of it in the HowTO.
* I have this working in Jaunty too, so am updating the thread title as per say.


Also, if anyone wants to test this out, you can use LiveCDs to attempt this without messing up your current setup.

There is just one small difference between an installed system and a LiveCD, that is when asked to run:
Code:

sudo reboot

As this will loose all data in the LiveCD environment; instead just run:
Code:

sudo /etc/init.d/gdm start

and follow the rest as seen above.
閱讀 lutuni 的日誌 | 迴響 (0) | 引用次數 (0) | 瀏覽次數 (1352)
本篇文章引用網址
http://123.204.89.156/etype/modules/weblog/weblog-tb.php/36
列印這一篇日誌 發送這篇日誌給你的朋友(Email)