Time for a quick status report on the latest git checkout of the FOSS xf86-video-ati driver for my RadeonHD 4550. It’s also a guide to getting the same free software stack working on your machine!
Open source drivers: then
I stopped using the open source Radeon driver some months ago, because I started playing Unreal Tournament 2004 again. At the time, the FOSS drivers were completely unusable. I had to lower the game’s resolution and detail to the point that my eyes hurt; the screen was a blurry, pixelated mess. That was back when the “classic” Mesa stack, which I was using, offered better performance than the Gallium3D code. I switched to the proprietary fglrx driver (Catalyst 10 and 11 series). Using this driver meant reinstalling the it for every kernel rebuild, giving up the flicker-KMS boot experience, viewing low-resolution consoles, and dealing with all the 2D lag in regular desktop use that the proprietary ATI driver is justly famous for.
Last year, the FOSS Radeon driver was good enough to run World of Goo and ioQuake engine-based games, but not much else. Sure, 2D desktop compositing performance was stellar, but there was no possibility of running more demanding OpenGL games like UT2004 or even Aquaria without significant stutter, lag, and low framerates. There was no real power management implemented, so my video card ran hotter all the time. There was also no hardware acceleration for video playback (DVDs, etc.) or Flash, though that’s probably still the case today.
Open source drivers: now
Everything has changed. The “classic” Mesa code has been obsoleted in favor of the Gallium3D stack, which offers superior performance. I can play Unreal Tournament 2004 with all detail settings maxed, at 1440×900 resolution, on an older RadeonHD 4550.
Before I could try UT2004 with the open drivers, it required preparing my system. Here’s how you can do it!
Switching to the open source drivers
For reference, my current working software versions:
(All git checkouts from May 13, 2011)
Mesa git: ac85ab066b7e3a7ee818849491b97a499038190b
libdrm git: ba11501bb9f5bd98110dfe1385b4501c0a9a643a
xf86-video-ati git: f83d58cf5b33686139067f8f898b8e566ba5c253
xorg-server: 1.9.5
kernel: 2.6.38.4
Assuming you already have the FOSS Radeon driver installed, you’ll need to update your git checkouts; emerge will do this for you. Git ebuilds are available in my overlay, and the X11 overlay. This is to get the latest code that hasn’t yet been released in official packages; there are several recent commits that have vastly improved 3D performance. Be sure to add required ~arch packages to /etc/portage/package.accept_keywords.
Configure the compile variables
Gallium3D is where all the hot driver action is these days for R600 cards, so make sure it’s in your compilation variables:
$ grep VIDEO_CARDS /etc/make.conf
VIDEO_CARDS="r600 fglrx"
Note: I left in fglrx, that way it’s still available as an option should you decide to switch back, and you won’t need to recompile anything to do so.
Make sure that you’ve got gallium enabled in your USE flags for media-libs/mesa, and that radeon is turned off. Why off? This code is the classic code for old devices; we don’t need it, since we’re only building for an R600 card. This saves you a considerable amount of compilation time.
$ grep mesa /etc/portage/package.use
media-libs/mesa -video_cards_radeon gallium gles
Compile and install the FOSS drivers
You’ll need to emerge mesa, xf86-video-ati, libdrm, and xorg-server. Once everything is installed, you’ll need to tell your system which driver stack it will be using.
Specify the open source stack
First, select the right OpenGL provider:
# eselect opengl list
Available OpenGL implementations:
[1] ati *
[2] xorg-x11
# eselect opengl set 2
Now that you’re using mesa, make sure to select the gallium options:
# eselect mesa list
64bit r600 (Radeon R600-R700, Evergreen, Northern Islands)
[1] classic
[2] gallium *
64bit sw (Software renderer)
[1] classic
[2] gallium *
Configuring kernel modules
If you haven’t already, you need reconfigure your kernel and add support for the new Direct Rendering Manager code to get hardware acceleration.
# cd /usr/src/linux
# make menuconfig
Device Drivers --->
Graphics support --->
Direct Rendering Manager --->
ATI Radeon
[*] Enable modesetting on radeon by default
Save your kernel configuration, build, and install the kernel. Here’s my one-liner:
# make -j4 & make modules_install && make install
Next, make sure that only the radeon module is loaded at boot. Comment out the fglrx entry:
# nano -w /etc/modules.autoload.d/kernel-2.6
radeon
##fglrx
Note:I’m still using baselayout-1; baselayout-2/OpenRC users should look in /etc/conf.d/modules.
Blacklist the fglrx module so that it never loads:
# echo "fglrx" >> /etc/modprobe.d/blacklist.conf
Configure X11
If you use /etc/X11/xorg.conf (or /etc/X11/xorg.conf.d/), configure X to use the radeon driver:
# nano -w /etc/X11/xorg.conf
Section "Device"
Identifier "RadeonHD 4550"
Driver "radeon"
EndSection
Section "dri"
Mode 0666
EndSection
I don’t have any other optimizations in xorg.conf. No additional parameters or heat/power management, mostly because I can’t find what options still exist for those. Anyone know? Any additional tips on getting more performance and less power usage from X11?
That should be it! Now all you have to do is reboot into your new open source software stack, and start having some fun.
Performance notes
World of Goo: no change. It’s just as fast as ever. No hitches or slow framerates.
UT2004: Playable. No real complaints. A few things to be aware of, however . . .
I played a few maps, and noticed some moments of slowdown and lower frames. This mostly occurs on very large, detailed maps, or when the whole map is onscreen at once, such as in the Spectator view. Framerates are usually in the 40-60 FPS range, up to the cap at 140FPS. It all depends on how much is being drawn on the screen. More players, weapons, vehicles, monsters, effects, and action can add up to lower framerates.
Still, it was quite playable, never venturing below 30 FPS. Once I got into framerates in the 40s, there was some slight, noticeable stutter, but not enough to ruin my shots against AI monsters. Against lots of human players, you might need to lower the screen detail or resolution to deliver smooth framerates at all times.
Here’s a screenshot of a fairly busy map (about 20 simultaneous human players, plus dozens of monsters), with a crazy, GPU-crunching shimmery golden force field effect wall at the far end. Note the framerates displayed in the upper right corner.

UT2004 on Linux. Map: "The End"