Configuring nVidia Drivers on Ubuntu
November 27th, 2005 • Linux
I’ve been fiddling around with Ubuntu Breezy lately, it seems like a solid system, more or less. I’m going to get to that later on, but now I’m going to document how to properly install nVidia drivers on Ubuntu.
Ubuntu’s Wiki has many out-dated documents on how to do that, and they all say that it’s as easy as running:
apt-get install nvidia-glx nvidia-glx-config enable
After rebooting, nVidia drivers should be installed. If you want to check, run:
glxgears -printfps
On my GeForce 6800 Ultra I’m getting around 14,000 FPS, I’m sure I can speed it up with more tweaking, but I don’t really have the time for it.
The thing is, enabling nVidia GLX drivers isn’t enough to get the performance these drivers are capable of. So here’s what you need to do:
First, check whether you’re using AGPGART or NVIDIA AGP drivers:
$ cat /proc/driver/nvidia/agp/status Status: Enabled Driver: NVIDIA AGP Rate: 8x Fast Writes: Disabled SBA: Enabled
If it says AGPGART instead of NVIDIA then you should add nvidia-agp
to your /etc/modules just before the line that says nvidia
(assuming you already run nvidia-glx-config enable).
This tells the system to load nVidia AGP drivers on start-up, but that’s not it,
you need to also disable loading AGPGART, nvidia-agp doesn’t work
with AGPGART loaded, so add it to hotplug’s blacklist:
$ tail /etc/hotplug/blacklist # snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much # hardware on its own (Ubuntu bug #2011, #6810) snd_intel8x0m # causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306) i2c_i801 amd64_agp agpgart
I had to blacklist amd64_agp too because it depeneds on agpgart.
Note that this doesn’t prevent AGPGART from loading again, but this makes sure
that NVIDIA AGP is loaded before it.
Next, you should add a few performance-enhancing options to your /etc/X11/xorg.conf.
Just above the line that says Driver "nvidia" add these:
Option "NoLogo" "true" # Disables nVidia's logo on start-up
Option "NvAGP" "1" # Tries internal nVidia AGP drivers first
Option "RenderAccel" "true" # Duh :)
Option "CursorShadow" "true" # Adds an alpha-shadow to your cursor
Option "AllowGLXWithComposite" "true" # Mostly used for cool effects
Note that using AllowGLXWithComposite can cause the system to
act a little flaky when you enable Composite extension. This is used for cute
Vista-like effects, like transparent windows, drop-shadows, etc. Use with caution.
Well, I hope that’s it. I didn’t have to recompile my kernel or nVidia drivers, most went out smoothly, except for the fact that I had to search a lot for this information.
One last tip, try to install an optimized kernel as soon as possible. Ubuntu
comes with linux-386 package, try to upgrade it to linux-686
or linux-k7, depeneding on your hardware, you’ll notice a performance
increase.
Best of luck.
P.S. Turns out most of my performance gripes with Ubuntu was because of nVidia’s “inproper” installation. Like I said nvidia-glx-config enable didn’t quite do the trick.
2 Responses (Add Your Comment)
-
-
stimpyaw Jan 29, 2007at 8:46am
I tried the above and I don’t this its working.
I did the following to check on the AGP setup and got:root@sonicu-desktop:/home/sonicu# cat /proc/driver/nvidia/agp/status
Status: DisabledAGP initialization failed, please check the ouput
of the ‘dmesg’ command and/or your system log file for additional information on this problem.If anyone can provide help that wold be great!
stimpyawReply ↵
Very nice tutorial, thanks!