Sunday, March 25, 2012

Tip: Improve NVIDIA driver performance on FreeBSD

When my desktop northbridge fan died I stopped both playing Enemy Territory and using FreeBSD to do so. I've recently replaced the northbridge cooling and went back to install FreeBSD, NVIDIA drivers for the graphics card and Enemy Territory.

I use the same demo file to benchmark Enemy Territory since 2003 and imagine my surprise as I score 33 FPS when I usually achieved ~100 FPS on the same exact setup under FreeBSD.

With X11 running I dropped to the ttyv0 and saw a suspicious message "NVRM: detected agp.ko, aborting NVIDIA AGP setup".

I suspected that FreeBSD AGP module agp.ko wasn't playing nice with NVIDIA's AGP module.

So I went back to my post on configuring NVIDIA driver on FreeBSD and read NVIDIA README /usr/local/share/doc/NVIDIA_GLX-1.0/README that is installed with the port.

Adding hint.agp.0.disabled="1" to /boot/device.hints and Option "NvAGP" "1" under the Device section of /etc/X11/xorg.conf fixed the problem.

Upon rebooting and running the benchmark again I scored 98,3 FPS which is close to 3x the score without NVIDIA's AGP module!

The solution was in both my old post and NVIDIA's README file all along ;)

No comments: