# Radeon 9700/KT400 mobo owners,  UPDATE:  AGP8X SUCCESS!!!

## jhboricua

Subject:  KT400 patch against the 2.5.1 XFree86 4.2.0 driver *Quote:*   

> Originally posted by skirst 
> 
> I juts recently got a 9700 pro, and was quite dissapointed in the fact that I could not get the card to work accelerated under Linux.  I have a KT400 chipset on my motherboard.  And my BIOS does not allow me to run an AGP 3.0 card in 2.0 mode.  So I spent a day and hacked the AGP code for the fglrx module to work with this chipset in AGP 3.0 mode.  You can read all about my adventure here.  I thought about just updating my kernel to the latest 2.4.21-pre, or using the latest 2.5 kernel (which has AGP 3.0 support for this chipset but it's borken.  I fixed it, as the 2.5 code was the basis of my patch.  You can read about that as well at the URL I posted above.),  but I didn't feel like it.  So here it is for all those who are interested:
> 
> http://nifelheim.dyndns.org/~cocidius/blah/fglrx-glc22-4.2.0-2.5.1.i586-kt400agp3.patch
> ...

  Can someone verify that this indeed allows the Radeon 9700 to run at AGP8x on the KT400 mobos?  TIA.Last edited by jhboricua on Wed Feb 26, 2003 9:36 am; edited 1 time in total

----------

## nephi513

Don't have time to try, but here are my ideas!

This code looks good and I knew it wouldn't take much to add support in the ATI drivers.  If your going to play with this driver I think you want to either comple AGP Gart support as a module in the Kernel or not at all sence it is going to be using the ATI AGP module instead.  Also here is a quote from Dave Jones the offical AGP Gart kernel code writter.  He has already done the work for AGP 3.0 in the 2.5 kernel.  It also important to understand that This patch is based on the 2.5.59 kernel where the AGP 3.0 stuff wasn't done.  The final working stuff wasn't put in untill 2.5.61.  So the author of this patch might want to look and see if there are any changes he needs to make to the patch. 

Sorry here is the quote:

 *Quote:*   

> 
> 
> Thursday 20th February 2003
> 
> 23:03 :: davej ::
> ...

 

If this happens then it would be much better to use the 2.4 new AGP Gart driver.

Warring  IF you do try this don't use the 2.5 kernel.  The ATI Driver does not support this.  I spent two days trying to get it to work.

I will try this patch, but I wont have time untill the weekend.  Also what form are you looking at to find this post.  I see the link to the web site, but it is not the link to were the orginal quote or post was made.  I would like to keep track of the conversation going on.

Thanks,

Dave

----------

## nephi513

I just thought I would tell you that I had some things cancel and so I had time to get it working.  This patch is great.  It does work.  Here is how I got it to work.

First of all do not use the gentoo ebuild.  It dosne't leave the important files on the computer.  Second in your kernel do not compile any DRI or DRM drivers (I thinks thats right names for them).  Also do not compile any AGP Gart stuff.  It's just easyer this way.

Then download the driver and use the rpm program.  Then type

rpm -ivh --force --nodeps (Driver Name)

This will go through the whole prossess, but don't worry, it will install a driver with out the patch but it always works better if I let it do this.

Then just follow the instruction in the listing for patching the driver.  

To apply the patch: 

1) Download the patch, and save it in the /lib/modules/fglrx directory. 

2) type 'cat fglrx-glc22-4.2.0-2.5.1.i586-kt400agp3.patch | patch -p0' 

After that, just cd to the 'build_mod' directory, run 'make.sh', cd back to the fglrx directory and run 'make_install.sh' per usual. 

Then run fglrxconfig and startx.  It should work.  It did for me.  I get about 600-700FPS in teh fglx grears demo, so I know things are working.

All the patch is is the AGP driver for 2.5 kernel.  It's based on earler code and I've looked into the new working code and the auther might want to look at it, but sence the 2.5 kernel code is getting backported this might not be a worry.  Any WHO.....

I'm now off the download UT 2003 and see if this baby really works.

-dave

----------

## jhboricua

I also got it to work and I've modified the ati-drivers ebuild to do the patching and building and everything went flawlessly.

I can verify this works with kernel 2.4.20 (vanilla-sources) only at this time.  I know it won't work with the ac-sources.  Don't know about gentoo-sources.

As nephi513 pointed out, DO NOT BUILD EITHER AGP OR DRM.  If you had, better wipe them out of your system and recompile your kernel again.  I had them build as modules and X kept quiting at startup.  It wasn't until I wiped the modules from /lib and recompiled the kernel again that I got it to work.

Here are the links to both the modified ebuild and the patch file I mentioned above, just in case the link above goes down.

ebuild:  http://www.jhboricua.org/ati-drivers-2.5.1-r1.ebuild

patch file (IMPORTANT: This file should be copied/moved to /usr/portage/distfiles so the ebuild can work properly:  http://www.jhboricua.org/fglrx-glc22-4.2.0-2.5.1.i586-kt400agp3.patch

After the ebuild is done just run the fglrxconfig utility and you should be all set.

BTW, thanks to Skirst from the Rage3d linux forum who made and posted the patch.  He deserves all the credit for this.  Original thread is:  http://www.rage3d.com/board/showthread.php?s=&threadid=33666693

Enjoy.

PS - If you had previously tried to emerged the ati-driver, make sure to do a opengl-update xfree to switch back to the original opengl settings BEFORE emerging this modified ebuild.  It caused some problems for me at one point.

----------

## nephi513

Just wanted to know why you thought it wouldn't work on the ac-source.  Because I'm useing it and if there is a better kernel source I would love to use it.

I used the ac-souce because it has better KT400 ide drivers.

----------

## jhboricua

Maybe I should try again.  The patch failed with the latest ac-sources emerged so I figured it wouldn't work because maybe the agp code there changed.  But if you got it to work with the ac-sources then I'm wrong.

----------

## spamsk8r

Has anyone tried this with the newest version of the ATI drivers (2.9.12)?  The patch seems to work just fine on the agpgart module supplied but when I try to run make.sh in the build_mod directory I get this message:

spamsk8r build_mod # ./make.sh

ATI module generator V 2.0

==========================

Error:

kernel includes at /usr/src/linux/include do not match current kernel.

they are versioned as "2.4.20-gaming-r3"

instead of "".

you might need to adjust your symlinks:

- /usr/include

- /usr/src/linux

Does anyone know why my it is confused as to my kernel version?

Also, maybe someone could modify the ebuild so that it could be patched and built automatically.  I would do it but I really have no clue how to do so nor if this kernel version error would affect it.

----------

## Slinger

tag

----------

