28 April 2008

Compiz works on Heron!

After the initial dissapointment with my clean installation of Ubuntu Hardy Heron, I finally got compiz to work. It was related to the strange core dumps which happens after I run the glx applications. Even running glxinfo causes a segmentation fault. Fortunately it provided a nugget of information:
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
So set an environment variable as such:
# export LIBGL_DEBUG=verbose
and running glxinfo will result in a more verbose error:
libGL: XF86DRIGetClientDriverName: 5.3.0 r200 (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/r200_dri.so
libGL error: dlopen /usr/lib/dri/r200_dri.so failed (/usr/lib/dri/r200_dri.so: undefined symbol: _glapi_Dispatch)
libGL error: unable to load driver: r200_dri.so
I googled for this, and found this very interesting 'bug report'

Basically the issue is that I erroneously installed the fglrx drivers which I dont need to because my ATI Radeon Mobility 9200 is fully supported by the "ati" Open Source drivers provided by xorg.

So the solution for all this is to remove fglrx with this:
# apt-get remove xorg-driver-fglrx
However there is one more hurdle. Compiz by itself will not run properly "out of the box" on my system. If you run it on the command line
# /usr/bin/compiz --replace &
You will get this error:
Checking for Xgl: not present.
Found laptop using ati driver.
aborting and using fallback: /usr/bin/metacity
And therefore fallback to metacity. No compiz goodness.

To get this to run, according to this post, you will need to modify /usr/bin/compiz by adding these two lines at the top of the file:
LIBGL_ALWAYS_INDIRECT="true"
SKIP_CHECKS="yes"
This will bypass the checks compiz runs which may abort if it thinks your system isnt good enough. Its something like the "Vista Capable" programme, but only in reverse.

Running compiz again on the command line confirms that its really working, and using the System/Preferences/Appearance/Visual Effects also correctly boots up compiz. The performance is really fast, my wobbly windows are sufficiently wobbly, and all the compiz effects are really smooth.

This inspired me to make my own compiz capable logo.

yk.

[Update: Removed the beryl logo]