NVIDIA nvagp/agpgart module woes…

# on November 11th 2009 at 1:20 pm in Computers & Hardware, HOWTOs, Software

So I was trying to optimise a laptop for audio playback and wanted the NVIDIA driver to use the its own NvAGP rather than the linux supplied ‘agpgart’ module. The reason being that the performance may be better, and I have this obsession with optimisation… :)

This wasn’t as easy as it seemed as for some reason, blacklisting the ‘agpgart’ module did not seem to have any effect.

Why is it still loading the agpgart driver?
Running “modprobe -nv nvidia” it showed that it kept depending on the ‘agpgart’ module somehow.

A quick Google only showed other people having the problem, but alas, no solution.

Further poking around, I noticed when doing a “depmod -v” — which outputs module dependencies to standard out — that the nvidia module indeed depended on it.

Aha!
Hmmm… So I dove into the NVIDIA driver source (which I had to modify for a real-time kernel anyways, so the unpacked nvidia installer package was still on my system), and noticed the culprit.

The nv-linux.h file contains the following lines:
#if defined (CONFIG_AGP) || defined (CONFIG_AGP_MODULE)
#define AGPGART
#include <linux/agp_backend.h>
#include <linux/agpgart.h>
#endif

The CONFIG_AGP and CONFIG_AGP_MODULE it gets from your kernel configuration and presumably, this is what compiles in stuff that makes it depend on the ‘agpgart’ module. I put those lines in as /* comments */ and tried loading the module.

Indeed, it now does not depend on ‘agpgart’ anymore and shall use ‘nvagp’ now. And the time spent on it was worth it: I even got about 200 frames per second increase with glxgears. :-P

- Navaho Gunleg
rss 1 comment
  1. pingback

    [...]   Navaho Gunleg   …where the most significant bytes… Home | About | Archives | Contact   « NVIDIA nvagp/agpgart module woes…  [...]

comment on this article

Notice: All comments are moderated. Your comment will appear once approved.

© 2005-2010. All remarks and opinions on this site are the intellectual property of Navaho Gunleg, unless specified otherwise. If you find anything offensive or otherwise insulting, just close the damn window; there are far more serious issues in this world to get upset about.