Configuring Radeon R600/R700 devices on Ubuntu Jaunty

Update, 18 Mar 2009: Ubuntu Jaunty Jackalope 9.04 and later now support R600/R700 hardware out of the box. Make sure you update to at least xserver-xorg-video-radeon 1:6.12.1-0ubuntu1, libdrm2 2.4.5-0ubuntu2, and linux-image-generic If you have done so, you can stop reading this page now.

Update, 5 Mar 2009: fixed the instructions for the DRM modules. You need to build from the origin/r6xx-r7xx-support branch.

I got a new computer with an ATI Radeon 3450 graphics card (R600 series). Here are the steps I took to configure it on Ubuntu Jaunty Jackalope 9.04 using free software (open source) drivers. The instructions below might also be useful for other Radeon hardware, in particular, R700-series cards.

Happily, Ubuntu 9.04 does drive the 3450 out-of-the-box (it boots into X and is usable, using the free radeon driver). Its performance was, however, kind of poor on my machine. I noticed "wiping" and flickering when scrolling (e.g. in firefox or gnome-terminal) or moving windows around.

Building the development versions of the radeonhd and drm drivers fixed these issues and significantly improved desktop performance. Everything is quite slick-looking now, even while driving a 1900x1080 display. Kudos to the driver developers, and to AMD/ATI for cooperating with driver development. Ubuntu does package radeonhd, so sooner or later, after this code gets released, an out-of-the-box installation will provide this level of performance as well.

For historical reasons there are two free drivers for ATI Radeon devices: radeon and radeonhd. They have approximate feature-parity these days. I used radeonhd because I found instructions for it first. :) Instructions are adapted from these sources: radeonhd r600-r700 instructions, Ubuntu community documentation for RadeonHD. (For your reference, the Radeon feature matrix describes what features are supported on what models.)

Download the build prerequisites:

$ sudo aptitude install git-core build-essential
$ sudo aptitude build-dep xserver-xorg-video-radeonhd

Clone the repos for radeonhd and drm:

$ git clone git://
$ git clone git://

Build and install radeonhd:

$ cd xf86-video-radeonhd
$ ./ --prefix=/usr
$ make
$ sudo make install
$ cd ..

Build and install the drm modules:

$ cd drm/linux-core
$ git checkout origin/r6xx-r7xx-support
$ make radeon.o drm.o
$ sudo cp radeon.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/radeon/
$ sudo cp drm.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/

Now we'll configure X to use the new drivers. If you don't have an xorg.conf file with stuff in it, auto-generate one:

# X -configure
# mv /root/ /etc/X11/xorg.conf

Change the Device section. I modified the Driver line and added the following options:

Section "Device"
    Driver "radeonhd"
    Option "AccelMethod" "exa"
    Option "DRI" "on"
    Option "VideoOverlay" "off"
    Option "OpenGLOverlay" "on"
    Option "TexturedVideo" "off"

Verify that the DRI module is loaded and that non-root applications can access it:

Section "Module"
    Load  "dri"

Section "DRI"
    Mode 0666

Then reboot your computer. That should do it.

2008 in Review

I know, it's a month and a half into 2009, but... well, better late than never.

The following is a list of the most popular posts on this blog and on my web site in 2008. Numbers 1, 3, and 5 hit Reddit. People mostly found the other articles by searching.

  1. Top Ten Essential Emacs Tips.
  2. Scrolling with the Thinkpad's TrackPoint in Ubuntu 8.10 Intrepid. Who knew a little tweak could cause so much trouble?
  3. A million lines of Lisp. Apparently, people will read anything about Lisp.
  4. Emacs in Ubuntu Hardy now has anti-aliased fonts. And it is beautiful.
  5. Stupid screen tricks. GNU Screen has changed the way I work and the way I interact with computers.
  6. Instructions for setting up Emacs on a variety of platforms.
  7. Towards using the FreeRunner as my primary phone. Which, I am happy to say, I have been now for months.
  8. Writing a raytracer from scratch. Why, you ask? Why the hell not? It was a lot of fun and I learned a thing or two about software and math.

(Google Analytics helped me make this list. Interesting tidbit: among the browsers that people typically use to read this blog, Firefox has a commanding lead with 75%. The runner-up is Safari with 7%, followed by IE with 5%.)

Highlights of the past year:

  • I wrote a thesis and got some papers published. In the course of my work, I also learned a few things about software development and tools, which I'll share shortly.
  • I traveled to New York, Las Vegas, Germany, and Switzerland (with passage through Spain, Liechtenstein, Austria, and the UK). All of these were a lot of fun.
  • I got a new phone (some would say, a mobile computer with a phone in it), one capable of running only free software. It's glorious.

2008 was a great year. Except for the collapse of the global economy, but remember, now is the time to buy. Here's to 2009!