Let my kernel be Free

Playing a movie using Free driver

Playing a movie using Free driver

There has been some interesting progress on the open-source drivers for ATI graphics cards recently. It has long been a goal of mine to have a completely Free kernel, it’s why I bought this laptop rather than an NVidia-based one. I want better 3D performance than Intel can offer and was originally going to go NVidia because their Linux support was better. Then ATI released the first load of specs for their cards and I switched my preference. In the end I bought a Toshiba laptop with a Radeon Mobility 2600 graphics chip (also known as an M76 chip).

I’m not a zealot when it comes to Free software, I am a pragmatist, I use whatever works best for me. But experience has taught me that when it comes to Linux kernel code the non-free stuff is always problematic. Practically every kernel crash I’ve ever had can be traced back to some non-free driver I had in there. Who is to blame for this I’m not going to go into, there are arguments on both sides, but the fact is that if you want a completely stable Linux system you are better off keeping the kernel Free.

Of course it takes time to write drivers for something as complex as a graphics card, so up till now I’ve been using the proprietary fglrx drivers from ATI. A necessary compromise, since when I first installed Debian they were the only thing that would get X to even run. It works well enough once you learn to avoid doing the things that cause it to crash (like logging out of KDE), but it adds a hassle to upgrades (having to recompile a kernel module, which often fails and needs custom patches) and is rather finicky about its settings. I’ve periodically tested the state of the Free drivers, both radeon and radeonhd, and seen steady progress.

Today I found that they have finally reached the good-enough point where I can switch. The must-have feature for me is tear-free video playback that doesn’t cause my CPU usage to skyrocket (and hence kick the fan up to unacceptable noise levels). This means the driver needs accelerated 2D and xv support, which has now been achieved.

One quick point for anyone else wanting to switch to the Free driver from fglrx. It won’t work unless you uninstall fglrx, if you just install them side-by-side and tell X to use the Free driver it will show a corrupted image or a black screen then hang. I thought there had been a major regression until I tried removing fglrx, after which both free drivers worked perfectly.

I’m using the xserver-xorg-video-radeon driver from Debian sid, along with a custom kernel to get the required DRM support. The latest (2.6.29) kernel in sid doesn’t have the right versions of radeon.ko and drm.ko that are needed for the 2D acceleration to work. There are two ways to get these, you can either compile a new kernel using the drm-rawhide branch of Dave Arlie’s kernel http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary. Or you can just use the instructions on the X wiki to just compile new versions of those two modules.

I’m using a whole new kernel because I also want to experiment with kernel mode setting. Since radeonfb has never worked on this hardware and the best resolution vesafb can give me is 1024×768 (native res of the LCD is 1280×800), KMS is the only hope I have of getting a VT at the proper resolution.

There is no 3D support in the version of the driver I’m using, but support for that is being written as I type so I’m hopeful I won’t have to do without for long. It isn’t a huge loss for me since I only use it for playing KotOR under wine and if I get desperate I can reinstall it in Windows (I dual-boot the laptop). 3D would be good for when I switch to KDE4 but again, I can live without it for a while. I’m happy with what I have for now, and it won’t be that long before full 3D support comes along (and I won’t have to fiddle with code to get it, just aptitude upgrade).