xgl and compiz are almost usable

by Jeremy Jones

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:


Xgl :1 -fullscreen -ac -accel xv -accel glx:pbuffer &
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]
Comment=Start an Xgl Session

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"

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 960x544 xvid encoded avi full screen (1920x1200) 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.


2006-08-17 10:53:38
I think Ubuntu has a XGL+Compiz version from February 2006... You could also try compiz.net repositories, made from people who build .deb packages from CVS. They are very stable, though. :-D


2006-08-17 11:32:04
bit edgy when many windows are open.
2) So far the xinerama/twinview/any dual setup are not refined enough for every day usage.
3) I think the plugin sets are getting bloated. They should concentrate on the internals and basics before running away with 'crazy 3d floating buttons and new a desktop pocket to store windows in' kind of stuff.
4) The refresh rate although configured correctly is sickening and unusable for any vast period of time.

once these things are sorted I wont look back ;) but I wait with caution.

2006-08-18 08:58:01
Alt-F2 is the standard GNOME "Run Application" shortcut, so no surprise there :)
Jeremy Jones
2006-08-18 18:43:12
I've since switched back to non-xgl mode for the time being. Performance was spotty even after teaking everything I could tweak. I look forward to running xgl (or aiglx or sucrose) one day soon.
2006-08-22 05:59:24
I've just been testing this in Fedora Core 6, where recent advances are quite impressive. You can enable the whole shabang with a simple gui click (system-->prefs-->more prefs-->desktop effects). Performance is great and I didn't have to do much tweaking. I do have composite enabled in xorg.cong -- haven't tried without that...
2006-09-22 16:16:20
ur video is choppy cause xgl uses the 3d acceleration.. did u try the nonXgl script? works gr8 for me.. try searching for ubuntuforums+nonxgl on google

2006-09-30 20:44:04
Quote from the article;

"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."

I find this a bit of an odd statement. I can only get compiz/XGL working WITH direct rendering. In fact I thought that was one of the points of XGL, ie. put all the graphics work onto the graphics chip.

My Suse 10.1 desktop is, if anything, quicker with compiz/XGL; scaling is very fast, videos run fine at all resolutions (use the opengl settings in xine).

If you don't have the 3d drivers from ATI or Nvidia set up (sadly not GPLed or even open) and therefore don't have direct rendering of 3d effects then I am not surprised that everything is so slow.

2006-10-22 05:33:48
I just recently installed xgl/compiz for use on my FC5 box and must that it runs no less than fantastic. With the mere exception of making a couple of yums and a call to gnome-xgl-switch, nothing else was needed in order to bring this desktop fast 'n smooth 3d-joy. =)

After a somewhat "powertest" it seems that the only problem (albeit a very small one) is that Xine's GUI-window looks scrambled graphically.

It even outperforms my Mac =)

2007-01-21 03:21:21
Just tried xgl/compiz on openSUSE 10.2 on an Intel 1.1GHz ULV centrino with i915 (GMA900) and everything seems fine, except for videoplayback.

I can play videos in a downscaled window, but in full scale or in full-screen it's very choppy. - To be able to play fullscreen videos is a definite prerequisite for stating compiz as usable.

If you can't watch movies while compiz is enabled, it's just not workin' for everyday use.

Jeremy Jones
2007-01-21 04:29:21

Which is one of the reasons I don't run compiz/beryl day to day :-) There is supposed to be some way that you can start an app that doesn't get all the XGLish goodness which should enable videos to run full screen at full frame-rate, but I can't seem to find it.

2007-04-27 20:02:30
On my HP NX5000 laptop, under 10.1 xgl ran very well. On 10.2 it is very bad.
You mentioned performing some modifications under gnome-conf. What did you change?