Ratonland
Menu

Login

Webmail





Linux Open Source Radeon driver
Posted by bleader -- Thursday 21st of May 2009 12:21:31 PM
For those of you who are just interested in the explanation and configuration just jump to the next part :)




Last month, ATI released their 9.4 catalyst drivers with one new thing for me: they dropped the support for most card up to radeon 1950. This means no new drivers for these cards, the 9.3 is the legacy support. Sad thing in this story ? Xorg is constantly changing, the kernel too, changing APIs between releases, thus the new Xorg server isn't compatible with older releases.

Of course all new distribution are switching to this Xorg version. Ubuntu (which I'm running on my main computer) switched to it in 9.04, therefore to update my linux and keep something running I had 3 possibilities:
- Use vesa driver
- Change my video card
- Switch to open source driver

Of course vesa isn't a solution at the resolution I'm using the display will be reaaaaaaaally slow. I already spent enough money lately not to feel like changing graphic card (well, of course I had a look and was thinking about it, but I'd rather not).

So the only option left was to get rid of the fglrx (ati proprietary driver), and use the open source one.

That's where it became tricky.




Switching from fgrlx to radeon(4).

Unfortunatelly I fiddled quite a bit to make this happen and didn't write down every steps I did, but I'll try to write down as many information as I can. One main problem I encountered is that all tutorial to do this out there are assuming you're using fglrx packages from your distribution. I've never done this, got used to build it myself from ATI installer and that's it.

So first things first, you can't have loaded the fglrx kernel module at any time, otherwise the radeon driver won't get you accel. Therefore you need to make sure that every single place in /etc/modules /etc/modprobe.d aren't loading fglrx at boot time (check /etc/rc.conf in Arch, modules section may load it too).
I actually blacklisted it in /etc/modprobe.d/blacklist.conf.

The next problem is that the libGL.so used is the one from the fglrx driver.

Some people are saying you can just remove those in /usr/lib/xorg and this will do, unfortunately, it didn't for me, those in /usr/lib were also from fglrx. Note that this may be coming from older installation, the original installation of this ubuntu goes back 3 years, and I've always installed fglrx manually, one can hope this won't be needed for most people.

To resolve this issue, I have to reinstall mesa packages to be sure it would overwrite this file, now that everything is find I can use dpkg to find out where this is coming from:


bleader ~ % locate libGL.so
/usr/lib/FGL.renamed.libGL.so.1.2
/usr/lib/libGL.so
/usr/lib/libGL.so.1
/usr/lib/libGL.so.1.2
bleader ~ % sudo dpkg -S /usr/lib/libGL.so.1.2
libgl1-mesa-glx: /usr/lib/libGL.so.1.2


In order to reinstall this I issued:

sudo aptitude reinstall libgl1-mesa-glx

To check that things are working just issue:

glxinfo | grep -i direct

If you get a No, you can run:

LIBGL_DEBUG=verbose glxinfo

And try to debug it for yourself, that's how I found that libGL.so was trying to load unknown symbols, meaning in my case that it was fglrx version. At this point patience, luck and google are your best friends to get around this issue.

This being done you can change your /etc/X11/xorg.conf, by replacing:

Driver "fglrx"

By:

Driver "radeon"

Now for the options of the radeon(4) driver, I played around a bit and ended up with these:


Option "AccelMethod" "EXA"
Option "ColorTiling"
Option "EXAVSync"


Using theses let me get Xv video smooth without tearing, even with 1080p in fullscreen. While reading around the web about the configuration I also saw people advertising these options:


# Option "XAANoOffscreenPixmaps"
# Option "AccelDFS" "off"
# Option "EnablePageFlip"


I cannot recall exactly all details, but AccelDPS off was getting my X some kind of laggish rendering, like switching from one window to another was actually done as usual, but the visual feedback that it happened was taking some time, and one or both of the other was making my Xv video playing horribly slow. That's why I left the # in front of the line to avoid.

Well I hope this little piece may someday help someone switching to radeon(4) too!
-- 2 comments --


Comments
doug -- Monday 25th of May 2009 17:19:47 PM

was reading your old dwarf article and noticed your ftrace util, looks interesting, is there a download link?
---
bleader -- Wednesday 10th of June 2009 17:12:44 PM

Nope, this is a project in the school I was in, if I put a link to it there, lazy students will just take from it and not learn anything.
---
nick

comment
Start with "__raton_land" alone on first line