Click to See Complete Forum and Search --> : Getting AGPGart for my GeForce 4.
DarkJedi9
11-15-2002, 11:03 PM
Okay, I have a GeForce 4 TI-4600. I have the nvidia drivers installed from their tarballs, and that went fine. However, /proc/driver/nvidia/agp/status shows agpgart as disabled. In my /etc/modules.conf, I have alias char-major-10-175 agpgart as well as alias char-major-195 NVdriver, alias /dev/nvidiactl char-major-195, and alias char-major-195 NVdriver. Now, I've seen that I might need pre-install NVdriver modprobe -k agpgart, but modprobe -k agpgart, done as root, gives an error that it can't find agpgart. In my kernel config, I have /dev/agpgart (AGP Support) enabled (not as a module). What did I miss? The system seems to be running well, but I can't imagine how much better it would be with AGP 4x and fastwriting, etc. enabled. Oh, it's Gentoo 1.4_rc1 if that has an effect on things
sarah31
11-16-2002, 02:38 AM
well i have /dev/agpart enabled as a module. all i have in /etc/modules.conf, which got installe dwhen i installed the nvidia drivers (from source) is:
alias /dev/nvidia* NVdriver
then in my XF86Config-4 i have:
Option "NvAGP" "1"
from what i understand this should enable all the nvidia stuff you want.
DarkJedi9
11-16-2002, 04:30 AM
Which section of the XF86Config file is Option "NvAGP" in?
mdwatts
11-16-2002, 10:20 AM
The 'Device' section.
You should have the agpgart module in /lib/modules/<kernel version>/kernel/drivers/char/agp.
bwkaz
11-16-2002, 10:33 AM
Setting NvAgp to 1 will not use your kernel AGPGART driver, though. It uses the AGP driver that gets included with the nVidia drivers. But according to nVidia's documentation of the option, you can't use it when agpgart is included in your kernel -- so if you either built it right in, or built it as a module and then load it, setting NvAgp to 1 won't do anything.
Is there anything in dmesg about "unsupported AGP chipset" or something like that? It could be that your motherboard is newer than your kernel, so the kernel's agpgart doesn't recognize its PCI ID. If that's the case, then passing agp_try_unsupported=1 to your agpgart module (and AFAIK, this will also require that you build agpgart as a module; you can't put it into your kernel) might help.
Also, getting agpgart to load when it's built into the kernel won't work, either, so if you don't change the way you build it, then you might as well get rid of the aliases in modules.conf that reference agpgart.
DarkJedi9
11-16-2002, 02:22 PM
Originally posted by bwkaz
Setting NvAgp to 1 will not use your kernel AGPGART driver, though. It uses the AGP driver that gets included with the nVidia drivers. But according to nVidia's documentation of the option, you can't use it when agpgart is included in your kernel -- so if you either built it right in, or built it as a module and then load it, setting NvAgp to 1 won't do anything.
So should I take agpgart out of my kernel entirely and set NvAGP to 1?
Aaaaaagghh, results of dmesg include:
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: unsupported bridge
agpgart: no supported devices found.
So that means I have to put in that agp_try_unsupported=1 line, huh? Now, where woud that one go? /etc/modules.conf?
mdwatts
11-16-2002, 03:50 PM
Originally posted by DarkJedi9
So that means I have to put in that agp_try_unsupported=1 line, huh? Now, where woud that one go? /etc/modules.conf?
That would be correct.
sarah31
11-16-2002, 04:09 PM
Setting NvAgp to 1 will not use your kernel AGPGART driver, though. It uses the AGP driver that gets included with the nVidia drivers. But according to nVidia's documentation of the option, you can't use it when agpgart is included in your kernel -- so if you either built it right in, or built it as a module and then load it, setting NvAgp to 1 won't do anything.
hmmm i recompiled my kernel with agpart as a module and NvAGP "1" works just fine.
DarkJedi9
11-16-2002, 05:08 PM
Okay, I put agp_try_unsupported=1 in /etc/modules.conf, and Option "NvAGP" "1" in my XF86Config, then rebooted. Same lines in dmesg about unsupported bridge, no supported devices found, and agpgart still shows as disabled. Also, my modules.conf file seems to have erased the agp_try_unsupported=1 line, which is weird. I think I'm going to try taking agpgart out of my kernel, since it doesn't seem to be helping at all. We'll see how that goes.
<Edit>I took out "/dev/agpgart (AGP Support)" as well as "Direct Rendering Manager (XFree86 DRI support)" since it says for that I need the /dev/agpgart option enabled. It's compiling now.
The Ennead IX
11-16-2002, 05:27 PM
I had the same problem but mdwatts sorted it with this reply http://www.linuxnewbie.org/forum/showthread.php?s=&threadid=66905&highlight=kt400
I'm not exactly 100% sure which one is doing the job but I just cut and paste the lot en masse and everything's ok.
DarkJedi9
11-16-2002, 05:31 PM
Doesn't look like it worked. Nothing in dmesg about agp, but that makes sense since I took it out of the kernel. Also, I found this in /var/log/XFree86.0.log:
(**) NVIDIA(0): Option "NvAGP" "1"
(**) NVIDIA(0): Use of NVIDIA internal AGP requested
That seemed encouraging, but cat /proc/driver/nvidia/agp/status still yields
Status: Disabled.
Is it possible that the fact that "agp_try_unsupported=1" doesn't seem to stay in /etc/modules.conf the problem?
DarkJedi9
11-16-2002, 05:43 PM
Something is up with /etc/modules.conf.
I think it may have something to do with the way Gentoo boots, but it doesn't seem to hold the changes that I put into it, and agpgart is most definitely still not working. Glxgears is only getting like 3200-3300 fps, which is dismal compared to the 7000 Ennead was getting. I've got an Athlon XP 2100+, and an Abit KR7A-133R with 512 megs of DDR SDRAM, so it really ought to be doing better than 3300 I'd say.
<Edit> Looked around in the Gentoo forums (forums.gentoo.org for those interested) and it looks like I have to edit a different file. I guess Gentoo has config files for each module and they are drawn from at boot to create /etc/modules.conf, which explains it not holding changes. It looks like I should be using /dev/agpgart in my kernel though. (Handy that I kept my old kernel around ;)). I'll see how it goes with /dev/agpgart in my kernel and the proper lines in the correct file this time.
<Another Edit>No go. /dev/agpgart is enabled in the kernel, modules.conf now reads my config file and puts options agp_try_unsupported=1 in like it should. I didn't put in any of the modprobe lines because I have agpgart compiled directly into the kernel. I still don't know what's wrong. Grr...:mad:
DarkJedi9
11-16-2002, 09:28 PM
And this would be my desperation post.:(
Here are results from various cat /proc/driver/nvidia/agp/* calss.
card:
Fast Writes: Supported
SBA: Supported
AGP Rates: 4x 2x 1x
Registers: 0x1f000217:0x00000000
host-bridge:
Host Bridge: Via Apollo Pro KT266
Fast Writes: Supported
SBA: Supported
AGP Rates: 4x 2x 1x
Registers: 0x1f000217:0x00000000
status:
Status: Disabled
I'm going to try enabling agpgart as a module in my kernel and use the modprobe -k agpgart stuff. Hopefully one some combination of loaded modules, option in modules.conf, and option lines in XFree86 will have a positive result.
DarkJedi9
11-16-2002, 10:28 PM
IT WORKS!!!
Here's how I did it. I did emerge -C on nvidia-kernel and nvidia-glx (that's gentoo talk for uninstalled my nvidia "stuff"). Then I downloaded the tarballs from Nvidia's site. Now, I can't take credit for this. A friend of my brothers at college (that's university for our friends across the pond :)) told me what to do next.
Change into the directory created by unzipping the nvidia_kernel-blahblahblah tarball. Open the file os-registry.c, and go down to line 228 (I believe), and change "static int NVreg_EnableAGPSBA = 0;" so that the 0 is a 1. Do the same for line 254 (again that should be it). The only difference is it's going to say FW instead of SBA. Either way, it needs to be 1, not 0. The SBA stands for side band addressing, and the fw for fast writing, by the way. Save the file, and do make install, then change to the nvidia_glx-blahblahblah, and do make install again.
In /etc/modules.conf (or whatever file is necessary to edit said file, with gentoo changes are made to /etc/modules.d/nvidia) I need the line options agp_try_unsupported=1 because my MOBO is very new. Then in the Device section of XF86Config that applies to your vid card, add the line Option "NvAGP" "3". According to nvidia's readme, this will use NvAGP if possible, otherwise it will use AGPGART.
I set /dev/agpgart to a module in my kernel config, and I'm pretty sure I don't have it loading. The chipset on my card (VIA Apollo KT266) works with NvAGP, so I'm pretty sure I don't need agpgart anyway. I think that should be all that's needed.
Thanks to everybody who helped, and hopefully anyone else with similar problems will find this helpful.
bwkaz
11-17-2002, 10:38 AM
Originally posted by sarah31
hmmm i recompiled my kernel with agpart as a module and NvAGP "1" works just fine. Right. Your agpgart module isn't loaded, though. If you modprobe it manually, then try to start X, you won't use NvAgp -- at least, I don't think so.
For future reference, modules.conf has no bearing whatsoever on anything that's built directly into the kernel. agpgart has to be a module, and it has to get loaded by something else (either a boot script, a manual modprobe, or a different alias in modules.conf), in order for the option in modules.conf to get recognized. If it's built in, I think you can pass options to the kernel at boot time to pass options to the driver, but I don't know the syntax or anything.
You can check what modules are loaded with an lsmod -- if you're running devfs, then agpgart is almost guaranteed to be loaded. If not, then it depends on whether you have a proper alias in wherever it comes from to get put into modules.conf -- the alias should be alias char-major-10-175 agpgart. If you run devfs, then you get this alias for free, more or less.
options agpgart agp_try_unsupported=1 was the options line you were using, right? Just to make sure...