# nForce2 AGPGart doesn't work :(

## ph0

hi,

I've been trying it for days but I can't get this working. My graphic card is Radeon 9700 PRO and I use the ati-drivers 3.2.4-r2 with external AGPGart module. U compiled nforce2 support into AGPGart and AGPGart as module. X starts and everything looks fine, but glxgears runs at 500 fps and fgl_glxgears says:

```

bash-2.05b$ fgl_glxgears

Error: couldn't get fbconfig

```

glxinfo says that my graphiccard uses mesa indirect, I guess this is the reson for it:

```

ph0 root # modprobe agpgart

/lib/modules/2.4.20-gaming-r5/kernel/drivers/char/agp/agpgart.o: init_module: Input/output error

Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.

      You may find more information in syslog or the output from dmesg

/lib/modules/2.4.20-gaming-r5/kernel/drivers/char/agp/agpgart.o: insmod /lib/modules/2.4.20-gaming-r5/kernel/drivers/char/agp/agpgart.o failed

/lib/modules/2.4.20-gaming-r5/kernel/drivers/char/agp/agpgart.o: insmod agpgart failed

```

```

ph0 root # dmesg

Linux version 2.4.20-gaming-r5 (root@cdimage) (gcc version 3.2.2) #2 SMP Sun Jun 29 03:28:03 CEST 2003

[...]

Linux agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: Detected Nvidia Nforce2 chipset

agpgart: AGP aperture is 64M @ 0xe0000000

agpgart: unable to get minor: 175

```

and finally a piece of XFree log:

```

[drm] failed to load kernel module "agpgart"

[drm] failed to load kernel module "fglrx"

(II) fglrx(0): [drm] drmOpen failed

(EE) fglrx(0): DRIScreenInit failed!

(WW) fglrx(0): ***********************************************

(WW) fglrx(0): * DRI initialization failed!                  *

(WW) fglrx(0): * (maybe driver kernel module missing or bad) *

(WW) fglrx(0): * 2D acceleraton available (MMIO)             *

(WW) fglrx(0): * no 3D acceleration available                *

(WW) fglrx(0): ********************************************* *

```

I've got no idea what this might be  :Sad: 

I hope anyone could help me to solve this problem since there seems no other post in this forum has solved this problem.

CU, ph0

----------

## Wedge_

First, try compiling agpgart into the kernel along with nForce2 support. That's what I always do, and it works fine for me. Another option is to try the internal AGP support in the driver. I've been avoiding it for a long time, but I tried it with 3.2.4 the other day and it actually worked just as well as it did with kernel agpgart.

The fgl_glxgears error should be fixable by doing 

```
opengl-update ati
```

, which should also get rid of the Mesa libs you're currently using.

The DRI problem in your XFree log should go away once you get AGP working properly.

----------

## ph0

```

ph0 root # opengl-update ati

 * Switching to ati OpenGL interface...                                   [ ok ]

```

doesn't fix the problem of fgl_glxgears  :Sad:  I'm just trying the internal agp module. No changes. It just doesn't complain that insmod agpgart failed. but he can't initialize drm, glxgears and so on is the same, still indirect. I will now try to compile agpgart into the kernel. What setting should I try in fglrxconfig? Internal or external agpgart module ? 

Thanks, ph0

----------

## Wedge_

External AGP is probably better, as it seems a bit more reliable for nForce2 boards. Also, not all of the driver versions have nForce support.

----------

## ph0

my driver version is 3.2.4-r2. compiling agpgart into the kernel doesn't help, XFree logs say that agpgart.o and fglrx.o could not be inserted.

what the heck could that be?

```

ph0 root # modprobe fglrx

/lib/modules/2.4.20-gaming-r5/video/fglrx.o: unresolved symbol _mmx_memcpy

/lib/modules/2.4.20-gaming-r5/video/fglrx.o:

Hint: You are trying to load a module without a GPL compatible license

      and it has unresolved symbols.  Contact the module supplier for

      assistance, only they can help you.

/lib/modules/2.4.20-gaming-r5/video/fglrx.o: insmod /lib/modules/2.4.20-gaming-r5/video/fglrx.o failed

/lib/modules/2.4.20-gaming-r5/video/fglrx.o: insmod fglrx failed
```

Which kernel do you use? And I found some patches in linux for Nvidia nForce2, do you have any installed?

Thanks for your help.

CU, ph0

----------

## Wedge_

I'm using 2.6.0-test3 at the moment. I have a kernel config from the gentoo-sources kernel that works fine for me as well, if you want to take a look at it: http://wedge.xwlegacy.net/.config (the gentoo kernel needs patched with nForce support IIRC).

I've never seen that particular modprobe error before, no idea what it is  :Sad: 

----------

## ph0

hmmm, in your config Nforce2 support isn't enabled in AGPGart, are you sure this one works ?  :Smile: 

----------

## Wedge_

You need to patch the gentoo sources kernel, I forgot about that. Do you have the patch?

----------

## ph0

I have a patch from a download page, but I don't know if it's the right one and I didn't use it yet. Where can I get it and how can I install it? Thanks, ph0

----------

## Wedge_

http://www.ussg.iu.edu/hypermail/linux/kernel/0306.3/att-1054/01-linux-2.4.21-agpgart.diff

That's the one I used. To apply it, do: 

```
cd /usr/src/linux-2.4.20-gentoo-r5

patch -p1 < /path/to/patchfile
```

----------

## ph0

it seemed like with this fix and gentoo-sources 2.4.20-r6 agpgart and fglrx worked but fgl_glxgears still didn't and glxgears runs with 500 fps, it still uses MESA indirect  :Sad:  I destroyed the link to the kernel or so and now I can't build new ones and modules don't work anymore. So I will have to build a new system next days. I'd be glad if you could drop me some suggestions how I can switch to direct rendering vom mesa indirect (opengl-update ati didn't work)

CU, ph0

----------

## Wedge_

 *Quote:*   

> I'd be glad if you could drop me some suggestions how I can switch to direct rendering vom mesa indirect (opengl-update ati didn't work) 

 

That's exactly what the opengl-update tool is supposed to do. It changes some symlinks from whatever opengl libs you were using to the ati ones.

Make sure you have your kernel configured correctly first (include agpgart + nforce2 support, remove any DRM stuff). Once you've compiled it and are running it, then you should install the drivers. Do 

```
emerge -C ati-drivers
```

 to get rid of any old ones first. Then do 

```
opengl-update xfree

ACCEPT_KEYWORDS="~x86" emerge ati-drivers

opengl-update ati
```

to install the latest drivers. 

The ebuilds for the newer drivers and some setup instructions are in this thread. 

 *Quote:*   

> I destroyed the link to the kernel or so and now I can't build new ones and modules don't work anymore.

 

Do you mean that you deleted the symlink to /usr/src/linux? You can recreate it by doing 

```
ln -s /usr/src/linux-2.4.20-gentoo-r6 /usr/src/linux
```

----------

## ph0

It wasn't the symlink, it was the wrong mounted /boot as I found out later. I now have the gentoo-sources 2.4.20-r6 with the patch & agpgart as module + ati-drivers 3.2.4-r2 (properly configured). When I boot and kdm starts the screen keeps black and the computer freezes  :Sad:  With gaming-sources at least X worked...  :Sad: 

----------

## Wedge_

Are you sure the agp modules are loaded before kdm starts? I'd still recommend compiling them into the kernel. I can't think of anything you'd need to unload them for - you can still use the ATI agp support even if you've got agp support in the kernel. 

Also check if it does actually freeze up - if CTRL-ALT-F1 or CTRL-ALT-BACKSPACE gets you back to a console, it's probably just a refresh rate problem. 

Until you get things working, it'd be a good idea to remove xdm from your default runlevel (rc-update del xdm default), to stop it starting automatically.

I'll emerge gentoo-sources-r6 and see if it works for me. If it does, I'll post all the things I did.

If you could post your current XF86Config and an XFree log from one of the failed startups somewhere, that would probably be helpful.

Edit: Everything worked fine for me. This is what I did: 

```
ACCEPT_KEYWORDS="~x86" emerge gentoo-sources

rm /usr/src/linux

ln -s /usr/src/linux-2.4.20-gentoo-r6 /usr/src/linux

cd /usr/src/linux

patch -p1 < ~/01-linux-2.4.21-agpgart.diff

make menuconfig (no ACPI, APIC, DRM, agpgart + nforce2 builtin)

make dep && make clean bzImage modules modules_install

cp arch/i386/boot/bzImage /boot/bzImageGENR6

vim /boot/grub/grub.conf

(reboot)

emerge -C ati-drivers

opengl-update xfree

ACCEPT_KEYWORDS="~x86" emerge ati-drivers

opengl-update ati

startx
```

The kernel config is here

My XF86Config is here

----------

## ph0

hi,

I'm so glad to say that I finally got it  :Very Happy:  I don't know why but with compiling a new gaming-sources kernel and ati-drivers x freezed and because I have read somewhere in the past that there's a problem with nforce2 agp 8x I switched to 4x and now everything works fine! GLXGears runs at 6900 fps with ati-drivers 3.2.4-r2 and tuxracer is completely smooth  :Smile:  Thanks for your help!

----------

