Enabling compiz on ATI Radeon Mobility 7500?

Tom Marshall tommy at nwwn.com
Tue Apr 15 22:02:16 BST 2008

First, many thanks to everyone involved in Ubuntu for making such a great

I just installed 8.04 and started playing around with compiz.  I've got a
Thinkpad T42 with an ATI Radeon Mobility 7500.  This is not supported by the
fglrx driver (too old), so I use the ati driver.  This seems to be
sufficient to enable compositing and compiz, but there are a couple of
issues with enabling Visual Effects (below).  After I fixed these issues, I
have an apparently fully functional composited 2-D desktop.  Would someone
kindly let me know if this should be supported, or whether there are issues
with the 7500 that are not immediately obvious and make compositing not

The first issue is that jockey-gtk does not seem to recognize the ati driver
as capable of visual effects.  I have no doubt that many/most of the ati
cards that are not fglrx capable are also not capable of compositing, but
certain ones (like mine) are.  Since I don't know anything about jockey
internals, I just copied fglrx.py over to ati.py and hacked it up to be
minimally functional for my purposes (/usr/share/jockey/handlers/ati.py):

    # -*- coding: utf-8 -*-
    # (c) 2008 Canonical Ltd.
    # Quick hack based on fglrx.py by Martin Pitt <martin.pitt at ubuntu.com>
    # License: GPL v2 or later

    from jockey.xorg_driver import XorgDriverHandler

    class AtiDriver(XorgDriverHandler):
        def __init__(self, ui):
            XorgDriverHandler.__init__(self, ui, 'agpgart', 'xserver-xorg-video-ati',
                'ati', 'ati', add_modules=['glx'],
                name=ui._('ATI open source graphics driver'),
                description=ui._('2D-only open source graphics driver for '
                    'ATI cards.'),
                rationale=ui._('This driver is supports older ATI graphics cards '
                    'that the proprietary fglrx driver does not.'))

        def free(self):
            return True

        def available(self):
            return True

        def used(self):
            return True

        def enable_config_hook(self):
            # X.org does not work otherwise
            if len(self.xorg_conf.getSections('Screen')) == 0:
                    ['Section', 'Screen']))
            self.xorg_conf.getSections('Screen')[0].defaultdepth = 24

        def enables_composite(self):
            '''Return whether this driver supports the composite extension.'''
            return True

The next issue is that the compiz script refuses to run on laptops when
using the open source ati driver.  This appears quite deliberate, so perhaps
I'm asking for trouble, but I removed that section of the script:

    --- /usr/bin/compiz.orig        2008-04-14 15:10:17.000000000 -0700
    +++ /usr/bin/compiz     2008-04-15 13:39:40.000000000 -0700
    @@ -265,18 +265,6 @@
            return 0
    -       #don't run on laptops using ati driver
    -       if laptop-detect; then
    -               for DRV in ati radeon; do
    -                       if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG &&
    -                          ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG;
    -                       then
    -                               verbose "Found laptop using ${DRV} driver. \n"
    -                               return 1
    -                       fi
    -               done
    -       fi
            for DRV in ${WHITELIST}; do
                    if egrep -q "Loading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG &&
                       ! egrep -q "Unloading ${XORG_DRIVER_PATH}${DRV}_drv\.so" $LOG; 

Now I can enable visual effects and run avant-window-navigator.

Oh, BTW, I don't know if this is necessary or not, but I am using the
following in my xorg.conf device section based on advice gleaned from the
ubuntu forums from folks with the same card:

	Option	"GARTSize"	"64"
	Option	"AGPMode"	"4"

More information about the ubuntu-devel mailing list