Compiz-Fusion in Kubuntu, Not Just Eye-Candy Baby!

So compiz-fusion is the neat new whiz-bang thing out on the block. While I was on my ATI graphics card I half-lamented and half-scoffed the very neat-looking but not quite practical screen shots and video captures from those playing around with Beryl and Compiz. Now that I’ve got my sweet little System76 with an Intel GPU, I can run Compiz in my Free Software environment, and I must confess that there is some real meat in there; it’s not all just eye-candy.
Sure there’s an awful lot of eye-candy, I won’t lie, but the eye-candy has one benefit: performance. It is astonishing how well compiz-fusion performs on this machine, even with the under-powered Intel GPUs. I’m just boggled when I sit there throwing everything at compiz, and when it’s not crashing (sorry, that does happen a bit) my load average stays under 0.60. Normal X with just swapping desktops and all that did more than that and it didn’t even have any other neat effects.
So there is also some added window-manager functionality that I think is just the bees knees. First and foremost, window grouping and tabbing. This seems like a poorly named bit of functionality, because I had seen others doing it but I couldn’t figure out actually how to do it. It’s called grouping and tabbing, but instead it actually has the functionality of taking windows and putting them back-to-back. The way you do it is you just Super-S on all of the windows you want to group, and then you Super-T to tab them. I know this functionality must have been hard to name, and what’s in a name, but the functionality is just undeniably neat. I think my best use is that I *hate* having multiple browser windows open, but I have to use Firefox while I really *want* to use Konqueror. Normally I would have no choice but to choose between the two, or deal with two windows on my screen. Grouping and tabbing changes all that. Once you hit Super-T, you notice that all your selected windows go into a single window. WTF you may say? What happened to my windows? Well try hitting Super-Left and see what happens. It’s just so insanely cool, but I don’t think you could really appreciate this as useful functionality until you’ve started using it regularly.
Another very useful bit of functionality that I think a lot of folks in OSX like that we’ve been lacking is what the Compiz folks call “Expo” mode. If you enable Expo mode and hit Super-E, then your display zooms out showing you all available workspaces and you can move windows around and all that. It’s pretty darn useful.
There are some *cough* problems *cough* though. The first and foremost of these problems is that kde-window-decorator just does not work. It simply does not function as it should. I’ve been using Emerald, which I believe is in GTK and not Qt. This should probably be fixed. There’s also some very serious confusion in terms, at least for me, going on here. I’m used to the concept of virtual desktops. I’ve been using virtual desktops for about ten years now, and I really find them quite useful. Compiz introduces a new concept called “workspaces” though, and this is just baffling me. One of the areas of confusion may actually just be a bug in the KDE pager kicker applet, but it’s still confusion. I think workspaces are actually just virtual desktops within virtual desktops. It’s very confusing to me and I wish that it were simpler or at least explained better.
Some of the plugins seem to have more stability issues than others, like the Shift Switcher and the Water Effect plugins. The Water Effect plugin causes all windows to stop refreshing under KDE3 when you kick into rain mode. Even after turning off rain mode it still won’t redraw window contents. The Shift Switcher actually shows some beautiful animation (that I would love to see work properly because they seem like very useful ways to look at your windows while tabbing through them) but once the initial animation is done all you see is a 3D horizon and the title of the window.
Then there’s the general stability issue. I’ve heard that GNOME has less of a problem with this than KDE does, but I actually haven’t seen much of a difference. I’ve played with compiz-fusion on both GNOME and KDE and other than having to jump through more hoops in order to get things first set up I didn’t really notice any real difference in stability, functionality, or performance, with compiz-fusion. I understand that the setup I’m using is mostly GTK, but I’m not picky. As long as it integrates well with KDE I’m not going to complain much.
Some of the more eye-candyish functionality is nice to have, and I played with it for a few minutes, but ended up disabling most of it. The Wobbly Windows plugin is neat, and it works well, but it’s not worth giving up window snapping. The Desktop Cube functionality is neat, and I’m keeping it on for now, but I don’t really see myself mouse-rotating regularly. I’m definitely more of a keyboard kinda guy. I also bound my old virtual desktop switching keys to compiz, too.
There are two bits of functionality that kwin had that I’m missing in compiz-fusion though. The first is remembering which windows go where on exit. kwin does that and does it well. It also remembers sticky. Very useful and I’d love to see it in compiz-fusion. The other is Alt-Button3 resizing. If you don’t know what I mean, just fire up KDE and hold Alt and click and drag near a corner of a window with button3. For those of you who are like me and aren’t too precise with pointing devices, this functionality is just so nice to have. It saves all sorts of hassle and time and I really miss it.
Over-all, I’m really digging compiz-fusion, and I think I’ll put up some more stuff about it as time goes on. I’ll give you my little start-compiz script (click here) which fires up compiz and then fires up emerald. Here’s a desktop file (click here) that I put in my ~/.kde/Autostart that fires off compiz-fusion when I log into KDE. I’m willing to take improvements, too, so feel free to critique.
I encourage you to try out as much of this neat stuff as you can while running your system as free as you want it to be (I strongly encourage folks to favor 3D accel cards that have Free Software driver support over those that require proprietary drivers). I’m having a great time with it. I’ll finish things up by sharing some things that I didn’t know when I first started playing with compiz-fusion in a nice bulleted list
- You don’t always need Xgl/AIGLX to use Compiz. Some of the instructions say you do, but I’ve found that compiz actually runs much better without it on my card. I think Xgl is only necessary if you have a graphics device that doesn’t support compositing extensions–like several ATIs I know don’t.
- Emerald works very well under compiz. Until kde-window-decorator works well enough, emerald will pick up the slack.
- The cube only plays well with virtual workspaces, not virtual desktops.
- The compiz configuration program has a lot of configs. They’re not always in the most obvious place, so the search functionality makes life easier.
- When you need help and you can’t find it on the wiki, check out irc.ubuntu.com/#ubuntu-effects for more help.
- GNOME folks have it easier than KDE folks when it comes to setting up compiz, but it’s not that hard… especially if you use the files I’ve given you.
- Save your documents frequently, because while compiz is still as experimental as it is now, it will crash from time to time.
- When compiz crashes, it sometimes takes X with it.
- Katapult is wonkey in compiz-fusion.
I hope you’ve enjoyed my post, and I have inspired you to try this great bit of Free Software.
Popularity: 67%


Wobbly does give you window snapping – hold down shift while moving a window and it’ll start exhibiting snapping behaviour.
It would be better if this integrated with the window snapping plugin though. It should all be handled in the same place, although that might be a tad tricky given the graphical effects wobbly uses for snapping.
> Save your documents frequently, because while compiz is still as experimental as it is now, it will crash from time to time.
I don’t get it. Why enable Compiz by default on Gutsy if it’s so unstable?
Instead of Emerald you may try Aquamarine.
Thanks for a great write up.
One other feature you might like as a keyboard guy is the “window put” one. This chops the screen into 9-subsquares and allows you to move windows to those squares (I’m not explaining this well!)
I have the numeric keypad with Super bound to do this.
I’d just like to mention that the problems you are getting do not occur for everyone. Sure, it must be a bug/lack of information somewhere along the line if it happens to you, but I haven’t found these on my version.
PS: I use Kubuntu Gutsy with a 2 month old compiz-fusion though the below is for all all previous versions of compiz-fusion versions as well.
1. Crashes — beryl / compiz has never crashed for me in any release.
2. I use KDE3 and have no issues with water effects. Everything refreshes fine.
3. Shift Switcher works here.
4. kde-window-decorator works fine here. Although, I would prefer more compositing customising for it. Emerald may use libwnck for menus and a bit of gtk but it’s mostly cairo.
5. Wobbly has Snappy
6. Horizontal/Vertical Virtual Size is the break-up within compiz (eg. cube faces = horizontal virtual size; expo grid = horizontal * vertical virtual size)
7. Xgl is only needed for new ATI cards (x1050 + / x200m) due to fglrx drivers not supporting composite. This will change next month where Xgl is no longer required for any video card ( rare vendors?). Old documentation will mention Xgl.
Hello there! I couldn’t help noticing that you’ve had some issues with Compiz Fusion which are probably solvable through configuration/explanation. So, here are a few things I’d like to point out:
1) “Group and Tab Windows” can group windows together, so that they all move together. It can also combine all windows in a group into one tabbed entity. The reason they’re called “tabs” is because there is a “tab bar” that appears if you hover over the titlebar. If anything, I think it’s the 3D flipping animation that makes the plugin’s name seem awkward.
Please see this page for more info: http://wiki.compiz-fusion.org/Plugins/Group
2) You’re quite right about KDE and Compiz not agreeing on what a “desktop” is. To Compiz, a “desktop” (actually a “viewport”) is one section of one big desktop; essentially, if you have the standard cube with 4 viewports (fields of view), then you have 1 big KDE desktop spanning 4 viewports. This is confusing, but I hope it can be made less so in future.
3) Wobbly Windows does include snapping functionality. If you want, you can enable “Snap Inverted” in the options for it, or you can hold down the Shift key while moving a window. The Snapping Windows plugin, on the other hand, is specifically for users who want snapping windows without Wobbly.
4) You might be interested in Desktop Wall as an alternative to the Desktop Cube. Instead of rotating a cube, it allows you to pan around between viewports in a linear fashion. It works especially well in combination with Expo (and makes more sense with Expo than Cube does, IMHO).
5) The Alt+Button3 resizing function you mentioned is set as Alt+Button2 by default in Compiz. You can change this binding in the options for the Resize Window plugin.
6) Your issues with Water and Shift Switcher sound like they are hardware- or driver-related. Actually, Water seems to be in a glitchy state (or even non-working, for some) at the moment. I’ve not yet seem anyone with the behaviour you described in Shift Switcher, though; I would doubt that it’s caused by Compiz Fusion.
About your start-compiz script i got something like this instead:
tribe@macbook:~/bin$ cat compizemerald
#! /bin/sh
compiz –replace -c emerald &
So you don’t need the ’sleep 8′ line
I have never had beryl/compiz/compiz-fusion really crash. Must be just that KDE sucks as usual again
Compiz-fusion rocks my world. I’ve been using it for quite some time now, pretty stable, and damn fast.
I’ve written an article how to install compiz-fusion on Ubuntu Feisty: http://kevin.vanzonneveld.net/techblog/article/enable_compizfusion_in_ubuntu_feisty/
As to the enabling compiz by default debate, I hate to say this, but please take that debate elsewhere. I don’t seriously believe that any Ubuntu team would enable something that was less than stable by default, so it’s not really a debate I’m willing to entertain here.
Tribe, I’m going to try that right now…
Okay, so I played with that for a while, and `compiz –replace -c emerald` doesn’t work. It starts up compiz, sure, but it doesn’t fire off emerald.
As far as the childish “well I guess KDE still sucks comment” goes, if you want to be an idiot please take your comments elsewhere. I had my fill of that with the Ron Paul folks.
I’m thinking that it is actually Emerald that is crashing things, and not actually compiz itself. The kde-window-decorator seems to work, but it has some problems (like the shadow layer is white sometimes) that get pretty annoying. I hope to see kde-window-manager work a bit better in the future. I’d also like to see either emerald or something that can use emerald themes. There are a lot of fantastic emerald themes out there, and I see no need to throw all of that gorgeous artwork away.
xSacha: “Works for me” is only a good line for bug reports. In the real world if someone is having a problem, simply saying “works for me” does nothing constructive or helpful. I know for certain that I am not the only one having this trouble, as a couple folks came forward with similar trouble in #ubuntu-effects. I’m blogging on my experience, not on the over-all state of things.
Fyda: Thanks for the thoughtful explanation of all of that. I appreciate you helping me figure out the Alt-Button2 issue. That’s just something I really missed.
I really appreciate the feedback on this post. Thanks for reading.
A couple of tips using Compiz Fusion with KDE (sorry if someone else has mentioned these, I haven’t had time to read the comments).
1 – “Katapult is ‘wonky’”. Do you mean that katapult has that weird shadow under it? If so, you can disable that by adding “-name=katapult” to the shadow windows dialog in the Window decorations preferences. Also, Compiz sets Alt + Space to Window Menu, so disable that under General Options/Actions.
2 – It’s possible to load Compiz automatically by creating a script (called say, startcompiz) and adding the line “export KDEWM=startcompiz” to ~/.bashrc. This means that kwin won’t be loaded, saving resources and loading your desktop faster (‘Course, if Compiz isn’t stable for you, this might not be desirable).
Well, I tried this “export KDEWM=startcompiz” to ~/.bashrc. thing and it won’t work.
KDE loads like before with kwin and KDE decorations even tough echo $KDEWM returns startcompiz. Maybe something else should be adjusted…
I think the problem is the command used to start compiz. With my ATI card, “compiz –replace &” won’t work for autostart. I think the commands you have to use are as follows (though I can only personally vouch for the ATI one):
ATI
LIBGL_ALWAYS_INDIRECT=1 compiz –replace –indirect-rendering –sm-disable ccp &
Nvidia
compiz –replace –indirect-rendering –sm-disable ccp &
Intel
INTEL_BATCH=1 LIBGL_ALWAYS_INDIRECT=1 compiz –replace –indirect-rendering –force-aiglx –sm-disable ccp &
Also, “export KDEWM=startcompiz” will only work if ’startcompiz’ is in /usr/bin, and executable. Otherwise, you must include the full path to the startcompiz script.
I spent a few hours this weekend tinkering with it – I finally got it all installed and working but was still running into some odd issues. The biggest problem I had was like you – what do you call feature X and how do I enable/use it (or disable it)…
I’d love to see sometime in the future – the usability aspects split off from the effects. I have no desire to paint my screen with fire. Ever. But the expose and other screen switching things were neat and I could see myself using some of those when it gets a bit more stable.