From ArchWiki
Revision as of 08:09, 8 November 2010 by Zecas (Talk | contribs) (I used the AUR package, and it worked, so I update the wiki. I also removed the DRI WIKI copy as it a bad idea to copy what is a link away.)

Jump to: navigation, search

This page is a walk through on obtaining Direct Rendering on some mach64 graphics chipsets. If you are looking for the ATI Rage 128, this is not the correct page, however this is the page for the ATI Rage Pro. Also, if you only want 2D drivers, install just xf86-video-mach64 and skip this.

The Mach 64 Board

The Mach64 Chip is made by ATI. This page is targeted at the Rage Pro video card which is the only OpenGL compiant version of the mach64. Wikipedia: Mach64/Rage Pro This board has basic 3D capabilites, but Arch's xf86-video-mach64 package does not provide the complete solution. The kernel DRM module is needed, but not included in the kernel. Why Isn't the Mach64 DRM Included In the Kernel?

Most GNU/Linux 3D graphics drivers use the DRI/DRM system for direct rendering, which is what the Mach64 Driver uses.

Packages and References

Reference Building DRI - Check this for link updates.

  • mesa - installs the mesa GL libs - Install this with pacman.
  • libgl - installs the gl libs (part of the 'official' mesa source tree) (). - install this with pacman
  • libdrm - installs the drm libs - install this with pacman
  • xf86-video-mach64 - installs the xorg driver
  • mach64-dri - installs the dri files for mach64


  • DRM - the kernel module that controls DMA, AGP memory management, resource locking, and secure hardware access.
  • DRI - Direct Rendering Infrastructure - The X Server Driver. This allows the X server to communicate with the Graphics Card, translating OpenGL into instructions for the video card.

Building the kernel mach64 module from AUR

Before you start: Security Hole Warning

The only way to solve this is using the mach64drm AUR package:

Thanks to the mantainer TryA!!

Installing the other end: DRI

pacman -S xf86-video-mach64


This is what my the Device section in my xorg.conf looks like:

Section "Device"
       Identifier  "Card0"
       Driver      "mach64"
       Card        "ATI Rage Pro - Mach64"
       Option "DMAMode" "async"
       Option "ForcePCIMode" "false"
       Option "AgpMode" "2"
       Option "AgpSize" "32"
       Option "BufferSize" "2"
       Option "LocalTextures" "true"


  • Driver: most important, allows you to use the mach64 driver.
  • DMAMode: async - default, sync (synchronous DMA), mmio (PIO/MMIO) - Dispatch Buffers.
  • ForcePCIMode: boolean, disables AGP aperture. Set to True if you have a PCI card.
  • AgpMode (AGP 1x or 2x): 1 or 2. If not set, defaults to agpgart's mode.
  • AgpSize: sets the AGP aperture in MB - The video card can access this amount of system memory using AGP and shared access in order to expand its memory capacity - enlarging this allows more textures to be stored here.
  • BufferSize: sets DMA buffer memory size in MB. Default is 2 MB. May be 1 or 2.
  • LocalTextures: boolean, by default, AGP cards will only use AGP memory for textures. To force using local card memory for textures in addition to AGP, you may set this option to true.

The AgpSize option changes the amount of system memory used for the AGP aperture and is not limited by the size of the card's on-board video memory. This memory is used for the DMA buffers BufferSize option), and the remainder is allocated for AGP textures. Of course, the AgpMode/AgpSize options are ignored for PCI cards or if ForcePCIMode is enabled on an AGP card. However, the BufferSize option can be used to change the size of the DMA buffers in system memory for both PCI and AGP cards (but it's not recommended to reduce the buffer size unless you are short on system RAM). [1] (dead link)

The Modules Section:

Section "Module"
       <Your modules>
       Load  "glx"
       Load  "dri"

The DRI Section:

Section "DRI"
       Mode 0666 #allows anybody to use DRI

The DRI Section (For machines where security is a concern):

Section "DRI"
       Group "video" #change to any desired group to restrict access
       Mode 0660

Testing DRI

After you're in X, you can run the command glxinfo | egrep "direct rendering|OpenGL renderer" This should return something like this:

direct rendering: Yes
OpenGL renderer string: Mesa DRI Mach64 [Rage Pro] 20051019 AGP 2x x86/MMX/SSE

If OpenGL renderer string says "Software Rasterizer," DRI is not working, even if direct rendering says "yes"

Why Isn't the Mach64 DRM Included In the Kernel?

The official page for the dri/drm driver for mach64 states there are security holes in this driver. It has not be updated for a while, so it is not sure what problems still remain.

Building the Kernel Drm Module - the Old Way without pacman

warning: this does not use the makepkg method, which is recommended. Please use the AUR packages (top of this document) or create your own. Skip this section if you did the section above, with makepkg.

The standard ARCH kernel doesn't come with the mach64 DRM module, so building yourself is required.

  • Create a build folder to keep things tidy - this folder will be referred to from now on as $BUILDDIR
  • Now, obtain the drm source tree:
git clone git://
  • Get the thing compiled: (the drm folder appeared out of git)
cd $BUILDDIR/drm/linux-core/
make DRM_MODULES="mach64"
  • Go get some coffee or something since your machine is probably very old to have a mach64 chipset and wait while everything compiles.
  • When it's done compiling, there will be two files, mach64.ko, the device kernel module, and drm.ko, the DRM generic module.
  • Copy those two files to the appropriate kernel modules directory. (Before doing this you may want to backup the exisiting files to somewhere else just in case).
sudo cp mach64.ko drm.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/
  • Now get the modules registered and depedencies generated.
sudo depmod -a `uname -r`