Make X.Org pretty with DRI2 and UXA

That’s a scary headline. Chances are, after seeing that, you might not care about the rest of this article. But hang on for a second: Have an Intel graphics chipset, or use an ATI graphics card (open-source drivers or not)? Then this image might be familiar to you:

If you don’t notice it right away, the glxgears window is below the other two. Ugly. This is a problem with the current X.Org stack using a rendering mode known as DRI1. I won’t go in to technical details of why this happens, but it all boils down to this: Using DRI1, 3D applications are given a space of the screen to draw into, and this is then sent directly to the display. That sounds somewhat logical, but when you throw in more fancy operations, such as Compiz and desktop effects, things get tricky. Keith Packard of Intel does a good job explaining this and other problems with X acceleration.

Keith mentions a golden combination that can be used right now. Fedora 11, arriving in one week, will include everything needed for a pleasant X experience. Ubuntu 9.04 does ship UXA, but it is not on by default due to stability issues at the time it was released. Instead, EXA is used, the same mode included with 8.10.

If you’re using Ubuntu 9.04 or another distribution with UXA support that is almost ready, there is a one-liner you can add to /etc/X11/xorg.conf. In the Device section, add Option “AccelMethod” “uxa” as it is below:

bc.
Section “Device” Identifier “Configured Video Device” Option “AccelMethod” “uxa”
EndSection

Be prepared to revert the change later: without a newer kernel or X server, UXA mode has proven to be a little crashy. I’ve had good experiences while using at a 2.6.30 kernel, though I still do not use it for day-to-day computing. Even if you can’t get it to work for extended amounts of time yet, it still is nice to see this:

The glxgears test is positioned neatly in the background; you can see it through the semi-transparent terminal. And if that’s not enough proof that this works:

Avatar for jacob Jacob Peddicord - http://jacob.peddicord.net/

Jacob is a web developer, student, and programmer from Ohio. He is a staff member at the Ubuntu Forums and is most likely a fanboy of the distribution. He loves to write in code and words, play video games, and rant about topics most would have abandoned long ago. Jacob uses GNOME and is never seen running stable software, much to the demise of his laptop.

Home » Articles »

Discussion: Make X.Org pretty with DRI2 and UXA

  1. ap (guest)

    # Posted on 27 May 2009 at 03:46 PM

    Forgive me for being off-topic, but what's the name of that theme you're running? I like it!



  2. Kadaki (guest)

    # Posted on 27 May 2009 at 06:45 PM

    ap said:

    Forgive me for being off-topic, but what's the name of that theme you're running? I like it!

    It looks like shiki-colors from the GNOME-Colors suite. (http://code.google.com/p/gnome-colors/)



  3. # Posted on 27 May 2009 at 07:07 PM

    Kadaki said:

    ap said:

    Forgive me for being off-topic, but what's the name of that theme you're running? I like it!

    It looks like shiki-colors from the GNOME-Colors suite. (http://code.google.com/p/gnome-colors/)

    That's it!



  4. John (guest)

    # Posted on 09 July 2009 at 01:31 PM

    Form the images above it looks as though the DRI1 is giving 7000+ frames although overwriting the windows in the forefront while with UXA you are getting just 3000. Is this correct or did you have other processes eating up your CPU?



  5. # Posted on 10 October 2009 at 10:25 AM

    John said:

    Form the images above it looks as though the DRI1 is giving 7000+ frames although overwriting the windows in the forefront while with UXA you are getting just 3000. Is this correct or did you have other processes eating up your CPU?

    Everyone is talking about frames.. but hey do you have a 7000hz screen ?

    When I can, I limit my FPS to 60 .. it just eats energie to render more frames than the screen can show .. and the system becomes cooler..

    But yeah more CPU maybe, I am using UXA because of Compizs render glitches/problems.



Home » Articles » Make X.Org pretty with DRI2 and UXA

Sign In