the haberdashery: tech: Accelerated OpenGL on ATI Mach64 (Ubuntu Linux)

what's new? *London to NZ by bike and boat *Spain/Portugal by bike
*Music: my Buzz days

jump to:

  • home
  • blog
  • micro-blog
  • photos
  • adventures
  • musings
  • sounds
  • tech



    Ubuntu: For Desktops, Servers, Netbooks and in the cloud

    Get Firefox!

    Get legal. Get OpenOffice.org


    Inspired?
    No? then why not email me and complain?
  • Micro-Blog:

    What I'm up to...
    follow nlogax at Twitter

    Links:

  • Self Liberator's Digest
  • Urban75
  • The Abolition of Work
  • In Praise of Idleness
  • Psychological Self-Help online
  • City Cyclists, London
  • Sheldon Brown's Bike Repair pages
  • Park Tools Bike Repair Manual
  • CrazyGuyOnABike
  • CycleTourer.co.uk
  • Ken Kifer's Bike Pages
  • Trento Bike Pages
  • MrPumpy.net
  • Travel to the Horizon
  • BikeTrip.org
  • Tom Swenson's Bicycle Touring Site
  • Get Rich Slowly
  • Global Freeloaders
  • ScavengeUK
  • freegan.info
  • Freecycle.org
  • UK Time Bank schemes directory
  • Environmental Data Services
  • WorldComputerExchange
  • WorldChanging.com
  • Guardian Ethical Living feature
  • Where Straight Men Come From
  • No Signal
  • SoNoMu.net
  • jMax
  • Vegan Outreach
  • Taste Better
  • Get Vegan
  • Satya Magazine
  • Chew on This
  • Vegetarian (and Vegan) alcohol
  • LUG Radio
  • IBM LPIC training
  • Introduction to Linux
  • LinuxQuestions.org
  • Ubuntu Linux guide
  • Unix Rosetta Stone
  • NewsForge
  • Linux Journal
  • DistroWatch.com
  • Inetdaemon's tutorials (archive)
  • Gnoppix & Knoppix Linux
  • OpenCroquet.org
  • Donate to Open Source
  • IT 4 Communities
  • The PC Guide
  • Wild Mind
  • Why I am not a Christian
  • Freethought wiki
  • BuddhaSasana
  • Zazen meditation
  • Despair.com
  • Y H Chang Heavy Industries
  • Bottom & Young Ones scripts
  • Private Eye
  • Ship of Fools
  • Landover Baptist Church
  • The Onion
  • The Brick Testament
  • Schnews
  • Z Mag
  • Space Hijackers
  • Artists Anonymous
  • London Action Resource Centre
  • The White House
  • IndyMedia.org
  • Willing Workers On Organic Farms
  • Billboard Liberation Front
  • Corporate Mofo
  • International dictionary
  • My Brother's website

  • More links > > >
  • Accelerated OpenGL using ATI Mach64 on Linux (Ubuntu Dapper Drake)

    Here's how I got accelerated OpenGL 3D working on the 'Dapper Drake' version of Ubuntu Linux using the DRI modules from FreeDesktop.org:

    1. Ensure you have installed the Gnu Compiler Collection (gcc) and kernel source for the kernel version you're running (all of the following Ubuntu packages should be installed: build-essential, linux-source-x.y.zz, linux-headers-x.y.zz).

    2. Download the mach64 and common tarballs from the Snapshots section.

    3. Backup the Kernel modules directory (/lib/modules) and X11 (/usr/X11R6) directories.

    4. Unpack the mach64 tarball, change into the resulting directory and run 'sudo ./install.sh'. Follow the prompts until the installation is completed.

    5. Unpack the common tarball, change into the resulting directory and run 'sudo ./install.sh'. Follow the prompts until the installation is completed.

    6. Confirm that the 'mach64' and 'drm' kernel modules are loaded using lsmod | grep mach64

    7. Backup the file /etc/X11/xorg.conf

    8. Open the above file and locate the "Screen" section and change the 'DefaultDepth' attribute to 16. This sets your X display to 16-bit colour (65,536 colours) and is necessary because DRI does not work with other colour depths.

    9. Restart X Windows and run 'glxinfo | grep render' - you should see 'direct rendering: Yes'

    10. Run 'glxgears -printfps' to get an idea of the rendering speed

    11. Finally, if desired, tweak the DRI driver using the following options in the xorg.conf "Device" section for the mach64 card:

  • DMAMode - this can be "async" (fastest but with some rendering artifacts), "sync" (medium performance with more accurate rendering) or "mmio" (slow!)
  • AgpMode - specifies whether to use AGP v1 (using "1") or v2 ("2")
  • AgpSize - specifies size of AGP aperture in Megabytes See this page for more details of the mach64 DRI options.

    Here are the DRI mailing lists on sourceforge.

    The dri-devel mailing list archives might be useful too.

    Unfortunately, since installing the Mach64 DRI on my Ubuntu system with kernel 2.6.15 I am experiencing weird clipping problems at the edge of the rendering canvas. To my uneducated eyes it looks as if polygons that would cross the screen boundaries are not being rendered at all, so when a 3d object moves toward the screen edge it starts to get triangular holes. See these examples:

  • GLXgears
  • Xscreensaver: atunnel
  • Xscreensaver: gears
  • Xscreensaver: bubble3d
  • Xscreensaver: jigglypuff
  • Armagetron

    If anyone's interested, here is the contents of my xorg.conf and a sample of Xorg.0.log.