I’ve installed and played with xgl and compiz in the past, but decided to not keep using them for various reasons. I recently installed and set up xgl/compiz again, and will probably keep them as my primary X environment. I configured xgl/compiz so I can select them from my list of sessions in gdm. Here are my experiences so far.

Setup was relatively painless. I installed the xserver-xgl and compiz packages from the Ubuntu repository. I then created a file /usr/bin/startxgl.sh with the following contents:


#!/bin/bash

Xgl :1 -fullscreen -ac -accel xv -accel glx:pbuffer &
DISPLAY=:1
gnome-window-decorator &
compiz gconf decoration wobbly fade minimize cube rotate zoom scale move resize place menu switcher &
xmodmap /usr/share/xmodmap/xmodmap.us &
exec gnome-session

And created a file /usr/share/xsessions/xgl.desktop with the following contents:

[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/bin/startxgl.sh
Icon=
Type=Application

I didn’t need any modification to my xorg.conf file. The last time I tried xgl/compiz, I recall needing something like this my xorg.conf:

Section "Extensions"
Option "Composite" "Enable"
EndSection

When I tried putting those lines in this time, it was unusably slow.

Performance initially seemed abysmal. Rotating the cube of desktops around, switching between apps, maximizing apps, and doing the expose-like “scaling” were all miserably slow. I noticed that I had “direct rendering: No” when I ran glxinfo. I assumed that this was the cause of the poor performance. Since xgl is designed to make use of OpenGL, I figured that direct rendering could only help. I then looked around the web and found indications that xgl doesn’t use direct rendering. One of my co-workers (thanks, Tony!) recommended that I muck around with the speed settings in gconf-editor. I tried it and performance is mostly tolerable now. Hopefully, this is something that will be improved as the project presses forward.

Video playing performance is still not on-par with my non-xgl X server. I can’t play a 960×544 xvid encoded avi full screen (1920×1200) without it getting really choppy. I’ve tried vlc, xine, totem, and mplayer. All of them play it fine at its native resolution, but not at full screen.

One of the drawbacks to using compiz is that I lost some of the metacity goodness I’ve gotten used to. For example, many of my keyboard shortcuts just don’t work. Some of the standard ones do, like Alt-F4 to close a window. I have Ctrl-Alt-b and Ctrl-Alt-e mapped to launch firefox and sylpheed respectively, and those still work. However, Alt-r to launch the “run application” dialog and Alt-t to launch a terminal don’t work. But, keyboard shortcuts for some things are configurable in gconf-editor, so I can see that Alt-F2 is the compiz-defined shortcut for launching “run application”. So, for tasks that have a keybinding in compiz, I can either adapt to their “new” keybindings, or I can reconfigure them.

“scale” seems a little buggy. As I mentioned earlier, “scale” is xgl/compiz’s expose-like (from Mac) functionality. When I scale back all applications on all desktops and then click on one to bring up, I often do not receive the desired result. When it doesn’t do what I think it’s supposed to do, it just brings back up the application that was already in front. Sometimes “scale” is just touchy and you have to keep your cursor over the desired application for a few seconds to make sure it is highlighted, and then it will work. Other times, even if you pause, it still doesn’t work.

Anyway, I think this is making great progress for *NIX desktops. Hopefully all of this will be hammered out by the time Ubuntu Edgy ships.