on Unity2D and llvmpipe, and the differing approaches of fedora and ubuntu

Ubuntu’s Unity desktop invites comparisons to GNOME 3 for a bunch of reasons, but one important similarity is their reliance on hardware OpenGL support to power their visual animations and effects. In their first releases, both desktops used “fallback” modes to handle systems without OpenGL support, but in Ubuntu 11.10, Unity is available for those systems using a new project called Unity2D.

I think Unity2D is not just a terrible idea, but also another example of the new direction that Ubuntu is taking that makes me wonder if it’ll be my distribution of choice for much longer.

Not so unified

Unity2D removes the reliance on OpenGL by avoiding it entirely: it’s a rewrite of Unity from the ground up, based on the Qt toolkit and using the Metacity window manager instead of Compiz. While it looks and feels much like standard Unity, it’s an entirely separate codebase, and keeping the two in sync as features are added will require a substantial amount of extra work. Perhaps the Ubuntu developers have the resources needed to keep up, but it seems like a very shortsighted approach to me.

GNOME 3’s current fallback desktop is definitely a hack, too — it cobbles together a UI that looks a bit like GNOME Shell using the panel and related components that have been ported from GNOME 2. It has neither the flexibility of GNOME 2 nor the elegance of GNOME 3, so it’s not a particularly compelling experience, but the Fedora developers plan to make the full GNOME Shell experience available for nearly everyone in Fedora 17, using some very cool technology.

Software OpenGL with llvmpipe

OpenGL isn’t inherently limited to systems with hardware acceleration; Xorg actually provides a software implementation of OpenGL by default whenever hardware support is unavailable, but its performance is far low to handle desktop effects. However, a new software renderer, called llvmpipe, aims to change that. By using LLVM, a generic virtual machine that produces optimised x86 or AMD64 code on-the-fly, and utilising multiple CPU cores, llvmpipe performs far better than the standard Xorg renderer.

The gains are impressive: running Quake III Arena at 800×600 on my dual-core laptop, Xorg’s renderer managed 3.9 FPS, while llvmpipe managed a fairly playable 34.9 FPS. While that only makes llvmpipe about as fast as my old Matrox G400, that’s okay — it just has to be fast enough, and for GNOME Shell, and even the odd game, it definitely seems to be. llvmpipe has actually been used as the default software render in Fedora since Fedora 15, but it’s only in Fedora 17 that it supports all of the OpenGL features required to run a compositing window manager.

GNOME Shell on llvmpipe

GNOME Shell running without hardware acceleration on Fedora 17, using llvmpipe

I tested the Fedora 17 development packages (aka “Rawhide”) in a KVM virtual machine, and it worked fairly well; logging in revealed a complete GNOME Shell desktop, and while it was a little choppy, it was definitely usable. I’d definitely expect it to be faster on an actual PC, especially with a mutli-core CPU. The Fedora developers have plans to improve performance, too, by optimising llvmpipe and disabling some minor effects.

So, on the one hand, we have Fedora working on key infrastructure that will improve the Linux desktop experience for all users without hardware OpenGL acceleration, and on the other, we have Ubuntu developers throwing effort away on a developmental dead end. Ubuntu has copped flak before for not contributing to Linux development, but I don’t generally buy in to that argument — “contribution” isn’t something you can measure just by analysing commit logs or counting lines of code. Canonical can pay its developers to do whatever it wants them to do, but increasingly, it seems that the effort they’re expending is pushing Ubuntu in a direction I’m not sure I want to follow.

It’s hard to elaborate on exactly why I feel that way — I think it’s really down to little things, like insisting on forging its own path with Unity, the increasing number of built-in monetised services, and their sleazy dealings with Banshee (be sure to read the comments on that one!). Maybe the result is a great OS for a lot of users, but for me, Ubuntu is slowly drifting away from being the OS I want it to be.

5 thoughts on “on Unity2D and llvmpipe, and the differing approaches of fedora and ubuntu

  1. Some interesting observations here. I hadn’t realized how much of a split there is in desktop environments between Ubuntu and the rest now.

  2. Well at least they tried and personally I quite like Unity. We’ll see where the ship strands (Dutch proverb, sorry) and where the other ships strand, like the Tango Studio one. If the maintainer switches to Debian it will become really hard for me to justify for myself why I would still want to use Ubuntu.
    Didn’t know about the Banshee issue. It must be pretty hard to find a balance between running a profitable company and catering to the community. In this case the balance definitely tips to the wrong side.
    I think it is getting time for me to start thinking about switching to a community driven distro instead of continuing using a company driven one.

    Thanks for the insight Leigh!


  3. Why are you so certain that unity 2D is a deadend? Unity 2D was a bad name for what could be called Unity Qt – probably too political. Qt is moving very strongly in a OpenGL direction and could be the basis for 3D features of unity too. Ubuntu will include llvmpipe with 12.04 and Qt5 can leverage this or hardware GPU and there will be no need for 2 unity codebases and it wont be a deadend.

  4. Hehe… I switched to Fedora sometime around April because of nonsense like Unity. The first time I tried Ubuntu in April 2007, it just worked, graphics and codecs and everything. No such luck with most subsequent releases. Even back then I had the disturbing insight that Canonical was just imitating Apple, and once they started wasting time screwing around with Apple-style titlebars and menus this year, I couldn’t take it anymore!

    The trick with open-source systems is to keep them simple enough that you don’t NEED help from companies that expect favors in return. Linux needs stripping down. Just give me Javascript, Clang, LLVM, OpenGL ES, and JACK. That’d be a start, anyway 🙂

  5. Yeah, Unity was a bit of a non-starter for me, especially since I record mostly on a netbook with limited screen real estate. I’ve never quite understood the rationale of the ‘oh, you’ve got less space, so let us fill a bunch of it with big buttons for you’ school of thought. I’m currently running KXStudio (which is essentially a skin on Ubuntu), and I’ve been really reluctant to upgrade the Ubuntu behind it for fear of what it will change under the hood…

Leave a Reply

Your email address will not be published. Required fields are marked *