June 25 2010: F11 is now end-of-life, and therefore this project is now closed. As detailed in Post #91, as of F12, the Mach64 DRM kmod source code is no longer present in either X.Org or Kernel trees. My thanks to those who supported this project.
===========================================
Fedora includes 3D video drivers that provide direct (aka "hardware-accelerated") rendering (DRI) for a number of older and off-name (i.e., other than ATI or NVidia) videocards/chipsets. Many can be activated by simply configuring the OS correctly. This HOW-TO is NOT intended to cover those chipsets.
A few of the X.Org DRI 3D video drivers are not included in the current release or are disabled, for various reasons. The ATI Mach64 driver is one, due (apparently) to apathy. However, the source code is available from dri.freedesktop.org git. Since I have spent countless hours and other resources getting the DRI Mach64 3D driver working, I figured that it would be most useful if shared, so that others with the same chipsets/cards could benefit from the drivers, if they so desire. I'll consider adding unreleased 3D drivers for other cards if requested and if possible.
Cards covered by Mach64 DRI 3D driver (http://dri.freedesktop.org/wiki/ATIMach64):
ATI Mach64
Status
DRI support for mach64 has been moved to the DRI and Mesa trunks. This means DRI works on any recent distribution as of 2007.
On Linux systems, the DRM module is not included in official kernels....
All mach64 chips with a triangle setup engine are supported. This includes the 3D Rage Pro, 3D Rage LT Pro, 3D Rage XL, 3D Rage XC, and 3D Rage Mobility. Cards without a triangle setup engine cannot be supported; this includes VT chips, 3D Rage, 3D Rage II/II+/IIc, and 3D Rage LT.
In response to the inevitable question: "Is my card supported?", my answer is: "I have no idea. Check the list."
If you have an older supported SIS (see Post #2) or ATI Mach64-class chipset/card, I have made the various softwares available for download. F8/9/10/F11 and x86 only (F11: SRPMs now available for re-build on other architectures). F12 cannot be supported at this time. Instructions for their use follow. NOTE that F10 uses F9 RPMs. (2009-01-07: F8 support officially ended; 2009-07-10: F9 support officially ended.)
First, the required disclaimers. From the DRI wiki:
Warning: In case you didn't notice, you are about to compile and install experimental software. This will allow you to test the latest features and bug fixes. It may, however, also introduce new bugs. Be prepared for problems every now and then.
And the usual disclaimer: the software is provided in the hope that it will be useful, but comes with no warranty of any kind, including merchantability for any fit purpose. Use solely at your own risk.
This post has reached it's word/character size limit. Please refer to Post #5 below for info on updates.
With that out of the way....
The files are located at: http://www.4shared.com/dir/6321255/3...6/sharing.html. Not GPG-signed.
If at any time you're unsure about how to proceed, or something goes wrong, STOP, and post back here with details.
It will be most useful later on to have a benchmark to measure the graphics performance. Unfortunately, there are no good ones readily available, so glxgears will have to do. Perform this test with no other load on your system. Open a terminal as any user and command: glxgears. You will see a pop-up window appear, with three spinning gears. Do not hide/cover/minimize the gearbox. Let run 30-60 seconds before closing (or kill with CTL-c from the console). The terminal output will list frames-per-second in 5-second increments. Make note of the average for later comparison.
All of the following must be done as full root user.
Next, download and install the new RPM packages:!!!CAUTION!!! Failure to (properly) install all of the required, matching software may result in a failure of X11/GUI.
- REQUIRED (F11: libdrm and xorg-x11-drv-mach64 are OPTIONAL):
Code:
rpm -Uvh libdrm mesa-dri-drivers mesa-libGL xorg-x11-drv-mach64
- OPTIONAL (if already installed, update):
Code:
rpm -Uvh freeglut mesa-libGLU mesa-libGLw xorg-x11-drv-ati
- OPTIONAL - DEVELOPMENT (if already installed or if needed, install/update):
Code:
rpm -Uvh freeglut-devel libdrm-devel mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel
These RPMs will replace your existing packages. If rpm balks for any reason (due to version number confusion), then force the install with --force [--nodeps] option(s).
Then copy the two *.ko kernel modules (drm.ko & mach64.ko or sis.ko) to folder /lib/modules/<uname -r>/kernel/drivers/char/drm/, where <uname -r> is the kernel number corresponding to the *.ko version, overwriting the existing files (if needed). Use the chmod and chown commands (as root-user) to alter file ownerships and permissions to: -rwxr--r-- root:root ...
NOTE: IMPORTANT! Starting with kernel-2.6.27.5-37.fc9, the drm.ko goes in folder /lib/modules/<uname -r>/kernel/drivers/gpu/drm/ and the mach64.ko goes in folder (create folder if needed) /lib/modules/<uname -r>/kernel/drivers/gpu/drm/mach64/.
All kernel modules are specific to one and only one kernel, and will not work for any other kernel(s). The kernel version number has been prepended to these kernel modules for easy identification - strip the number from the filenames so that they read simply: drm.ko and mach64.ko or sis.ko . "Vanilla" kmods will not work for PAE kernels! If you need PAE kmods, post a request and I'll build them.
Inform the kernel that it has some new friends, and have it register their dependencies:If all has gone well up to this point, you may now load the kernel modules:
Code:
modprobe drm
modprobe mach64 [or sis]
The order is important. You should get nothing but a new prompt. You may check with: lsmod|grep drm and/or: lsmod|grep mach64 [sis]. You may view info with: modinfo drm and/or: modinfo mach64 [sis]
A few changes to your xorg.conf before restarting the X-server:
> Back up the existing file /etc/X11/xorg.conf first
> From the DRI wiki:
In order to activate 3D acceleration make sure your xorg.conf is set up right. In particular, make sure the GLX and DRI modules are being loaded:
Section "Module"
# ...
Load "glx"
Load "dri"
# ...
EndSection
and set the permissions for DRI appropriately. To allow anyone to use DRI, do:
Section "DRI"
Mode 0666
EndSection
I found it necessary to add a few more things. Here are the relevant entries in my xorg.conf (EDIT 2008-05-09: removed 'Option "Composite" "Disable" '):
Code:
Section "Device"
Identifier "Videocard0"
Driver "ati" [or: "sis" or: "mach64"]
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 16
SubSection "Display"
Viewport 0 0
Depth 16
Modes "832x624" "800x600" "720x400" "640x480" "640x400" "640x350"
EndSubSection
EndSection
Section "Server Flags"
Option "AIGLX" "off" <= F9 "on"
EndSection
Your available "Modes" will be dictated by your VRAM.
NOTE: F11 a few extra tweaks are required to create the special character device node: http://forums.fedoraforum.org/showpo...7&postcount=63
Finally, close all running windows and log out of the desktop. Re-start the X-server with: ALT-CTL-Backspace.
Assuming that you still have a functional graphical interface, log in, and check things out with: glxinfo|grep render. You hope to see: "Yes". If so, run glxgears again to get some idea of how well the new 3D driver is performing. See attached pics.
Code:
[vince@etower Thu Apr 03 01:38:10 ~]$ glxinfo|grep render
direct rendering: Yes
OpenGL renderer string: Mesa DRI Mach64 [Rage Pro] 20051019 AGP 2x x86/MMX
[vince@etower Thu Apr 03 01:38:49 ~]$
If all that actually works, it is also highly recommended that you reduce display color depth to 16 bpp for best performance. The 3D DRI may inexplicably fail if you do not have enough VRAM to view the display at a minimal resolution. The resolution setting itself has little effect on performance in this scenario. Finally, don't expect too much out of this driver. Forget Compiz-Fusion, it's not going to happen. You won't get anywhere near the output you might have gotten with the proprietary ATI driver for M$ Win*. For an ATI 3D Rage Pro Turbo AGP 2X on-board chip with 4 MB SGRAM, my glxgears FPS increased from ~75-80 to about 250 FPS max., and that's after reducing color depth to 16 bpp and resolution to 832x624 (which is the max for 4 MB VRAM). For an ATI 3D Rage Pro AGP 2X card with 8 MB SGRAM, I'm able to get 1024x768 @ 16 bpp, with very similar output running glxgears (or 24 bpp but with lower framerates). Not bad for 10-year-old video chips and drivers built from scratch.
Questions/comments/feedback always welcome.
Enjoy,
V