You are not logged in.

#51 2004-06-17 20:24:08

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Upgraded to kernel 2.6.7, and fail to compile both 3.7, 3.9 drivers at this point when I do the make.sh in build_mod. Any ideas?

[root@intel2500 build_mod]# ./make.sh
ATI module generator V 2.0
==========================
initializing...
cleaning...
patching 'highmem.h'...
skipping patch for 'drmP.h', not needed
skipping patch for 'drm_os_linux.h', not needed
assuming new VMA API since we do have kernel 2.6.x...
doing Makefile based build for kernel 2.6.x and higher
make -C /lib/modules/2.6.7/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.7'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/agp3.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/nvidia-agp.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/agpgart_be.o
/lib/modules/fglrx/build_mod/2.6.x/agpgart_be.c: In function `agp_generic_alloc_page':
/lib/modules/fglrx/build_mod/2.6.x/agpgart_be.c:1405: error: structure has no member named `count'
/lib/modules/fglrx/build_mod/2.6.x/agpgart_be.c: In function `ali_alloc_page':
/lib/modules/fglrx/build_mod/2.6.x/agpgart_be.c:4416: error: structure has no member named `count'
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/agpgart_be.o] Error 1
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.7'
make: *** [kmod_build] Error 2
build succeeded with return value 0
duplicating results into driver repository...
cp: cannot stat `fglrx.ko': No such file or directory
done.
==============================
You must change your working directory to /lib/modules/fglrx
and then call ./make_install.sh in order to install the built module.
==============================
[root@intel2500 build_mod]#

Thanks,
Jay


--
JSkier

Offline

#52 2004-06-22 15:52:08

Duke
Member
From: Montreal, Canada
Registered: 2004-06-22
Posts: 41

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Well, I had each and every problem listed in this thread, and I worked my way through them all.  I made a package for the 3.9.0 drivers, but I just have one problem.   When compiling, it isn't finding the drm headers in /usr/X11R6/src/linux/drm/header.  I simply copy them into /usr/src/linux/include for the compile and then remove them, which is a quick and dirty fix.  How do I set which directory the include files are?  So that I can add the drm header files directory?

Also, all was well for the 3.9.0 drivers, although they needed some patching to compile correctly for the 2.6.7 kernel I'm running, but the 3.2.8 drivers (which I've been told are faster) needed more modification because of a VMALLOC error I was getting, it was simple to fix, but the module would then compile and load, but X wouldn't start, any ideas on that one?

Either way, when I fix the include directory problem I'll finish off the 3.9.0 package so that it'll install patch and compile and install the module through pacman (as the nvidia drivers package a;ready do in staging) and upload it to incoming for everyone to enjoy.

I hope someone can help me with the includes, and I hope the package will help everyone after...

Offline

#53 2004-06-22 19:58:24

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Finally found a way around this. For those wishing to run kernel 2.6.7 and the ATI drviers, here is a patch:

http://kerneltrap.org/node/view/3298

~Jay


--
JSkier

Offline

#54 2004-06-23 04:49:38

Duke
Member
From: Montreal, Canada
Registered: 2004-06-22
Posts: 41

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

For newer driver versions, that patch will indeed solve the problem, it looks very simmilar to the code I changed to get it to compile against 2.6.7, although, with my patches, 3.2.8 drivers will compile, load, but won't work, Xorg won't even load up.  I had to patch the drivers to solve a VMALLOC and VMADDR error, but I'm not sure why this happens.

I wanted to get the 3.2.8 installed, because apparently they run AA and UT faster than the new drivers,  I say apparently because they seem to, maybe it's an option that was turned off on the old drivers and is turned on by default on the newer, I don't know.  If anyone knows how to get the new drivers running as fast as the 3.2.8s, please, do tell.

Offline

#55 2004-06-23 22:54:24

darksides
Member
Registered: 2004-01-30
Posts: 18

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

I've succesfully installed drivers patching

lib/modules/fglrx/build_mod/firegl_public.c

with those patches in the same order:

fglrx-3.9.0-allocation.patch

diff -ur build_mod.orig/firegl_public.c build_mod/firegl_public.c
--- build_mod.orig/firegl_public.c    2004-03-18 07:00:29.000000000 +0900
+++ build_mod/firegl_public.c    2004-05-28 02:10:48.258677968 +0900
@@ -2816,10 +2816,21 @@
 #ifdef FGL
 struct _agp_memory* __ke_agp_allocate_memory_phys_list(__ke_size_t pages, unsigned long type, unsigned long * phys_addr)
 {
-#if 0
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,0)
 #ifdef __AGP__
-    if (AGP_AVAILABLE(allocate_memory_phys_list))
-        return AGP_FUNC(allocate_memory_phys_list)(pages, type, phys_addr);
+    if (AGP_AVAILABLE(allocate_memory)) {
+        int i;
+        struct _agp_memory* newmem = AGP_FUNC(allocate_memory)(pages, type);
+
+        if (newmem) {
+            /* convert/copy the pysical adresses into the "new" agp_memory table */
+            for (i = 0; i < pages; i++) {
+                phys_addr[i] = newmem->memory[i];
+            }
+        }
+
+        return newmem;
+    }
 #endif /* __AGP__ */
 #endif
     if (firegl_agp)

fglrx-2.6-vmalloc-vmaddr.patch

diff -ruN build_mod.orig/firegl_public.c build_mod/firegl_public.c
--- build_mod.orig/firegl_public.c    2003-09-05 00:45:33.539384168 +0200
+++ build_mod/firegl_public.c    2003-09-05 00:47:13.193234480 +0200
@@ -129,7 +129,9 @@
         #define pte_offset  pte_offset_map
     #endif
 #endif
-
+#ifndef VMALLOC_VMADDR
+#define VMALLOC_VMADDR(x)  ((unsigned long)(x))
+#endif
 // ============================================================
 #ifndef TRUE
 #define TRUE 1

fglrx-2.6-get-page.patch

diff -ruN lib.orig/modules/fglrx/build_mod/agpgart_be.c lib/modules/fglrx/build_mod/agpgart_be.c
--- lib.orig/modules/fglrx/build_mod/agpgart_be.c    2004-03-04 18:25:44.000000000 +0100
+++ lib/modules/fglrx/build_mod/agpgart_be.c    2004-05-27 16:10:56.874535000 +0200
@@ -1402,7 +1402,8 @@
     }
 #endif
 
-    atomic_inc(&page->count);
+    //atomic_inc(&page->count);
+    get_page(page);
     set_bit(PG_locked, &page->flags);
     atomic_inc(&agp_bridge.current_memory_agp);
 
diff -ruN lib.orig/modules/fglrx/build_mod/firegl_public.c lib/modules/fglrx/build_mod/firegl_public.c
--- lib.orig/modules/fglrx/build_mod/firegl_public.c    2004-05-27 16:24:10.879828208 +0200
+++ lib/modules/fglrx/build_mod/firegl_public.c    2004-05-27 16:11:33.393983000 +0200
@@ -2059,8 +2059,8 @@
     pMmPage = virt_to_page(kaddr);
 #endif /* LINUX_VERSION_CODE < 0x020400 */
 
-    atomic_inc(&(pMmPage->count));  /* inc usage count of page */
-
+//    atomic_inc(&(pMmPage->count));  /* inc usage count of page */
+    get_page(pMmPage);
 #if LINUX_VERSION_CODE >= 0x020400
   //  __KE_DEBUG3("vm-address 0x%08lx => kernel-page-address 0x%pn",
     //    address, page_address(pMmPage));

fglrx-3.9.0-regparm.patch
posting soon

Offline

#56 2004-06-25 14:25:10

jskier
Member
From: Minnesota, USA
Registered: 2003-07-30
Posts: 383
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Here's my two cents:

I opted to go back to kernel 2.6.5 and the 3.7.0 drivers (after getting the flglrx 3.9.0 at 2.6.7 kernel going, and the 3.2.8 ones wouldn't install). The performance seems better here than with the newer drivers and kernel releases based on my experience.... FPS is still jumpy but higher in every app (Tux, Q3, screensavers). Anyone else have better luck with other drivers / configs, please post.

~Jay


--
JSkier

Offline

#57 2004-07-17 16:50:00

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 488

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

The main wiki (first post of the thread) hasn't been updated in ages. Now the informaiton is rather scattered throughout the thread and it is extremely difficult to get a working installation.

Could somebody please figure out all the necessary steps to get kernel 2.6.7. and the 3.9.0 drivers? I've got a hodgepodge of various files that are all supposed to be needed as patches and whatnot, and everything is a little hazy.

This thread really deserves to be kept alive and updated, as I'm sure there are many ATI owners around here. smile I know I need them on three of my machines. I've gotten it working on one of them with 2.6.7 and the 3.7.8 drivers, and that was quite an adventure.

Offline

#58 2004-07-18 21:11:06

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 488

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

HA! I got the 3.9.0 drivers working on 2.6.7.

Now I just need to make some patches and new directions if I feel charitable. smile Then again, I'm very bored.

Offline

#59 2004-07-18 22:01:00

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 488

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

OK, here's how I did it.

PKGBUILD:
Put it in /var/abs/local/ati
http://www.mstcforum.com/fglrx-patch/PKGBUILD

.install file
Put it in /var/abs/local/ati
http://www.mstcforum.com/fglrx-patch/at … rs.install

Patches
http://www.mstcforum.com/fglrx-patch/fi … .9.0-patch
http://www.mstcforum.com/fglrx-patch/ag … .9.0-patch

Use these after you have installed the package using the pacman -A command.

cd /lib/modules/fglrx/build_mod/
patch -p0 < /path-to-patches/firegl_public.h-3.9.0-patch
patch -p0 < /path-to-patches/agpgart_be.h-3.9.0-patch

Then finish up:
sh make.sh
cd ..
sh make_install.sh

You should be done.

I guess I'll integrate the two guides and create a friendlier guide to follow later, but for now I guessed people might be interested in getting the drivers working in one nice neat post. smile

Offline

#60 2004-07-21 10:30:33

darksides
Member
Registered: 2004-01-30
Posts: 18

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

NICE WORK!!!!
tongue  tongue  tongue


kleptophobiac wrote:

OK, here's how I did it.

PKGBUILD:
Put it in /var/abs/local/ati
http://www.mstcforum.com/fglrx-patch/PKGBUILD

.install file
Put it in /var/abs/local/ati
http://www.mstcforum.com/fglrx-patch/at … rs.install

Patches
http://www.mstcforum.com/fglrx-patch/fi … .9.0-patch
http://www.mstcforum.com/fglrx-patch/ag … .9.0-patch

Use these after you have installed the package using the pacman -A command.

cd /lib/modules/fglrx/build_mod/
patch -p0 < /path-to-patches/firegl_public.h-3.9.0-patch
patch -p0 < /path-to-patches/agpgart_be.h-3.9.0-patch

Then finish up:
sh make.sh
cd ..
sh make_install.sh

You should be done.

I guess I'll integrate the two guides and create a friendlier guide to follow later, but for now I guessed people might be interested in getting the drivers working in one nice neat post. smile

Offline

#61 2004-07-21 17:17:21

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 488

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Yay, I'm glad somebody benefitted from it. big_smile  8)

I'll write that guide after I get back from an appointment this afternoon.

EDIT:
scratch tonight, that appointment drained me...

Offline

#62 2004-07-21 20:44:26

draetsch
Member
Registered: 2004-02-25
Posts: 21

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Oh dear, am I too stupid to do it? I followed the instructions carefully but the only thing I get, when using

sh make.sh

is:

ATI module generator V 2.0
==========================
initializing...
Error:
XFree86 drm includes at /lib/modules/2.6.7/build/include/../drivers/char/drm do not fit this driver.
This driver is designed to only work with X4.1.0 or higher.
You can match this by getting Linux kernel 2.4.8 or higher.

I have a new installed archlinux 0.7 system with xorg and kernel 2.6.7

Offline

#63 2004-07-25 06:42:43

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

i got the exact same config (arch 0.7, kernel 2.6.7) and i get this same error message.  sad

draetsch wrote:

Oh dear, am I too stupid to do it? I followed the instructions carefully but the only thing I get, when using

sh make.sh

is:

ATI module generator V 2.0
==========================
initializing...
Error:
XFree86 drm includes at /lib/modules/2.6.7/build/include/../drivers/char/drm do not fit this driver.
This driver is designed to only work with X4.1.0 or higher.
You can match this by getting Linux kernel 2.4.8 or higher.

I have a new installed archlinux 0.7 system with xorg and kernel 2.6.7

Offline

#64 2004-07-26 01:31:34

hypermegachi
Member
Registered: 2004-07-25
Posts: 311

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

finally i got it working!

i got this working with my own compiled kernel, so Allyn may be right that you cannot use the stock kernel.

anyways, i followed kleptophobiac's instructions and it worked.

the error message i got, ie:

ATI module generator V 2.0
==========================
initializing...
Error:
XFree86 drm includes at /lib/modules/2.6.7/build/include/../drivers/char/drm do not fit this driver.
This driver is designed to only work with X4.1.0 or higher.
You can match this by getting Linux kernel 2.4.8 or higher.

occured because /lib/modules/2.6.7/build is actually a symlink, linking to /usr/src/linux-2.6.7.  this is there by default when you install a stock kernel from pacman, but it does NOT include the full source.  so i relinked it to my full source (mine's in abs), and make.sh worked like a charm!

Offline

#65 2004-07-28 21:04:10

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 488

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Funny... I didn't even think of stock/custom kernel. I always build my own, sorry I didn't uncover that issue earlier.  wink

What goes wrong on your machine, Allyn?

Offline

#66 2004-07-30 09:58:25

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

I finally got a working PKGBUILD, and patches.

Binary: http://arch.subpop.net/arch/link/ati-dr … pkg.tar.gz
Source: http://arch.subpop.net/sources/ati-drivers/
xorg.conf: http://files.subpop.net/configs/xorg.conf

This requires the 2.6.7-1 kernel package, and xorg (rather than XFree86). You will need to force the install because there's a conflict with the existing libGL.so.1.2 (I'll take care of that file conflict somehow later).
I've posted my xorg.conf, so you can see a working example, if you're having trouble with the nasty XF86Config-4 file that the fglrxconfig script generates.
If your brave, try it out and tell me where and how it breaks. But this does work! I get 3541 FPS in glxgears!  big_smile

Didn't realize there was another working PKGBUILD up above. Now there's a choice! smile

EDIT: Okay, my website's back up, so I've changed the above links.

Offline

#67 2004-08-02 13:15:40

darksides
Member
Registered: 2004-01-30
Posts: 18

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

TO ALL USERS
==========


REMEBER to install rpmunpack.

Offline

#68 2004-08-02 16:56:26

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Well, my packages only require rpm2targz (which is in my repository). And only if you want to build from source. Has anyone had any success with the binary I built?

Offline

#69 2004-08-04 21:32:41

ActionNews
Member
From: Augsburg (Germany)
Registered: 2004-02-24
Posts: 150
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

link wrote:

Well, my packages only require rpm2targz (which is in my repository). And only if you want to build from source. Has anyone had any success with the binary I built?

As the PKGBUILD doesn't seem to work with my system (perhaps i chose an old version. didn't try kleptophobiacs PKGBUILD yet), i'll try your binary later on smile.
All i have to do ist to install it with "pacman -A ati-drivers-3.9.0-2.pkg.tar.gz" and change my xorg.conf?
Soo this seems to be rather simple smile.

CU ActionNews

PS: Here in Germany it's already 23:40, so realy time to sleep wink. I'll try it tomorrow smile.


[URL=http://www.nethands.de/athlon/show.php3?user=actionnews]My System[/URL] - one click ahead!

Offline

#70 2004-08-04 22:14:21

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

link wrote:

Well, my packages only require rpm2targz (which is in my repository). And only if you want to build from source. Has anyone had any success with the binary I built?

I haven't really followed the thread (I don't have an ATI card for once + thread started a long time before I switched to Arch) but, can't you replace rpm2targz with rpmunpack(extra) & cpio(current)?

Offline

#71 2004-08-05 03:54:05

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

IceRAM wrote:

I haven't really followed the thread (I don't have an ATI card for once + thread started a long time before I switched to Arch) but, can't you replace rpm2targz with rpmunpack(extra) & cpio(current)?

Probably, but I'm familiar with rpm2targz, so that's what I wanted to use. It should only be a makedepends though. If I have it as a depends, that's a problem.

ActionNews wrote:

All i have to do ist to install it with "pacman -A ati-drivers-3.9.0-2.pkg.tar.gz" and change my xorg.conf?
Soo this seems to be rather simple  smile

Yep. That's the idea. You can use the fglxf86config, but it generates the ugliest XF86Config file I've ever seen, so I've just hand edited mine.

Offline

#72 2004-08-05 04:28:44

ActionNews
Member
From: Augsburg (Germany)
Registered: 2004-02-24
Posts: 150
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Sooo ... back again smile.

Froced the driver to install with nodeps because i have allready installed a custom Kernel 2.6.7, so when i try to update Kernel26 i get an error that System is auto of memory and pacman will be killed.
Then i had to search a littlebit fglrxconfig wink as archlinux doesn't search programms in /opt/ati/bin smile. But after running fglrxconfig an mv XF86Config-4 to xorg.conf a  simple startx now brings KDE 2.3.2 on my screen smile. Thanks smile. Didn't test OpenGL so far but ... mom testing wink ...

glxgears
808 frames in 5.0 seconds = 161.600 FPS
783 frames in 5.0 seconds = 156.600 FPS
791 frames in 5.0 seconds = 158.200 FPS
678 frames in 5.0 seconds = 135.600 FPS
791 frames in 5.0 seconds = 158.200 FPS
791 frames in 5.0 seconds = 158.200 FPS
791 frames in 5.0 seconds = 158.200 FPS
678 frames in 5.0 seconds = 135.600 FPS

It's a Radeon 9600XT with 4xFSAA activated smile. Rather slow isn't it sad?

Oh :cry: :

./fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 (1.4 Mesa 5.0.2)

OpenGL doesn't seem to work sad.

CU ActionNews


[URL=http://www.nethands.de/athlon/show.php3?user=actionnews]My System[/URL] - one click ahead!

Offline

#73 2004-08-05 04:51:13

ActionNews
Member
From: Augsburg (Germany)
Registered: 2004-02-24
Posts: 150
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Forgot to load the module fglrx, but ...
That seems to be the Problem:

modprobe fglrx
FATAL: Module fglrx not found.

fglrx.ko is in /lib/modules/2.6.7/video.
Adding fglrx to /etc/rc.conf doesn't work either.

Any ideas?

CU ActionNews


[URL=http://www.nethands.de/athlon/show.php3?user=actionnews]My System[/URL] - one click ahead!

Offline

#74 2004-08-05 04:57:43

link
Member
Registered: 2004-04-30
Posts: 69

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

OpenGL doesn't seem to work sad.

You have to force install because the ati-drivers package provides /usr/lib/X11R6/libGL.so.1.2, which is also provided by the xorg package. Check the following md5sum against your file /usr/lib/X11R6/libGL.so.1.2.

2bbedfcc3582c8166ad461d384731bad  /usr/X11R6/lib/libGL.so.1.2

Check to see if /usr/X11R6/lib/libGL.so.0 is a symlink to /usr/X11R6/lib/libGL.so.1.2. My ati-drivers package doesn't include those symlinks, since the xorg package already does. The only file I overwrite is the actual libGL.so.1.2 file itself.

fglrx.ko is in /lib/modules/2.6.7/video

What's your dmesg output look like when you try to load the module. Since this package doesn't do compile on install (kinda defeats the purpose of binary packages doesn't it?), there may be kernel mismatches. I have gotten a request for a kernel24 version of this package, so I may reversion the package to include the kernel versions, like: ati-drivers-3.9.0-2.6.7 or ati-drivers-3.9.0-2.6.7mm or whatever.

Then i had to search a littlebit fglrxconfig wink as archlinux doesn't search programms in /opt/ati/bin smile.

Make sure you're sourcing /etc/profile somewhere. This package does include a /etc/profile.d/ati-drivers.sh file, which adds /opt/ati/bin to the PATH.

It's a Radeon 9600XT with 4xFSAA activated smile. Rather slow isn't it sad?

Yea that seems pretty slow, but since you're still using the Mesa OpenGL libraries, that makes sense.

Good luck and thanks for the feedback! smile

Offline

#75 2004-08-05 06:26:32

ActionNews
Member
From: Augsburg (Germany)
Registered: 2004-02-24
Posts: 150
Website

Re: [HOW-TO] Ati Radeon & Kernel 2.6 - Updated

Thank you! I'll test it when i'm back from work smile.

CU ActionNews


[URL=http://www.nethands.de/athlon/show.php3?user=actionnews]My System[/URL] - one click ahead!

Offline

Board footer

Powered by FluxBB