The Road to KDE 4: KWin Composite Brings Bling to KDE

KWin, KDE's window manager, has been around since KDE 2.0 (replacing KWM in KDE 1.x) and has grown to be a mature and stable window manager over the years. For KDE 4, however, there were a few people rumbling about visual effects, and perhaps KWin was feeling a little envious of its younger cousins Compiz and Beryl. While these new effects have created a lot of buzz around Linux and UNIX, long-term KDE users have wished they can enjoy the effects of Compiz/Beryl while still having the tried and tested window manager that is KWin. As a result, for KDE 4, KWin has received a huge graphical upgrade, with composite and GL support. Read on for more details.

KWin has implemented effects in a way that allows a number of different rendering methods to be used, depending on your specific combination of hardware and drivers. These features have brought KWin rapidly into the era of dazzling eyecandy, along with some pleasant surprises on the usability front. This effort has been spearheaded by Lubos Lunak (a man known for his efficient code) and his team, with special mention to Rivo Laks and Philip Falkner for their contributions.

Effects are disabled by default at the moment, although that may change before KDE 4 ships, and distributions may decide to alter this setting anyway. When enabled, the effects are designed to degrade gracefully. If GL is not available, KWin disables GL effects but still allows Composite effects where possible via XRender. If XRender is not available, it falls back to plain X, running in the same fashion as the present KDE 3 version. To get the full array of effects, you need to have a video card (and driver) that supports AIGLX, XGL or use the proprietary Nvidia driver.

Once the effects are enabled, it's simply a matter of choosing which effects you'd like to activate. So far, Rivo Laks has been working on the effects plugin selection interface (see the screenshot below). The new plugin selection widget shown is making its way into various parts of KDE - it does automatic dependency checking, so once the dependency tree is known, it will intelligently enable or disable dependent plugins. This widget is also showing up in other parts of KDE 4.

(as you can see in the image, this dialog is quite new - less than a week old - and is missing all the icons...)

Lubos has been periodically blogging about the effects that KWin is now capable of, and has recorded a number of videos showing them off. Since video capture on my system is rather chunky, I will present his recordings instead. So, without further ado, I present some of the more popular of his flash videos, hosted by YouTube. If you are interested in more, please visit his YouTube User Page

The Present Windows Effect - a very useful effect that falls into both eye-candy and usability categories...

The Desktop Grid Effect - those familar with the Cube effect may note that this is not quite as flashy, but probably more useful. Doesn't mean there cannot be a Cube effect for KWin though.

This one shows the above two effects, as well as the Alt-Tab thumbnails, but it shows that the effects work great, even when the windows contain active videos.

Zoom Effect and Magnifier Effect: some accessibility related features that everyone may find useful, depending on your specific needs.

Effects like this one make people go "Wow". The first part of this video features the Fall Apart Effect, which basically has a window blow up. It's amazing how well this effect can be demonstrated in a low quality flash video...

Aside from Lubos, many of the new effects and underlying core components were programmed by Rivo Laks and Philip Falkner. They are responsible for many of the effects you see in the videos, including the Present Windows Effect, and the improved Alt-Tab dialog. There have been a number of contributions from others as well, and they are always looking for new and interesting ideas. In addition, KWin for KDE 4 builds on the already existing KWin version which has had dozens of people contribute to it over the years.

The window decoration shown above is called 'kwin3_crystal' and is still set as the default in SVN. It is simply a port of the existing KDE 3 Crystal window decorations, however, a new KWin window decoration is still in the works for KDE 4 - it hasn't been made the default yet, so I haven't been featuring it. When it does eventually become the default, you'll be sure to hear about it here (and likely in Danny's KDE Commit-Digest as well...).

KWin for KDE 3.x implemented a very simple composite manager, allowing simple effects such as window transparencies, fading menus, shadows, and so forth. The code was not too complex, but the infrastructure was not in place to seriously extend the effects to GL powered goodness. When the KDE 4 development series opened, it was seen as an excellent time to rewrite some of KWin's internal structures in order to support such effects. There were initial considerations of implementing support for the existing Compiz and/or Beryl system of effects via plugins, but there were technological hurdles that prevented this. I won't go into the technical details as to why this decision was made, however, it is important to note that KDE 4 will still work with Compiz/Beryl should the users choose to use that software instead of KWin.

Additionally, while KDE 4 will be supporting a number of platforms with libraries and applications, KWin is one of the applications that will not be making the switch as it is inextricably tied to X. This should be considered to be a Good Thing(tm), as it ensures that KDE will always be the best looking when used with Linux/UNIX, and hopefully it (and related KDE Workspace technologies, like Plasma) will remain a unique benefit of using a more open operating system.

KWin promises to ensure that KDE get the graphical boost it needs to keep the eye-candy folks happy, while providing new and usable features for the desktop environment that would not have otherwise been possible. Yet, it maintains the rock-solid foundation that a long history as an integral part of KDE has provided. It will still work (with reduced levels of effects) on any system that KDE 3 ran on, so no-one is left out in the cold. It is already the default for KDE 4 in SVN, and will be showing up in future beta releases.

On a personal note, I've found that KWin on my system was dropping down into XRender mode due to some X settings I need to fix, but it has been perfectly stable for me over the last two weeks. In fact, every week when I'm rebuilding KDE 4 to write these articles, I am more amazed at how quickly it is becoming stable and useful. If you are interested in testing it out for yourself, check to see if your distribution has packages available. I am aware of the existence of at least one live CD (where you don't have to risk messing with your system) that is available at the KDE Four Live website. They update the Live CD every few weeks, and currently has the KDE 4.0 Alpha 1 packages. Additionally, if you are brave enough to test the Composite features, and are having problems, have a quick look at the Composite HowTo.. If you have problems, please report bugs using the the KDE Bug Tracker by selecting the KWin program, and the "composite" component.

Until next time.


by hannes hauswedell (not verified)

well you don't want kwin to be ported to windows so people will have more reason to use a more open platform, but require me to use non-free-software to be able to follow this article about free software?

come on guys, we really should be better than this. and dont tell me its a matter of bandwidth. if it is, go send me the files in ogg theora and i'll host 'em!
or just host them on, maybe? same features as youtube, but free codecs and free software....

by Troy Unrau (not verified)

As a journalist writing about KDE, sometimes getting wider exposure is more important than purely utopian format choices - if more people use KDE (and *nix in general) because of what I write, then getting them over to open formats also becomes easier. Pretty much 100% of *nix media players play theora (and probably 95% play flash). But we only have ~5% of the market, and I doubt 2% of windows/mac play that format. In order to get them to view the videos, I have to hit them in their format. It's sad, but it's a critical mass thing.

Feel free to use free software decoders, like swfdec or even mplayer to play the files (as discussed above), and/or recode them into theora format.

And finally, a power user tip, for the amd64 users that are trying to use the official flash player, and don't want to have to do the whole 32bit jail and all that stuff... you can use konq64 with flash32. You just need to overwrite the programs 'nspluginscan' and 'nspluginviewer' with the 32-bit versions - and assuming you have enough of the 32bit libs installed, you can simply use the 32bit plugins within the 64bit konq. This doesn't work for firefox - in that case, you need to use the 32bit firefox.

by Fede (not verified)

nspluginwrapper ( does a notable job as well. It lets you use 32 bit plugins on 64 bit browsers. On kde 3.5.6 you need to apply a patch+recompile kdebase before konqueror uses it, but i believe the patch was included on 3.5.7, so it's just a matter of installing nspluginwrapper, and registering the flash plugin with it.

by hannes hauswedell (not verified)

thanks for your reply.

first of all i am kind of dissapointed that you think of the dot as a webpage primarily for convincing windows users and not as an information platform for current kde-users.

second: if you had had a look at the link i sent you ( -> iTheora), you would have seen that the plugin used for displaying the theora videos works BOTH with a mediaplayer supporting theora AND with a builtin java-based theora player that works on all platforms that have java. and i am pretty-sure the masses of windows users with flash that regularly read the dot also have java or not?
please prove me wrong if i say that iTheora is as easy as the flashvideoplayer.

and right now flash does not work properly with free software! yes i could read the sourcecode or use certain programs to find out the location of the flv and then fetch that and then look at that with mplayer, BUT i dont think it is right.
flash is a major problem for free software nowadays and by using it you counteract the hard work of other free software developers trying to establish free platforms.

your flash videos might make some windows fanboy somewhere think wow, but if this person is not even willing to watch a video in another format (and i could similarly argue that most somewhat technical windows users use media palyers that support theora) than he will not install another operating system, nor will you be able to convince him of what "software freedom" means.

thanks for your work, this is not meant as flame, i am just seriously afraid of what is happening to the community...

by Troy Unrau (not verified)

As just a side note - I did not personally make those videos. They were made weeks (if not months) before I wrote this article. At the time while I was writing the article, I could not get the GL composite effects to work for my system to make new ones, so I simply reused them with permission. I've since been able to get it running (by updating the proprietary nvidia drivers to the latest version, which you are probably also opposed to using). Should future videos be made by myself, I will try my best to offer it in an open format.

However, there may be another moral quandary for you then, since I'd be showing off effects that you can get while using a closed driver, which detracts from the open source driver development.

Can't win them all I guess...

by Hannes Hauswedell (not verified)

Thanks for responding and caring, really :-)

I personally use intel graphics which actually do provide decent 3d-acceleration wit 100% free drivers. i don't even object to USING the nvidia driver if someone bought hardware some time ago and doesnt want to / cant afford to buy other hardware. BUT it is a difference whether you privately USE a piece of non-free-software or whether you release media in a non-free format, requiring everyone else to also use non-free software and thus actively promoting the use of non-free software, while discouraging those of us who try to establish alternatives (in contrast to the NVIDIA-blob there actually are alternatives to flash-video).

anyway thanks for listening and for your work in general.

p.s.: just found out that offers to convert youtube-videos to ogg theora. so if you are stuck with youtube videos again,drop me a note and i will convert them to theora and host them, so you can instead use iTheora ;)

by Stephan Sokolow (not verified)

While I do agree with you, I didn't really have much of a choice. When I bought this computer, the options were:

Intel onboard graphics:
+ Open-source driver.
- Onboard-only. Would force me to also buy an Intel processor.
- Lacks an equivalent to nVidia TwinView.
- No Dual-DVI. (I use dual 19" LCDs and I'm very sensitive to analog blur)

- Has a binary blob for a driver
+ Easy to get a card with two DVI connectors
+ Has TwinView (I'm big on offloading operations to secondary processors)
+ Works with an Athlon64 X2 on an ASUS motherboard.

Let's hope that AMD open-sources the ATI drivers and that puts enough pressure on nVidia to get them to do the same. Heck, let's hope that it improves the quality of ATI drivers in general. It's embarassing to be Canadian and shunning the Canadian graphics card company.

by Axel (not verified)

Is it possible to have just one desktop, larger than the physical screen, and zoom in and out?

Anyway, this finally made the multiple desktop function useful on a single display-computer...

by higuita (not verified)

Great idea!!! i vote on this one!!


by Troy Unrau (not verified)

Should be possible. X already allows desktops that are larger than the physical screen. Try hitting CTRL-ALT-+ or CTRL-ALT-- (last key is the minus sign) to zoom in and out already... Combined with KWin's zoom feature, this would likely be a lot easier...

by dafnis (not verified)

I've been thinking for a while now on something similar, that I call the 'toroidal desktop'.
There's only one desktop of no fixed size, it area is always the sum of the open windows area. Windows are generally (with exceptions like modal dialogs) not allowed to stack on top of each other; opening a new window makes the virtual desktop size increase.
Showing all open windows is just a matter of zooming out, drag and drop can be improved this way.
Why 'toroidal'? Well, you can move around your desktop by dragging it, like you move around Google Earth, with the difference that when you reach, say, the rightmost window and continue dragging to the right, the leftmost window appears; same for up/down dragging. In practice, it's as if windows lived on the 2d surface of a torus.
Taskbar and desktop icons can be sent to the background and raised when needed, or stay on top and behave like the health/ammo levels in a first person shooter.

by Troy Unrau (not verified)

This is not at all a terrible idea, and could probably even be implemented within the current kwin framework, however you might have trouble finding an interested developer :) You could always have a go at it yourself if your C++ is up to spec :)

by cardiffgiant (not verified)

I was just thinking about something similar and decided to google for toroid desktop. I would like a large virtual desktop that can zoom in and out and pan and whose edges wrap. I would definitely want it to seamlessly add space. I might want to allow overlapping though because often I don't need to see the whole window.

I think I would also like to be easily expand one window or a group of windows while leaving the rest the same size. Think of pulling some of the windows closer to you while leaving the rest at a distance.

by Benny (not verified)

Just the sort of thing I have always wanted too.

by sulla (not verified)


Congratulations for nice 3D effects.
However, I would really appreciate "real" 3D effects like Sun have it in their Java Window-Manager and Metisse can do. e.g. turn windows around and have some things (like the options dialogue or just the possibility to write notes onto the back side) on the back side. e.g.

Another cool thing would be to support the now ever more upcoming "virtual reality" 3D goggles and have REAL 3D desktops.

What about that?

by Till Eulenspiegel (not verified)

Honestly, the "real" effects you describe sound more like a gimmick than, for example, an Exposé-like feature, which I've found indispensable ever since it appeared in Beryl. The fact that it will be in KWin is a huge relief, as I've never been able to keep Beryl stable.

"Additionally, while KDE 4 will be supporting a number of platforms with libraries and applications, KWin is one of the applications that will not be making the switch as it is inextricably tied to X. This should be considered to be a Good Thing(tm), as it ensures that KDE will always be the best looking when used with Linux/UNIX, and hopefully it (and related KDE Workspace technologies, like Plasma) will remain a unique benefit of using a more open operating system."

This is a REALLY weird attitude. Actually it's bizarre. I know it is common among Linux people nowadays to say "hey, let's not port this and that app to Windows, so we can make Linux look cooler". This whole attitude smells of Bill Gates. Linux and open source projects can only be truly successful (and by successful, I mean more than just having most of the market share or whatever) if they show respect to ALL users.

Additionally, what if I actually need to use Windows or Mac OSX some time? Or what if I want to do it? Why shouldn't I be able to run KDE - my favourite environment then?

Now, I'm pretty confident that the KDE devs didn't mean to "lock" KWin to keep Windows and Mac users out in the cold, but it's still nothing to cheer about. And I hope that future versions of KDE will be even more portable.

Other than that paragraph, this was a great article, and I'm looking forward to KDE4 more than ever. I think the KDE devs made the right move to work on KWin instead of Compiz/Beryl, and it looks like it will be easy to add more functionality and usability along the way aswell. Great work!

It seems to me that this technical lock-in is a side-effect of using technologies tied to X - if it could be easyly ported, somebody will port it because it is open source. By the way, how could a window manager be ported to Windows?

That is exactly why it cannot really be ported - it is stuck with X. Where X goes, KWin may follow, assuming AIGLX/Xgl/etc. and XRender and ... and ... and... are all available on that platform.

So, for the time being, Plasma and KWin will stay on X. The applications can be ported, and they can even adopt a native theme on whatever system they are running on, should you like it that way - or use the regular KDE themes (but not window decorations...) Whatever makes you happy.

Yes, I understand that KWin is tied to X for technical reasons. But to claim that it is actually good that it is that way is a completely different matter.

-I thought you could run X inside Windows?
--Probably not the best idea though.

-Can't you change the WM in windows from the default explorer?
--I know I saw this on slashdot... (dunno about Vista though)

-Run a virtual machine maybe?
--It's becoming ALL the rage
--Better yet, get a mac, triple boot and/or run VMs!

-How many Windows users know what a WM is?

-And it is a Good Thing(tm)
--Why? Because Windows isn't a Good Thing(tm), or a free thing for that matter. Wouldn't it be better to entice people to use the free alternative? Besides the people who are being "locked out" are either lazy, completely computer illiterate, or they genuinely like Windows.

-AFAIK there are a lot of open source apps that have been ported to Windows, and a lot of them aren't as good on it (but hey, I haven't used Windows regularly in several years).

And this might just be bias speaking but, why shouldn't people make Linux look cooler? I don't know myself but wasn't there some concern about losing users to Windows with the port to QT 4, and KDE 4?

Sorry for the cynicism, but I feel that way right now. And most of my questions are questions, not necessarily rhetorical.


"-And it is a Good Thing(tm)
--Why? Because Windows isn't a Good Thing(tm), or a free thing for that matter. Wouldn't it be better to entice people to use the free alternative? Besides the people who are being "locked out" are either lazy, completely computer illiterate, or they genuinely like Windows."

The reasoning behind this attitude, as I understand it, is that we shouldn't give people open source alternatives for Windows so that people completely make the switch to Linux. And that's fine for anyone who hates to play games without hours upon hours of tinkering with something, OR for people who are actually tied to Windows by some application. Look, there are HUNDREDS of reasons to use Windows instead of anything else simply because lots of completely irreplacable software is designed for Windows. Deal with it.

And what if people actually WANT to use Windows, but with as much open source software as possible? Who are we to judge them? I'm not saying KDE developers should use their limited time to port KWin or really any other app to Windows, but to say that it is GOOD (!) that it's hard or even impossible to port some of the stuff is WEIRD.

"And this might just be bias speaking but, why shouldn't people make Linux look cooler? I don't know myself but wasn't there some concern about losing users to Windows with the port to QT 4, and KDE 4?"

If "we" lose users to Windows, so what? The important thing is that people use computers the way they like. It's not a war people, and it's not a competition...

If some KDE users would actually be happier with KDE on Windows then LET THEM GO.

by forrest (not verified)

I beleive parts of the WM in Windows are built into the kernel.

Think about it...

by Sebastian Pipping (not verified)

Impressing! I especially like the
living thumbnails and the zoom feature.


by Daniel Rollings (not verified)

It's some good effects with potential, but I think some thought needs to be put into keyboard/mouse interaction. Switching between them involves some lag time, and when I see the mouse pointer move, and then typing for an expose-like extension, I think some refinement could help.

by bm (not verified)

all the changes in KDE4 really make me wonder what the future holds, I love KDE. and couldn't imagine useing any other Desktop, but more and more sillyness keeps getting added. and once something is added to kde its there forever, dolphin, kbfx, i swear any app written for kde will just be thrown in. and now were talking about composite window managers. which offer very little in useful functionality compared to how much recourses they suck up. It seems a usable effective desktop is not the goal, but how many cool tricks can we throw in. Its free and the developers do a great job, I dont mean to discount all their efforts. its much appreciated. but theres also a user base who has come to love kde. its only natural they might want to voice there opinions or concerns about KDE. just my thoughts for what its worth..

leave the silly, composite effects to someone else berl or whoever, and kbfx umm why kde already has a menu. same with dolphin. and how many mp3 players are we up too right now ?

I guess bash me all you want for having an opinion and caring about my favorite desktop

by Paul Eggleton (not verified)

> and now were talking about composite window managers.
> which offer very little in useful functionality compared to how
> much recourses they suck up.

If you don't want the effects (and arguably not all them are useless eye-candy as you seem to be suggesting) then you can easily turn them off, just as you have been able to with other effects in previous versions of KWin.

> and how many mp3 players are we up too right now ?

How many mp3 players are being added to KDE 4? I count zero so far.

by Anon (not verified)

"and once something is added to kde its there forever"

Lots of things have been removed from the stock KDE install - Kedit being just one recent example.


What's wrong with Dolphin? It's shaping up to be an excellent file manager.

"swear any app written for kde will just be thrown in" lists 47858 contents. I don't know how much of this is actual apps, but it's clear that your comment is hyperbole designed only to irritate the developers.

"and now were talking about composite window managers. which offer very little in useful functionality compared to how much recourses they suck up."

I think kwin_composite is great, and the "Expose", live tabbing and grid effect are incredibly useful. And - guess what! - it's a plugin that's off by default.

I'm endlessly irritated by people who whinge about defaults that can be changed in 10 seconds - the "Dolphin" article here on KDE had some of the most spoiled, ungrateful and, frankly, downright stupid displays of belly-acheing I have ever seen, short of a tantrum my 3 year old nephew once threw. But to complain about something that won't even inconvenience you unless *you explicitly turn it on* - that's a whole new level of whininess. Well done!

"It seems a usable effective desktop is not the goal"

Yes it is, and I'm sure the overworked usability team who work tirelessly to try and design you a better desktop appreciate your thoroughly negative and wholly incorrect comments.

"leave the silly, composite effects to someone else berl or whoever"


"and kbfx umm why kde already has a menu"

Well, you'd better let Aaron Seigo know that Plasma has a menu already - he'll be thrilled to bits as it would be one less thing to do before October! What's the name of KDE4's menu?

"same with dolphin"

How many specialised File Managers with a focus on usability already exist in the stock KDE install? HINT: none.

"and how many mp3 players are we up too right now ?"

Paul has fielded this one with far more patience that I could muster.

"I guess bash me all you want for having an opinion and caring about my favorite desktop"

This, for me, was probably the most grating part of your post. I'll bash you, alright, but not for "having an opinion" or "caring about my favourite desktop" - I don't, after all, want to fuel that little martyr syndrome you've spent time nurturing. I'll bash you for your stream of pointless and thoroughly unconstructive nitpicking; your casual dismissal of the hard work of a team of volunteers that either benefits you directly or doesn't impact you at all; your statement about the usability goals of KDE which are just hilariously wrong; and your complete lack of research about what's actually going in to the default KDE install (a lot of effort is going in to trimming down the set of apps so that it is lean and lacking in redundancy, but still functional).

The number of people I've seen on these comments doing something like "Well, I can't be bothered to research this so I'll just assume the KDE developers are doing the stupidest possible thing and directly accuse them of it!" is mind-boggling, and they invariably put that clever little disclaimer on the end: you know, the one that means that anyone who disagrees with you can instantly be derided as trying to deprive you of a voice, or who just doesn't *care* about KDE as much as you do, regardless of the validity of their criticisms of your post.

So, if you *really* care about KDE as much as you claim to, I'd suggest the following:

a) Learn something about what you are criticising, rather than just assuming the KDE developers are doing something purely because it's the stupidest path possible/ to annoy their fanbase/ they were drunk and it seemed cool at the time. KDE does not just throw stuff in willy-nilly, it does not have however many MP3 players you think it has in the default install, and it is very focussed on usability.

b) If you have a legitimate complaint, don't whinge about it and berate the developers and then whine "Just my opinion! Just my opinion!". It's the equivalent of sidling up to a guy, kicking him in the nuts, and running away screaming.

Make sure the complaint is valid, and *give reasons* that have not been discussed and shot down ad nauseum. You have not given a single reason why you think, for example, that Dolphin is bad, so your slur against it is the exact opposite of the "constructive criticism" I'm sure you'd try to spin your post as!

When you've done this, *raise your objections like an adult*. Don't throw yourself on the stage and cry, theatrically, "Oh, Lords of KDE - why have you turned upon humble and devoted servants such as I with your cruel caprice! Oh woe is me, that they shall not hear my pleas born of love; for their concerns are those of Bling, and Bloat, and the sowing of Confusion amongst their followers, and they strike the faces of any who dare speak against them, even though my words are intended to guide them down the True Path (i.e. the path I selfishly want them to take). PS don't criticise my misguided words because they're Just My Opinion(TM)!". This kind of approach is something you should grow out of when you're a teenager.

If you are concerned about some choice that the KDE devs might make in the future, then *give them the benefit of the doubt*. Don't simply assume that they have already made up their minds to commit to whatever nefarious decision you've conjured up in your head - raise the issue and say something like "Hi, I'm a little concerned about $X - have you made any decisions on what you are going to do about it? I think most KDE fans would prefer $Y". Don't say things like "I have absolutely no reason to assume this, but I just *know* that Plasma is going to have Goatse on every panel and will play loud high-pitched white noise continually and destroy all your work etc. Why have the KDE developers decided to do this? Don't they care about all their fans who have selflessly used the work they have produced for years [as if Free Software was a game of Populous and developers gained manna simply by having people passively consume their products and not lift a finger to help them]. I guess I'll have to go on back to GNOME :'(" followed by the theatrical *SIGH* intended to conjur up images of grubby-faced orphans collapsing in the gutter. Seriously, voice your opinions like an adult, and knock off the pitiful attempts at emotional blackmail - it's embarrassing.

by asdx (not verified)

just ignore this troll

by Maciej Pilichowski (not verified)

Great article -- one piece is missing though. How to get this extra module with effects? All I can find in google is how to set up the composite for Xorg (done) or how to click in the translucency checkbox.

But what to do in order to get extra tab/module with KWin effects? I didn't find the answer while googling and I didn't find anything in repos (opensuse).

Thanks in advance for your help.

by Maciej Pilichowski (not verified)

Mystery solved. I was misguided by the similarity in the videos (in comments) to KDE3 ;-) I thought it is available here too.