# ATI Mach64 and Kernel 2.6 not working

## scourage

I'm upgrading my Gateway Solo 9300 from 2.4.20-gentoor7 to 2.6.0-test8.  I have the DRI modules for the mach64 from www.retinalburn.net/linux and they work great with 2.4.20, but I can't get them to compile with 2.6 (make fails).  I know it's an ancient card, but does anybody know of a patch for the make files, or a fix to get the mach64 DRI working in 2.6?  Do I need to recompile Xfree86 under 2.6 or anything like that?

Cheers, 

Bob

----------

## dberkholz

The best way to do this would be to search through the dri.sf.net patches list, which lists commits, and find the one that made them compile on 2.5 kernels. Then port that over to the mach64 stuff. Yeah, it's a lot of work.

----------

## scourage

I've looked just about everywhere to see if somebody smart made those patches already, but I guess I"ll just have to do it myself.  I've got very limited experience with dri, but I'm game.  Anybody want to help?

Cheers, 

Bob

----------

## scourage

A quick search looking for a start point and I found what I needed in the DRI CVS.

Cheers, 

Bob

----------

## dberkholz

Could you please post any progress you make to dri-devel mailing list and on this thread? Also the dri-devel list is a good place for questions about it.

It would be greatly appreciated.

Thanks!

----------

## scourage

still working on it... I don't have a solution yet, but when I find/make one.  I'll post it.

----------

## percking

Does anybody know how to get this working ??

I also had 3D support for my mach64 based rage mobility with 2.4 but now

I've upgraded to 2.6 and I'm trying to use the support built into the kernel. 

All i get is a black screen with white fuzz, even the terminal was just black and white fuzz.

I tried all different combinations of the 3 or 4 options listed under mach64

in the kernel and reproduced the same black and white fuzz with all of them.

any help would be appreciated !!

markLast edited by percking on Fri Jan 03, 2020 12:46 pm; edited 1 time in total

----------

## micmac

Hey,

it's good to know that I'm not alone with this problem. I got an older Compaq Laptop with a VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 100). And I'm not willing to ditch this laptop  :Smile: 

So if we could make this tread a meeting point for news on this matter I would appreciate it.I would like to use 2.6.x when Gentoo maintainers put it in vanilla-sources or so. And I'd like that DRI/xv will work too.

Thanks

mic

----------

## albright

To micmac: I had those symptoms until I turned off framebuffer

support. Then at least I could get a a screen. No DRI for me, 

but I haven't tried any of the special drivers.

So ... do you have framebuffer support compiled in and

are you trying to use it? Just a thought.

----------

## micmac

allbright: No, I was talking about the mach64.o kernelmodul. I got the DRI cvs branch patched for xv like described on retinalburn. I already have xfree-drm compiled with 2.4.22. It's just that I can't compile the module.

I saw a kernel option in 2.6 that would allow using other modules to be used. Maybe we can just turn this option on and cp our 2.4.x mach64.o to the 2.6.x modules directory and hope it works? Has anybody tried this? Would be a start if you ask me? 

What do you guys think?

mic

----------

## micmac

Maybe we should post a bug report on bugs.gentoo.org. I heard retinalburn has no interest in further developement of the mach64 driver because his own mach64 notebook is broken. Maybe the gentoo devs and maintainers know someone who would develop it further and make it usable with kernel 2.6. 

What do you guys think? Bug the maintainers with this issue?

mic

----------

## micmac

 *micmac wrote:*   

> Maybe we should post a bug report on bugs.gentoo.org. I heard retinalburn has no interest in further developement of the mach64 driver because his own mach64 notebook is broken. Maybe the gentoo devs and maintainers know someone who would develop it further and make it usable with kernel 2.6. 
> 
> What do you guys think? Bug the maintainers with this issue?
> 
> mic

 

I just searched bugs.gentoo.org for mach64 and found this ->

https://bugs.gentoo.org/show_bug.cgi?id=27099

Seems like mach64 is already supported by xfree-drm. So I guess if this is the case the only thing missing would be the xv patch by retinalburn. 

What do you think  :Smile: 

mic

----------

## dberkholz

 *micmac wrote:*   

>  *micmac wrote:*   Maybe we should post a bug report on bugs.gentoo.org. I heard retinalburn has no interest in further developement of the mach64 driver because his own mach64 notebook is broken. Maybe the gentoo devs and maintainers know someone who would develop it further and make it usable with kernel 2.6. 
> 
> What do you guys think? Bug the maintainers with this issue?
> 
> mic 
> ...

 

One of our new developers will be working on porting xfree-drm to 2.6 kernels. XFree86 4.4 will have xv for mach64, so once that comes out you're fine. Or you could use 4.3.99.x for now, but they're masked.

----------

## micmac

 *spyderous wrote:*   

>  *micmac wrote:*    *micmac wrote:*   Maybe we should post a bug report on bugs.gentoo.org. I heard retinalburn has no interest in further developement of the mach64 driver because his own mach64 notebook is broken. Maybe the gentoo devs and maintainers know someone who would develop it further and make it usable with kernel 2.6. 
> 
> What do you guys think? Bug the maintainers with this issue?
> 
> mic 
> ...

 

Thanks! Appreciate it very much!

mic

----------

## micmac

Hello again!

Couldn't wait for xfree 4.4.0 because I wanted to get speedstep finally up and running on this box. So upgraded to development-sources-2.6.0 and afterwards to xfree-3.99.602 (4.4.0-rc2). First I wasn't sure if I should use USE="gatos" for xfree because the xfree mach64 drivers seem to be derived from gatos.sf.net. But then I read it's for developers so I didn't use it.

So when the emerging was finished I used startx and xvinfo said I had xv. I tried with mplayer but mplayer was telling me something of limited resources and didn't start. Then I changed depth from 24 to 16 in xfrees config and it worked. 24 worked with the older drivers.

Thanks!

mic

----------

## dberkholz

 *micmac wrote:*   

> First I wasn't sure if I should use USE="gatos" for xfree because the xfree mach64 drivers seem to be derived from gatos.sf.net. But then I read it's for developers so I didn't use it.

 

I think USE=gatos is broken on 4.3.99 because gatos just doesn't work there (yet), it'll work once we add it to 4.3.0 though, but it isn't quite ready yet. A guide on setting it up should turn up also.

----------

## percking

has anything further come of dri support for the mach64 chipset in the 2.6 series kernel??

i've read posts saying to wait for the latest version of xfree or some such "wait".  

I just wanted to know if anybody has successfully (and reproducibly) gotten dri to work with the 2.6 series kernel?

markLast edited by percking on Fri Jan 03, 2020 12:46 pm; edited 1 time in total

----------

## dberkholz

 *percking wrote:*   

> has anything further come of dri support for the mach64 chipset in the 2.6 series kernel??
> 
> i've read posts saying to wait for the latest version of xfree or some such "wait".  
> 
> I just wanted to know if anybody has successfully (and reproducibly) gotten dri to work with the 2.6 series kernel?

 

Somebody has, it's not in our package yet. See dri-devel archives at dri.sf.net.

----------

## Sir Al

 *spyderous wrote:*   

>  *percking wrote:*   has anything further come of dri support for the mach64 chipset in the 2.6 series kernel??
> 
> i've read posts saying to wait for the latest version of xfree or some such "wait".  
> 
> I just wanted to know if anybody has successfully (and reproducibly) gotten dri to work with the 2.6 series kernel? 
> ...

 

Does this have TV-Out support as well?

----------

## kon

Good news!

http://www.retinalburn.net/linux/dri_status.html

----------

## Sir Al

 *kon wrote:*   

> Good news!

 

It seems the latest dri drivers don't have support for tv out, they don't come with the experimental TV out patch that worked splendidly in the earlier versions (but only with 2.4 kernel).

----------

## adastra

I've been following this post because I have recently had the problem myself.  But I have had mach64 working with gentoo-dev-sources.2.6.4-r1, just not at the moment.  

On a previous install, I was using the lastest gentoo-gaming sources (2.4.20-r8) and had mach64 working fine.  I decided to try the 2.6 kernel.  All I did was do the "make -f Makefile.linux" from the DRI build guide and compiled the kernel module against the 2.6 sources.  Installed the module and everything was great.  Then I got a new hard drive . . . .

Since I had the 2.6 working so well, I went straight for it.  Now when I try to compile the DRI mach64 trunk it errors out with

```

ln -s /usr/src/video/Mesa/src/mesa/main/accum.c accum.c

rm -f accum.h

ln -s /usr/src/video/Mesa/src/mesa/main/accum.h accum.h

make[5]: *** No rule to make target `/usr/src/video/Mesa/src/mesa/main/arbparse.c', needed by `arbparse.c'.  Stop.

make[5]: Leaving directory `/usr/src/video/dri/xc/xc/lib/GL/mesa/main'

make[4]: *** [includes] Error 2

make[4]: Leaving directory `/usr/src/video/dri/xc/xc/lib/GL/mesa'

make[3]: *** [includes] Error 2

make[3]: Leaving directory `/usr/src/video/dri/xc/xc/lib/GL'

make[2]: *** [includes] Error 2

make[2]: Leaving directory `/usr/src/video/dri/xc/xc/lib'

make[1]: *** [includes] Error 2

```

This isn't a compile error, necessarily.  It is a missing file!  I searched for that arbparse.c and it is nowhere to be found.  I tried updating both the Mesa and DRI CVS trees and still didn't get this file.  Even went back and compiled a 2.4.20 kernel, changed the /usr/src/linux symlink, rebooted, and tried again.  Same missing file.  What's wrong with the Mesa trunk?  Did someone forget to put back a file in the CVS?  Who do I notify about it?

----------

## dberkholz

Mesa CVS has been a little broken lately. You could try building against one of the latest releases and see how that goes.

----------

## adastra

spyderous, pleasure to finally talk to you.

What do you mean "the latest releases"?  Isn't the checkout from CVS the absolute latest?  Is there a way to get a previous version of the mach64 DRI tree?

----------

## dberkholz

 *adastra wrote:*   

> spyderous, pleasure to finally talk to you.
> 
> What do you mean "the latest releases"?  Isn't the checkout from CVS the absolute latest?  Is there a way to get a previous version of the mach64 DRI tree?

 

I mean using the latest Mesa release and DRI CVS. Mesa CVS is the newest, yes, but it doesn't qualify as a "release" so when I say "release," I'm not referring to CVS.

----------

## adastra

I HAVE MACH64 WORKING WITH GENTOO-DEV-SOURCES-2.6.4-R1!!!

Here is how I did it:

1.)  You need both mach64 branches (mach64-0-0-6-branch AND mach64-0-0-7-branch) checked out from CVS in separate directories.  Forget about checking out the Mesa CVS.  The 0-0-6-branch has Mesa already in it.

2.)  You need the mach64-dri-xv-20030331.diff.gz patch from retinalburn.net. 

3.)  Apply the kernel patch as instructed on this page.  (I don't think it is properly gzipped.  You will probably just need to apply the patch without gunzipping it.  man patch for more information.)

4.)  Compile the mach64-0-0-6-branch (edit the host.def, make World, make install).

5.)  Change to the ~/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel directory of the mach64-0-0-7-branch and compile your drivers (make -f Makefile.linux).

6.)  Copy the mach64.ko file from here to the proper /lib/modules/.../ directory.

7.)  Edit the proper /etc/modules.autoload.d/.../ file to load the mach64 driver.

8.)  Reboot and enjoy!  (May possibly need to issue an opengl-update xfree)

Works like a charm on my Armada laptop, glxgears gives 300fps in 16bpp at 1024x768.  Enough to play UT in 800x600 with all the fancy options off.  Incidently, I gained ~100fps by using the following options in my XF86Config:

```

Section "Device"

    Identifier  "ATI Mach64"

    Driver      "ati"

    VideoRam    8192

    Option      "AgpSize"     "64"

    Option      "AgpMode"     "2"

    Option      "BufferSize"  "2"

    Option      "LocalTextures" "true"

    Option      "DMAMode" "async"

    # Insert Clocks lines here if appropriate

EndSection

```

Hope this works for those having trouble.  Maybe the 0-0-7-branch will work again someday.  Until then, this will have to do.

----------

## IntergalacticWalrus

Cool! One less reason for my laptop to stick with 2.4! I'm trying this as soon as I can.

UPDATE: Has anybody tried the packages available here: http://www.freedesktop.org/~dri/snapshots/bleeding-edge/ ??

They seem up to date, and have both Xv and 2.6 support, from what I can tell (not sure). I'll give them a shot.

----------

## adastra

Yes those are the binaries.  I believe, and spyderous can correct me if I'm wrong, those are the things that emerge xfree-drm downloads and installs.  They never worked on my machine but I really don't know why.

----------

## dberkholz

 *adastra wrote:*   

> Yes those are the binaries.  I believe, and spyderous can correct me if I'm wrong, those are the things that emerge xfree-drm downloads and installs.  They never worked on my machine but I really don't know why.

 

Not quite. The snapshots contain a bunch of stuff that xfree-drm doesn't (2D driver, 3D driver, libGL I think, some other miscellaneous stuff). xfree-drm only provides the kernel module (a.k.a. the DRM or Direct Rendering Manager).

----------

## IntergalacticWalrus

Allright, I just tried those binaries I mentioned before. The kernel module compiles fine under 2.6, however XFree86 b0rks at startup and exits with an error message saying that the driver ABI is at version 7, but it wants version 6.

I currently run the latest XFree86 in stable Portage, ie. 4.3.0-r(something). My guess is that I must run a more recent version of XFree86. Am I right? And will the most recent in unstable Portage do? (I know about those nasty license issues, and therefore it's not really the latest version...)

----------

## dberkholz

 *IntergalacticWalrus wrote:*   

> Allright, I just tried those binaries I mentioned before. The kernel module compiles fine under 2.6, however XFree86 b0rks at startup and exits with an error message saying that the driver ABI is at version 7, but it wants version 6.
> 
> I currently run the latest XFree86 in stable Portage, ie. 4.3.0-r(something). My guess is that I must run a more recent version of XFree86. Am I right? And will the most recent in unstable Portage do? (I know about those nasty license issues, and therefore it's not really the latest version...)

 

You need the XFree86 binary from http://www.freedesktop.org/~dri/snapshots/extras/

----------

## IntergalacticWalrus

Tried that binary, now I get the following error instead:

```
Required symbol xf86I2CGetScreenBuses from module /usr/X11R6/lib/modules/drivers/atimisc_drv.o is unresolved!
```

----------

## dberkholz

 *IntergalacticWalrus wrote:*   

> Tried that binary, now I get the following error instead:
> 
> ```
> Required symbol xf86I2CGetScreenBuses from module /usr/X11R6/lib/modules/drivers/atimisc_drv.o is unresolved!
> ```
> ...

 

grep -r xf86I2CGetScreenBuses /usr/X11R6/

----------

## IntergalacticWalrus

 *spyderous wrote:*   

>  *IntergalacticWalrus wrote:*   Tried that binary, now I get the following error instead:
> 
> ```
> Required symbol xf86I2CGetScreenBuses from module /usr/X11R6/lib/modules/drivers/atimisc_drv.o is unresolved!
> ```
> ...

 

```
Binary file /usr/X11R6/lib/modules/drivers/atimisc_drv.o matches
```

*Curses heavily*

What the hell? The bloody symbol was actually there!

I'll try a previous snapshot of the binary package when I'll have the time, maybe it's a one-day issue.

----------

## dberkholz

 *IntergalacticWalrus wrote:*   

>  *spyderous wrote:*    *IntergalacticWalrus wrote:*   Tried that binary, now I get the following error instead:
> 
> ```
> Required symbol xf86I2CGetScreenBuses from module /usr/X11R6/lib/modules/drivers/atimisc_drv.o is unresolved!
> ```
> ...

 

No, see, that mention is the requirement for it, not the existence of it.

```
supernova root # grep -r xf86I2CGetScreenBuses /usr/X11R6/

Binary file /usr/X11R6/lib/modules/libi2c.a matches

Binary file /usr/X11R6/lib/modules/drivers/atimisc_drv.o matches
```

It's present in newer versions. You might want to try 1) downloading and building the full DRI CVS or 2) xfree-4.3.99.

----------

## IntergalacticWalrus

 *spyderous wrote:*   

>  *IntergalacticWalrus wrote:*    *spyderous wrote:*    *IntergalacticWalrus wrote:*   Tried that binary, now I get the following error instead:
> 
> ```
> Required symbol xf86I2CGetScreenBuses from module /usr/X11R6/lib/modules/drivers/atimisc_drv.o is unresolved!
> ```
> ...

 

So if I emerge the latest xfree in ~x86, I should be all right?

BTW the snapshot binary package I tried was dated 20040328, shouldn't that be recent enough?Last edited by IntergalacticWalrus on Sat Apr 03, 2004 8:48 pm; edited 1 time in total

----------

## dberkholz

 *IntergalacticWalrus wrote:*   

>  *spyderous wrote:*   It's present in newer versions. You might want to try 1) downloading and building the full DRI CVS or 2) xfree-4.3.99. 
> 
> So if I emerge the latest xfree in ~x86, I should be all right?

 

No, you need 4.3.99 as I said, which is masked in package.mask.

----------

## IntergalacticWalrus

#@&! I just found out the linuxwacom driver does not yet support 4.3.99, so I can't upgrade to 4.3.99 without losing my Wacom.

I guess I'll try compiling DRI from CVS then.

----------

## IntergalacticWalrus

I just updated to 4.3.99, and installed the previously mentionned binary package. Now DRI seems to load perfectly according to /var/log/XFree86.0.log, but I still don't get direct rendering !!! WTF? glxinfo reports that direct rendering is off! ARGH!

Ugh, at least the linuxwacom driver works, unlike what I read about it and 4.3.99...

----------

## dberkholz

 *IntergalacticWalrus wrote:*   

> I just updated to 4.3.99, and installed the previously mentionned binary package. Now DRI seems to load perfectly according to /var/log/XFree86.0.log, but I still don't get direct rendering !!! WTF? glxinfo reports that direct rendering is off! ARGH!
> 
> Ugh, at least the linuxwacom driver works, unlike what I read about it and 4.3.99...

 

Check the usual suspects: dmesg, /var/log/XFree86.0.log, LIBGL_DEBUG=verbose glxinfo

----------

## IntergalacticWalrus

 *spyderous wrote:*   

>  *IntergalacticWalrus wrote:*   I just updated to 4.3.99, and installed the previously mentionned binary package. Now DRI seems to load perfectly according to /var/log/XFree86.0.log, but I still don't get direct rendering !!! WTF? glxinfo reports that direct rendering is off! ARGH!
> 
> Ugh, at least the linuxwacom driver works, unlike what I read about it and 4.3.99... 
> 
> Check the usual suspects: dmesg, /var/log/XFree86.0.log, LIBGL_DEBUG=verbose glxinfo

 

LIBGL_DEBUG=verbose glxinfo reports:

```
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/mach64_dri.so

libGL error: dlopen /usr/X11R6/lib/modules/dri/mach64_dri.so failed (/usr/X11R6/lib/modules/dri/mach64_dri.so: undefined symbol: _swrast_alloc_aux_buffers)

libGL error: unable to find driver: mach64_dri.so
```

Yay, yet more undefined symbols.

----------

## IntergalacticWalrus

Just wanted to know: does the new xorg-x11 come with mach64 DRI ??

UPDATE: Turns out that no, it does not. I think I'll try the binary drivers though.

----------

## IntergalacticWalrus

Just to say that I did a CVS build of DRI over xorg-x11, and it works now. However, performance is much less greater than before.  :Sad: 

----------

## kon

1 xorg-x11 have xv support for mach64

2 http://www.freedesktop.org/~dri/snapshots/common-20040526-linux.i386.tar.bz2

and

3 http://www.freedesktop.org/~dri/snapshots/mach64-20040526-linux.i386.tar.bz2

and i have DRI on my  2.6.5-gentoo-r1

----------

## johnsteele

I know this thread is a little old, but I wanted to know if anyone has had any success building the mach64.ko module against a 2.6.7 kernel? I first tried to use the one I had built from 2.6.5 with no luck, then I've tried to build against gentoo-dev-sources and vanilla 2.6.7 with no luck. Wanted to know others' experience with this. Here's the message I get when I try to build:

 #make -f Makefile.linux LINUXDIR=/usr/src/linux-2.6.7 make -C /usr/src/linux-2.6.7  SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules

make[1]: Entering directory `/usr/src/linux-2.6.7'

  CC [M]  /xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o

In file included from /xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c:57:

/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h: In function `gamma_do_vm_nopage':

/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:104: error: structure has no member named `count'

make[2]: *** [/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o] Error 1

make[1]: *** [_module_/xc/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.7'

make: *** [modules] Error 2

any thoughts would be greatly appreciated.

----------

## eikketk

Yeah, is there any news on this? I just got  a 3D Rage Pro based pc, and I'd love to get dri and/or xv support on it. Xompiled xorg-x11 6.7.0-r1 yesterday, hope that's a good one  :Wink: 

Trying to get the mach64 kernel module compiled now too (kernel oppses on boot, but that could be related to something else of course)

Any updates?

Greetings, Ikke

----------

