# [ATI/nforce2]: Cant´install AGP8x patch - plz help!!!

## VisionD

Hello,

this is not just another thread about the radeon, nforce2 problem. I really spent hours reading in this forum, but i just can´t find a similar problem.

What i know til now (maybe i can help others with this):

- You have to install a patch to use nforce2´s AGP Port -- Done!!

- You need to install the ATI drivers -- Done (several times   :Confused:  !)

- You can run a Radeon 9700 pro with AGP seitched to 4x withou a problem -- Done!!

- You need a patch to run with AGP 8x -- can´t be installed   :Evil or Very Mad: 

Here we go. My System configuration:

- A7N8X Motherboard (nforce2 Chip)

- ATI Radeon 9700 Pro

- Gentoo-gaming-r3 kernel, patched for using the nforce2 chip

- ATI Drivers 3.2.4 (also tried 3.2.0 and 2.9.12). Used the files i got here:

https://forums.gentoo.org/viewtopic.php?t=73260

- I used the "[HOWTO] ATI Radeon Binary Drivers on Gentoo" from the link above to get through the installation and i finished it.

When i turn off my AGP8x support in my BIOS settings everything works pretty well (tried it under X with the fglrxgears). I found a patch somewhere in this or at the rage3d forum (sorry, lost the link) that should patch the ATI drivers to enable AGP8x support. This should be installed to the directory /lib/modules/fglrx. I just can´t find this directory. I mean, i really got my system running with the ATI drivers, but there isn´t such a directory.

I really need this patch because i got to dual - boot my system (not the only one who uses it and the other people need window$   :Evil or Very Mad:  ) and win crashes at startup without the 8x AGP (because i installed it with AGP8x)!

plz HELP!!!!    :Confused: 

Greetz

VisionD

----------

## Wedge_

If you extract the driver tarball somewhere, you'll see that it creates directories opt, usr, and lib, and the lib/modules/fglrx directory is the one you're looking for. You won't find it in /lib/modules/fglrx because it gets created and deleted by the ebuilds inside the portage temp directory. You should be able to modify the existing 3.2.4 ebuild to apply the patch for you. Copy ati-drivers-3.2.4.ebuild to /usr/local/portage/media-video/ati-drivers/ati-drivers-3.2.4-r1.ebuild, and put the patch in /usr/local/portage/media-video/ati-drivers/files. Open the ebuild in an editor, and go to the src_compile() section. Change the first two lines from: 

```
einfo "building the glx module"

cd ${WORKDIR}/lib/modules/fglrx/build_mod
```

to 

```
einfo "building the glx module"

cd ${WORKDIR}/lib/modules/fglrx

patch -p1 < ${FILESDIR}/<name of the 8x AGP patch>

cd ${WORKDIR}/lib/modules/fglrx/build_mod
```

You may have to adjust it a little to suit the patch. Once that's done, generate a digest with 

```
ebuild /usr/local/portage/media-video/ati-drivers/ati-drivers-3.2.4-r1.ebuild digest
```

and emerge it. You could also try a 2.6 kernel, AGP 8x works fine for me with an nForce/9800 Pro.

----------

## VisionD

Hey Wedge,

first thanks for the fast reply  :Razz:  . I´ll try this stuff, when i´m at home.

 :Question:  There is another question for me right now. Do you have to install the nforce2 patch to get the AGP support for ist in the kernel 2.6??  :Rolling Eyes: 

thx again   :Very Happy: 

VisionD

P.S.: Here comes a Gentoo-noob one   :Embarassed:  . Which kernel do i have to emerge to get 2.6??

----------

## Wedge_

 *VisionD wrote:*   

> There is another question for me right now. Do you have to install the nforce2 patch to get the AGP support for ist in the kernel 2.6??

 

The AGP support for the nForce2 in 2.6 is pretty good, I haven't had any problems with it. You don't need to do any patching for it to work. 

 *VisionD wrote:*   

> Which kernel do i have to emerge to get 2.6??

 

development-sources is the "normal" 2.6 kernel, like vanilla-sources is for 2.4. mm-sources is another 2.6 kernel with some extra patches applied. That's the one I'm using at the moment.

----------

## VisionD

Thx much man,

i´ll give a feedback in a few hours.

I think i´ll try the mm-sources first and if this won´t work i´ll repeat the whole procedure (nforce2, ati releated patching, ...) with the new patch advice.

Again i think i should say thx.

cu 

VisionD

----------

## VisionD

Hi Wedge_,

i tried your hints at home yesterday. Nothing really works.

1. The patch i got was not a "really" patch. It was a directory you should copy into the build directory for the driver. So the "patch" command didn´t really work. But i was able to change my ebuils-script to copy the directory, but i think it was not the right patch fpr my hardware (got a failure like: You don´t have the right fglrx module for your kernel).

2. I tried the mm-sources. Still no luck. I am a linux newbie and i could not really get X to work with the kernel. I had some bad Errors, like couldn´t load your agp module with agp module compiled into the kernel... Sorry, it was late and i cannot really remember these messages   :Confused: 

Thx for your help anyway. I just think that i have to change the AGP mode everytime i want to start X   :Evil or Very Mad: 

Greetz

VisionD

----------

## Wedge_

 *Quote:*   

> 1. The patch i got was not a "really" patch. It was a directory you should copy into the build directory for the driver. So the "patch" command didn´t really work. But i was able to change my ebuils-script to copy the directory, but i think it was not the right patch fpr my hardware (got a failure like: You don´t have the right fglrx module for your kernel).

 

Are you sure your /usr/src/linux symlink was pointing to the right set of kernel sources? 

 *Quote:*   

> 2. I tried the mm-sources. Still no luck. I am a linux newbie and i could not really get X to work with the kernel. I had some bad Errors, like couldn´t load your agp module with agp module compiled into the kernel... Sorry, it was late and i cannot really remember these messages

 

If you want to post the errors you got with mm-sources I can try to help. I could also give you my kernel config for mm-sources if you want it.

----------

## discostu

 *Wedge_ wrote:*   

>  *Quote:*   1. The patch i got was not a "really" patch. It was a directory you should copy into the build directory for the driver. So the "patch" command didn´t really work. But i was able to change my ebuils-script to copy the directory, but i think it was not the right patch fpr my hardware (got a failure like: You don´t have the right fglrx module for your kernel). 
> 
> Are you sure your /usr/src/linux symlink was pointing to the right set of kernel sources? 
> 
>  *Quote:*   2. I tried the mm-sources. Still no luck. I am a linux newbie and i could not really get X to work with the kernel. I had some bad Errors, like couldn´t load your agp module with agp module compiled into the kernel... Sorry, it was late and i cannot really remember these messages 
> ...

 

Wedge_, could you please post your config or pm me with it? Today I tried to get it working with mm-sources and failed. and now I've switched back and rebuilt the 2.4 kernel and can't emerge ati-drivers. I get an error. I probably changed something I shouldn't have in the .config file but I can't figure that out. Ideally I want to get it to work in 2.6 (cause i can't get usb working in 2.4), but anything would be better than booting to winxp.   :Very Happy: 

----------

## Wedge_

My config for 2.6.0-test4-mm1 is here. It might hang on bootup just after detecting the USB ports - if it does, add "pci=noacpi" to the options in your bootloader config file.

----------

## discostu

I didn't have any problems booting. But I still can't build ati-drivers from the ebuild. It says it can't find -lGL. There is a libGL.so in /usr/lib/. I don't know what package that lib comes with. Got any idea what I need to do to get this working? Thanks!   :Very Happy: 

----------

## Wedge_

Try doing this 

```
opengl-update xfree

<emerge the drivers again>

opengl-update ati
```

----------

## discostu

That worked!  :Smile:  I got ati-drivers to build. Unfortunately none of my modules will load save 2, ide_scsi and usb_storage (both load on boot). There don't seem to be any modules in the /lib/modules/2.6.0-test3-mm3/* directory

I think I built the kernel right, but maybe not as building 2.6 is slightly different from 2.4

I did

```
# make menuconfig

# make

# make modules_install

# mount /boot

# cp /boot/bzImage /boot/bzImage.bk

# cp arch/i386/boot/bzImage /boot/bzImage

# umount /boot

# reboot
```

Any idea what went wrong?

Thanks!

----------

## Wedge_

If you haven't used a 2.6 kernel before, you have to emerge module-init-tools. The module format is different in 2.6, and so you need updated versions of modprobe, insmod etc. 

I can't think why there wouldn't be any modules in the /lib/modules/ directory. Are you sure you were looking in the right directory?  :Smile: 

----------

## discostu

I guess I just didn't see some of the modules I was used to seeing in my 2.4 kernel (such as soundcore, usbcore, agpgart). When I try to load any of those it says FATAL: Module nameofmodule not found.

The same thing happens with fglrx. I can't modprobe that module. I have ati-drivers-2.9.13-r1 built. Still no X cause I can't load that module.

Thanks.  :Smile: 

----------

## Wedge_

Have you changed your /usr/src/linux symlink to point to the sources for the kernel you're running? It shouldn't matter for the modules that are part of the kernel, but it needs to be set correctly or the ati-drivers ebuild won't put the fglrx module in the right place.

```
# make menuconfig

# make

# make modules_install

# mount /boot

# cp /boot/bzImage /boot/bzImage.bk

# cp arch/i386/boot/bzImage /boot/bzImage

# umount /boot

# reboot
```

That looks fine, but can you double check that you actually did "make modules_install" and not "make modules install", which doesn't do the same thing. Try doing this: 

```
cd /usr/src/linux-whatever

export KBUILD_VERBOSE=1

make modules_install
```

That will let you see where the modules are being copied to.

----------

## discostu

The problem seems to be that the module isn't being build, although the ebuild finishes without error.

The first line says something like /proc/ksyms no such file or directory.

A little later it gives a warning in agpgart_be.c about 'MOD_INC_USE_COUNT' is deprecated.

compiling failed - object file was not generated

* glx module not built

----------

## Wedge_

 *discostu wrote:*   

> The problem seems to be that the module isn't being build, although the ebuild finishes without error.
> 
> The first line says something like /proc/ksyms no such file or directory.
> 
> A little later it gives a warning in agpgart_be.c about 'MOD_INC_USE_COUNT' is deprecated.
> ...

 

It sounds like you're using one of the older versions of the ati-drivers ebuild that isn't 2.6 friendly. The module needs to be built in a different way, and the ebuild will apply some patches to fix all the warnings. 

The ebuilds that will work are all masked, so you have to do something like:

```
ACCEPT_KEYWORDS="~x86" emerge ati-drivers
```

Doing that will install version 3.2.4, but any version from 2.9.13-r1 or above should work.

----------

## discostu

I've tried building ati-drivers-2.9.13-r1 and ati-drivers-2.9.6 and neither worked.

----------

## Wedge_

Post the output from the ebuild.

----------

## discostu

Nevermind. I got it working with 3.2.4 ebuild. I wasn't aware that it was necessary to run 

```
ebuild /usr/.../ati-drivers-3.2.4.ebuild digest
```

 before runing 

```
ACCEPT_KEYWORDS="~x86" emerge ati-drivers
```

 But that's what I did and it worked.

On another note I have to get sound working. What modules do I need to load for the nforce? I had errors emerging the alsa-driver.

here is the end of the emerge

```
make dep

make[1]: Entering directory `/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2'

make[2]: Entering directory `/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/acore'

make  -C ioctl32 fastdep

make[3]: Entering directory `/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/acore/ioctl32'

gcc -M -D__KERNEL__ -DMODULE=1 -I/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/include  -I/usr/src/linux/include -O2 -mpreferred-stack-boundary=2 -march=athlon -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD  hwdep32.c ioctl32.c pcm32.c rawmidi32.c seq32.c timer32.c > .depend

In file included from /usr/src/linux/include/linux/irq.h:20,

                 from /usr/src/linux/include/asm/hardirq.h:6,

                 from /usr/src/linux/include/linux/interrupt.h:10,

                 from /usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/include/sound/timer.h:27,

                 from ../../alsa-kernel/core/ioctl32/seq32.c:25,

                 from seq32.c:2:

/usr/src/linux/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory

In file included from /usr/src/linux/include/linux/irq.h:20,

                 from /usr/src/linux/include/asm/hardirq.h:6,

                 from /usr/src/linux/include/linux/interrupt.h:10,

                 from /usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/include/sound/timer.h:27,

                 from ../../alsa-kernel/core/ioctl32/timer32.c:25,

                 from timer32.c:2:

/usr/src/linux/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory

make[3]: *** [fastdep] Error 1

make[3]: Leaving directory `/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/acore/ioctl32'

make[2]: *** [_sfdep_ioctl32] Error 2

make[2]: Leaving directory `/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2/acore'

make[1]: *** [dep] Error 1

make[1]: Leaving directory `/usr/tmp2/portage/alsa-driver-0.9.2/work/alsa-driver-0.9.2'

make: *** [include/sndversions.h] Error 2

                                                                                                                                                              

!!! ERROR: media-sound/alsa-driver-0.9.2 failed.

!!! Function src_compile, Line 59, Exitcode 2

!!! Parallel Make Failed

                                                                                                                                                              

Calculating dependencies   ^H^H ...done!

>>> emerge (1 of 1) media-sound/alsa-driver-0.9.2 to /

>>> md5 src_uri ;-) alsa-driver-0.9.2.tar.bz2
```

Thanks!  :Very Happy: 

----------

## cylgalad

Linux kernel 2.4.22 is supposed to support nForce2 in agppart, have you tried that ?

----------

## Wedge_

 *discostu wrote:*   

> What modules do I need to load for the nforce? I had errors emerging the alsa-driver. 

 

The 2.6 kernels have ALSA built in, so you should remove the alsa-driver package with "emerge -C alsa-driver" (leave the other alsa- packages), then set up support in the Sound section of the kernel config. For nForce audio, I think you need the Intel 8x0 driver.

----------

## discostu

 :Very Happy:   Thanks Wedge! Everything is working now

----------

