This page details how to set up AIGLX for supported ATI/AMD cards with the open source driver.
For 1st-generation through 5th-generation Radeon cards, the open source 'ati' driver, in combination with AIGLX, is the recommended method for running Compiz. This range extends from the Radeon DDR/SDR/7000 through the X1950.
Xorg 7.2.0 or higher is preferred (although AIGLX has been supported since Xorg 7.1). Unless your distribution has changed the default settings when building Xorg, both Composite and AIGLX will be enabled by default in Xorg 7.2 (FreeBSD disables AIGLX by default, but this can be changed in your xorg.conf file).
Xorg 7.4.0 and Mesa 7.2 is required for the 5th generation radeon cards.
Direct Rendering should also be working out-of-the-box on any of those cards with most up-to-date distributions; you can confirm this by running glxinfo | grep -i renderer and making sure it does not show OpenGL renderer string as either Software Rasterizer or Mesa GLX Indirect. In either case, your drivers are not installed or configured properly.
Settings in xorg.conf
If you are using Xorg 7.1 or 7.1.1, you can enable Composite via the Composite option in the Extensions section of /etc/X11/xorg.conf:
Section "Extensions" Option "Composite" "Enable" EndSection
(If you don't have an Extensions section, create it as shown above).
You can enable AIGLX by adding the appropriate option to the ServerLayout section:
Section "ServerLayout" Option "AIGLX" "True" EndSection
(Your xorg.conf file should already have a ServerLayout section).
If you are using Xorg 7.3 or older, XAA is the suggested 2D acceleration method. For Xorg 7.4 or higher, EXA is recommended. This is configurable with the AccelMethod option in the Device section of your xorg.conf file:
Option "AccelMethod" "EXA"
If you are using XAA then make sure this line is in the Device section:
Option "XAANoOffscreenPixmaps" "true"
Now, restart your X server (by pressing <Control><Alt>backspace). When you log back in, it should be possible to run Compiz. Due to the fact that you are using AIGLX, you need to tell your 3D driver to use indirect rendering. This is done by setting the environment variable before the compiz command. What you enter in the terminal should look like this:
LIBGL_ALWAYS_INDIRECT=true compiz --replace --ignore-desktop-hints ccp &
Many distributions provide the compiz-manager script which will set all the appropriate options for your video card. On other distributions (such as Ubuntu and Debian) compiz-manager is used by default and simply called 'compiz'.
The Water effects in Compiz require GL_ARB_fragment_program support, which is only available in r300 and newer cards (Radeon 9550 and higher). In addition, this was not available through indirect rendering till Xorg 7.2.
Multiple X server screens (eg. :0 and :1) will cause Xorg to disable direct rendering; as such, Compiz will not work with such setups.
Xinerama will cause Xorg to disable direct rendering, so Compiz will not work with such setups either. For Xinerama-like functionality, you will need to use xrandr (the radeon man page has some useful information on setting this up).
2nd, 3rd, and 4th generation Radeons (from the 9250 through the X1050) support a maximum 3D texture resolution of 2048x2048. This means that you cannot run Compiz properly on (for example) two 1280x1024 screens (with a total resolution of 2560x1024) in a horizontal MergedFB setup (although a vertical setup would work, as that would give you a total resolution of 1280x2048). Any screen real estate beyond the 2048th pixel will likely have a completely white background, and any windows beyond that point will leave massive trails behind it. It is possible to work around this limitation by recompiling Mesa and setting a higher MAX_TEXTURE_RECT_SIZE in src/mesa/main/config.h. This simply causes your 3D driver to lie to Compiz about what the card supports; as such, it causes its own problems (primarily, the desktop background and icons will be stretched to the point where they are useless, and certain compositing docks will not work properly when positioned at the top or bottom of the screen). This limit was increased to 4096 in r500 cards (radeon x1300 to x1900 cards).