Monday 25 October 2010

Unity on the Desktop

Mark's keynote at UDS spoke about one of the biggest changes to happen in Ubuntu since it's inception: Unity as the default desktop. As the technical lead for the project, I wanted to explain some of the technical changes that will occur this cycle to put us in the best position for Natty:

Graphics Support

Firstly, it's good to mention that it's actually "Unity as the default desktop if your graphics card and drivers support it". We've learnt a harsh lesson this cycle about where Unity works well, where it should work but doesn't and finally where we just can't expect it to work.

Therefore, it is going to be a primary focus this cycle to enable Unity on as many chipsets as possible. We will be much more lenient about what OpenGL features are required (allowing runtime fallbacks through detection and through quirks files for those chipsets that lie about their capabilities).

That means that we'll make a best attempt at running, trying to gracefully degrade through features, but at least getting to you a panel, launcher and places.

So what happens when we detect that we just can't run? We hope to automatically fallback to GNOME Desktop, which will give the best experience at that point.

Performance and Compiz

This is a huge issue on the current Unity implementation. Yes, if you have good hardware it'll work fine, but it's unacceptable for it not to be performant on, for instance, Intel i945 based systems. There are a few reasons for the current performance issues, and after much thinking and testing, we have decided to move Unity's view implementation from Mutter to Compiz 0.9.

For what Unity needs to do, Compiz will give us a huge benefit in terms of performance and power usage, as well as allowing us to get closer to the graphics hardware and easily implement the graceful fallbacks of GL capabilities that I mentioned above.

It also means we can build on the great work of the Compiz team's upstream work and their excellent window management plugins to provide a more complete desktop experience, faster.

We're finalising some technical bits and pieces with regards to the switch and we're aiming to get it into archive ASAP. I'll be sure to post here as soon as we've done that.

Stability and Quality

Stability is the final technical issue to solve for the desktop. We have come leaps and bounds from the early Maverick cycle (currently most of the crashes are graphics issues, trying to do things the drivers don't support). We want to continue this and we will be pushing more things out of the Unity process and into D-Bus based services that can crash at their pleasure (but hopefully they won't :), and Unity can just restart the services instead of crashing itself.

Unity was always architected like this, but we've found ways to get the last bits of logic out of process and so you should see a rock-solid Unity on your desktop this cycle.

Quality is of upmost importance and is the focus for this cycle, over features or anything else. The community did an excellent job last cycle for Unity and we hope to repay the favour by fixing as many bugs as possible and assuring that Unity oozes quality.

Finally, for those thinking that we are starting from scratch due to the move to Compiz, I can assure you that we aren't and honestly, we couldn't. Unity is architected to separate the views from the models and controllers, and we are using that to enable us to quickly port our views to Compiz while keeping and bug fixing the models and controllers.