Thursday, January 25, 2007

NVidia driver speed optimizing

http://ubuntuforums.org/showthread.php?t=40069


http://www.nvnews.net/vbulletin/showthread.php?t=79713&page=2


I was getting slow performance because I was using AGPGART and not the nvidia one. Switching back to nvidia-agp:

$ cat /proc/driver/nvidia/agp/status
Status: Enabled
Driver: NVIDIA
AGP Rate: 4x
Fast Writes: Enabled
SBA: Enabled

...performance is back to normal, of course the black windows are still here

mschwartz

ioannis,

Thanks for pointing this out. Unfortunately, I saw no change in performance, either subjectively or via glxgears after making the change.

Just as an FYI, for anyone else that might want to try this, on FC6, I did the following.

Check to be sure that Fast Writes and SBA are supported:

$ cat /proc/driver/nvidia/agp/card
Fast Writes: Supported
SBA: Supported
AGP Rates: 4x 2x 1x
Registers: 0x1f000217:0x1f000314


If so, add the following lines to /etc/modprobe.conf:

alias char-major-195* nvidia
options nvidia NVreg_EnableAGPSBA=1 NVreg_EnableAGPFW=1


Then, add 'agp=off' to the kernel parameters in grub.conf:

kernel /boot/vmlinuz-2.6.18-1.2849.fc6 ro root=LABEL=/1 agp=off

Then re-boot.

Then check:

$ cat /proc/driver/nvidia/agp/status
Status: Enabled
Driver: NVIDIA
AGP Rate: 4x
Fast Writes: Enabled
SBA: Enabled


HTH.


http://ramikayyali.com/archives/2005/11/27/nvidia

Configuring nVidia Drivers on Ubuntu

November 27, 2005 | 1 Comment

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

No comments: