# AGP BUSTED

## dschein

AGP used to work on my machine, but now it just wont.

I tried using the agpgart driver (via-agp) for my KM400 chipset and it failed to work, dmesg said it failed to initialize, but the agpgart and via-agp drivers were loaded.

I'd prefer to use the nvidia driver, however it does not work either:

dmesg output:

NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module 1.0-6111 Tue Jul 27 07:55:38 PDT 2004

no device found

line from xorg.conf:

Option "NvAGP" "1"

cat /proc/driver/nvidia/agp/status

Status: Disabled

AGP initialization failed, please check the ouput

of the 'dmesg' command and/or your system log file

for additional information on this problem.

system specs:

mobo: ABIT VA-10 w/ KM400 chipset.

video card: GeForceFX 5700 w/ 256megs

kernel: 2.6.8

distro: gentoo

xserver: xorg 6.8.0

thanks!

----------

## Nonus

Do you have your chipset drivers as part of the kernel?

----------

## dschein

No.  I want to use the NVAGP so I have agpgart and via-agp compiled as modules, but unloaded.

----------

## Nonus

Option "NvAGP" "integer"

                Configure AGP support. Integer argument can be one of:

                0 : disable agp 

                1 : use NVIDIA's internal AGP support, if possible 

                2 : use AGPGART, if possible 

                3 : use any agp support (try AGPGART, then NVIDIA's AGP) 

                Please note that NVIDIA's internal AGP support cannot

                work if AGPGART is either statically compiled into your

                kernel or is built as a module, but loaded into your

                kernel (some distributions load AGPGART into the kernel

                at boot up).  Default: 3 (the default was 1 until after

                1.0-1251).

reading that sounds like you cant have it as a module either, I think i had problems before having agpart as a module so i just dont compile it anymore.

Also try the output of lspci to see if it sees your videocard. Other than that I would suggest trying different drivers from portage or nvidia and see what happens.

----------

## stdPikachu

If anyone is still paying attention to this, I've never been able to get the nVidia AGP to work with my KM400 and have just spent about two hours thrashing away at it; I just don't think the nvidia driver (can only use 6111) supports it.

I could only get AGP working on the KM400 via the in-kernel modules (agpgart and via-agp) and loading them at boot (and ensuring the NvAGP was set to 3 in xorg.conf). They're not as fast as nvagp I imagine, but they're a truckload faster than running the card in PCI mode  :Very Happy: 

```
banquo root # cat /proc/driver/nvidia/agp/status

Status:          Enabled

Driver:          AGPGART

AGP Rate:        8x

Fast Writes:     Disabled

SBA:             Enabled
```

I've been running the card (a crappy MX4000, which won't work with newer nVidia drivers yet) in PCI mode for months now, and the screen is now soooo much more responsive.

----------

## UB|K

 *dschein wrote:*   

> No.  I want to use the NVAGP so I have agpgart and via-agp compiled as modules, but unloaded.

 

Try to remove completly agpgart and via-agp from kernel.

That's what i did to get NvAgp running on my box (also a via based mobo)

 *stdPikachu wrote:*   

> They're not as fast as nvagp I imagine, but they're a truckload faster than running the card in PCI mode

 

I don't have a great preformance difference between agpgart and nvAgp...

----------

## adsmith

I am having similar problems, also on a Via KM400A and GeForce4.  Have you resolved yours?

I think I've tried every permutation of settings, other than backing down from AGP 8X.  

It comes down to this:

If I set NvAGP="1" in xorg.conf,  then X starts "work", though glxgears is slow (500FPS) and

```

$ cat /proc/driver/nvidia/agp/status

Status:          Disabled

AGP initialization failed, please check the ouput  

of the 'dmesg' command and/or your system log file 

for additional information on this problem.   

```

still happens.

If I set NvAGp to 2 or 3, with via-agp unloaded, then it's slow, too (defaults back to the previous case, I think),  If via-agp is loaded, X hangs with a back black screen.

Any suggestions?

I have tried an *identical* setup (kernel, modules, drivers, xorg) to one on a Via KT400 system with a GeForce3, and it has the same characteristics as above.

----------

## stdPikachu

First off, have you checked dmesg for anything relating to agpgart? Is it compiled as a module or into the kernel? Mine is compiled as a module and it gets autoloaded along with via-agp at boot. I'd post the relevant chunks of my kernel config, but I've just moved, thus no net access, thus I can't get to me box.

IIRC the nvidia AGP module can't load if agpgart is compiled into the kernel (or loaded as a module), so you'd be actually be loading agpgart without any chipset-specific drivers, which would again result in cacky performance.

Secondly, don't trust the nvidia status reports under /proc as (so I've heard) they sometimes only report the settings for the driver rather than the system as a whole, hence ignoring any AGPGART stuff. If you have nvidia-settings available it'll give you a more accurate rundown of whether you're running in AGP or PCI mode.

P.S. I'm also assuming you're running the 6111 drivers, as anything above that seems to exhibit immense dislike for anything below an FX series, on my machine (and quite a few others judging by bugzilla) at least.

If AGP really is hardlocking X, it might be a hardware problem. My friend had a Gigabyte mobo with a fault on the AGP bus that's prevented him from using any acceleration whatsoever. But the fact you've seen the same thing on two different sets of hardware points to an error in your config somewhere...

----------

## pilla

Moved from Multimedia

----------

## adsmith

Perhaps I should restate my situation more clearly:

I have two machines, call them GOOD and BAD, due to their functionality.  They have identical kernels (modulo some sound stuff and CPU scaling in one which is ununsed anyway).  They both have Athlon XP 2?00 CPU's.

GOOD has:

VIA KT400, capable of AGP 1X 2X or 4X

GeForce3 Ti 200

xorg.conf has NvAGP unset (so defaults to "3", I think?)

has nvidia module autoload on boot

does not autoload agpgart or via-agp

Get about 2500 FPS in glxgears

nivida-settings show AGP is used

/proc/drivers/nvidia/agp/status shows

```

Status:          Enabled

Driver:          NVIDIA

AGP Rate:        4x

Fast Writes:     Disabled

SBA:             Disabled

```

Currrently, BAD has:

Via KM400-A, capable of AGP 4x or 8x

GeForce4 MX 4000

xorg.conf has NvAGP set to "1". If set to 2 or 3, X hangs on black screen

has nvidia module autoload on boot

has agpgart and via-agp autoload on boot

Get about 500 FPS in glxgears

nivida-settings show AGP is used in this case.  Shows PCI used under any other settings which don't hang.

/proc/drivers/nvidia/agp/status shows

```

Status:          Disabled

AGP initialization failed, please check the ouput  

of the 'dmesg' command and/or your system log file 

for additional information on this problem. 

```

I'm still at work, but tonight, I will try all permutations of NvAGP settings, module autoloading, and AGP speed. to see if anything works better than the current setup.

----------

## adsmith

Correction.  

I am now going methodically through all possible settings, and I can't seem to get nvidia-settings to ever show AGP as bus type.. just PCI.

Independent of all sorts of BIOS settings and anything else i can think of (including nvidia-* version) 

It is slow UNLESS I modprobe via-agp and have NvAGP="2", in which case it LOCKS.

----------

## adsmith

There is a HUGE thread on this topic at the nV news forums, but no one seems to have a real solution...

http://www.nvnews.net/vbulletin/showthread.php?t=40143

[edit] fixed illegible typing from bad keyboard.Last edited by adsmith on Thu Feb 10, 2005 10:24 pm; edited 1 time in total

----------

## amne

Novartic_'s unfriendly comment in this thread went to the Dustbin.

----------

## transient

Probably, your motherboard chipset is one of the ones that isnt supported well by nvAGP. To be honest, you wont lose any performance using the inkernel agpgart driver over nVidia's one, so if it works for you with agpgart, Id just stick with that

----------

## stdPikachu

 *adsmith wrote:*   

> Currrently, BAD has:
> 
> Via KM400-A, capable of AGP 4x or 8x
> 
> GeForce4 MX 4000
> ...

 

What does dmesg say? Try a dmesg | grep -i agp (you might also wanna check a dmesg | grep -i nvidia, as well as a few greps through your /var/log/Xorg.0.log or whatever it's called). If agpgart and via-agp are loaded (NvAGP should be set to 2 - don't even try NvAGP - in this case, as I don't think I've ever seen a working example of nVidia 6111 working with a KM400) then, unless something goes wrong, you'll use the in-kernel AGP (which has negligible performance differences comared to the nVidia AGP driver apparently). The fact that it is going wrong suggests something might be wrong with your hardware setup.

Have you checked IRQ sharing in the BIOS? Is the GFX card sharing an IRQ with another device?

Is the AGP slot bus-master enabled? This was a gotcha that got me for ages - the nVidia driver (and I suspect the in-kernel AGP) doesn't seem to want to work unless the GFX card is bus mastered. Check your BIOS for an option like "assign IRQ to GFX card" or something like that. You can check for bus master with an lspci -v.

Hopefully dmesg should show you where to start looking - the output there is typically very helpful. I wish windows had an equivalent...!

If none of that works, it might just be buggy HW. What's the make and model?

----------

