ATI Mach64

Hi all,

I need help with mach64 direct rendering. I have compiled (Mandriva mach64 patches for 2.6.31 kernel were used) mach64.ko and it is modprobed successfully. /dev/dri/card0 exists. But Xorg seems not want interact with DRM interface:

# lsmod | grep mach64
mach64                 43488  0

I can not help you with the approach you adopted. Frankly compiling from Mandriva mach64 patches reads to be a bad idea for me, unless you are a driver developer.

But I wrote a practical theory guide here:
openSUSE Graphic Card Practical Theory Guide for Users - openSUSE Forums
… and my research indicates there os a mach64 driver packaged as part of the xorg-x11-driver-video rpm.

Your custom compile may have messed things up … and it may not have. It may be necessary for you to re-install xorg-x11-driver-video to put back the original mach64 driver if you want it back. mach64 driver packaged but the kernel module of drm interface isn’t a part of opensuse kernel.

Feel the difference between

I do not know what you are looking for, but I note my 64-bit openSUSE (where I use nvidia driver) also comes with:


I know very little as to what SHOULD be the content, but I do KNOW that the mach64 driver does work with X (as I helped a user set it up) with the basic rpms that come with openSUSE. One does not need to compile the way you have, unless one tried the openSUSE packaged mach64 and found it lacking.

It is a framebuffer driver.

You are definitely right that mach64 driver does work, but I can’t enable direct rendering, glx, and any kind of acceleration.

OK, … this is all new to me (I don’t have this hardware). I did get this “hit” when doing a google search: DRI Wiki - ATIMach64
… is that what you are trying to install ? … and you say that is different from the mach64 driver that comes with the openSUSE rpm xorg-x11-driver-video ?

There are two different modules. The first one is It is a video driver module that comes with xorg-x11-driver-video and provides Mach64 videochips support. The second module is kernel mach64.ko module. It is a interface for direct rendering. GLX support can’t be provided without such driver. This module isn’t provided by default due some reasons and I just got sources and built the module.

At the moment my problem is that module doesn’t want interact with and this way provide me direct rendering support.

Hmmm … I’m a bit surprised this has not been implemented on openSUSE, or if not implemented that it is not in the many 3rd party repositories.

I took a look at the content of the latest update (only a week or two ago) xorg-x11-driver-video- file, and its mach64 is from xf86-video-mach64-6.8.2.tar.bz2 … ie from version 6.8.2.

I also took a look at the repository

and looked inside the src file and it also has the 6.8.2 version.

… then I went here:

and again version 6.8.2 is the most recent

… I confess to being surprised that this kernel module you speak of is not already packaged by someone.

Do you have a developer’s web site referring to the version of this you are trying to build?

I confess to still be very puzzled by the approach you are trying to follow. It simply does not make sense to me, but I do not know enough to give you a replacement approach that would work for certain.

I was reading here: DRI Wiki - Building and it states the DRI 3D drivers are now built from the Mesa source.

I note that Mesa and the xorg-x11-driver-video on openSUSE was a bit buggy (saying this tactfully). Why do you not try updating Mesa and xorg-x11-driver-video to the latest cutting edge X11 : xorg version. I have guidance on that in post#11 on this thread: openSUSE Graphic Card Practical Theory Guide for Users - openSUSE Forums … even IF it is not everything that is needed, at least it will possibly fix one part of the update equation.

I used incorrect videomode. I reduced resolution and everything works well now… except the IRQ deadlocks of kernel module on videomode changing :slight_smile:

Glad to read its working. Is this with the Mandriva mach64 patches for 2.6.31 kernel ? If so, maybe you could write a sort of how to for others watching this thread ?


  1. It isn’t a good idea to build mach64.ko module. ATI Mach64 drm module isn’t
    included in main linux kernel tree due to security reasons and seems to be
    not maintained. I also have IRQ-deadlocks on my ATI Rage Pro.

  2. Download kernel SRPM package for Mandriva 2010.0 in order to obtain mach64 kernel module sources. Mandriva 2010.0 has 2.6.31 kernel and we belive that the patches are suitable for us because openSUSE 11.2 has the same kernel.

# wget
  1. Unpack the package:
# rpm2cpio kernel- | cpio -id
# tar -jxf linux-
# cp ./*mach64*patch .

We have three patch-files:

  • gpu-drm-mach64-2.6.31.patch

  • gpu-drm-mach64-fixes.patch

  • gpu-drm-mach64.patch

Remove other files that were extracted from SRPM.

  1. Let build mach64.ko for our kernel-desktop openSUSE kernel.

Install packages:

  • kernel-source

  • kernel-desktop-devel

Copy sources into our temporary directory:

# cp -r /usr/src/linux/drivers/gpu .

Apply the patches:

# patch -p2 < gpu-drm-mach64.patch
# patch -p2 < gpu-drm-mach64-2.6.31.patch
# patch -p2 < gpu-drm-mach64-fixes.patch

Build the module:

# cd ./gpu/drm/mach64
# make -C /lib/modules/ M=$PWD modules CONFIG_DRM_MACH64=m

We obtained mach64.ko for our kernel. Run as root:

# cp mach64.ko /lib/modules/
# depmod -a
  1. We are able to load the module:
# modprobe mach64

Check dmesg output:

“Initialized mach64 2.0.0 20060718 for 0000:01:00.0 on minor 0”

Now /dev/dri/card0 should exists.

  1. Configure as usual ( add Load “dri”, Load “glx”, etc ).
  2. Restart X

matwey, thank you for the guide.

I was thinking of copying it here: Unreviewed How To and FAQ - openSUSE Forums

Would that be ok by you?

I think you can just copy a whole thread into the ‘howto’ forum, because you are a global moderator. :slight_smile:

The second way is that I copy the reply into the thread:
openSUSE Graphic Card Practical Theory Guide for Users - Page 5 - openSUSE Forums


I followed your howto to the letter, but it didn’t work for me.
I had to replace ‘-desktop’ with ‘-default’:

When following your howto, modprobe kept saying ‘module not found’ (or ‘file not found’?..) even when I gave it the absolute path.

After changing ‘-desktop’ to ‘-default’ and rebuilding mach64.ko, modprobe mach64 was succesful.

I didn’t get a chance to test dri today, will do that tomorrow.

Of course, If you are running -default kernel you need compile module for -default flavor. I thought It was clear.

Well, it works. At 800x600x16, that is.

It wasn’t obvious to me, because I don’t really use opensuse - arch linux here. :slight_smile:

By the way, when using dri, the whole thing hangs when I log out. It gets as far as clearing the desktop icons and the panel.

Software rasterizer will have to do. Thanks for the howto, anyway.

The same is for me. :slight_smile: The dri code seems to be unmaintained for a long time.