APR
11
2013

hackweek9: Lightweight KDE Desktop project - updated

It's Hack Week 9 at SUSE, and I'm working on a cracking project this time around. I've codenamed it 'KLyDE', for K Lightweight Desktop Environment, and it's an effort to point KDE at the lightweight desktop market.  Surely some mistake, you say?  KDE and lightweight kan't fit in the same sentence.  I think they can.

This project has been bouncing around my head for a couple of years now, starting on a train ride back from the KDE PIM meeting in Osnabrück in 2010, then I presented it at COSCUP 2012 in Taiwan last August. But work commitments and family always got in the way of completing/finishing it.  SUSE's hack week gives me 40 hours to throw at it and this time I wasn't going to tackle it alone, so I enlisted my bro(grammer)s Jos and Klaas.

As has been repeated on Planet KDE over the past decade, KDE is not intrinsically bloated.  At its core, it jumps through a lot of hoops for memory efficiency and speed, and is modular to a fault. But most packagings of KDE take a kitchen sink approach, and when you install your KDE distribution you get a full suite of desktop, applets and applications.  The other major criticism of KDE is that it is too configurable.  The KlyDE project applies KDE's modularity and configurability to the challenge of making a lightweight desktop.  However, what I don't want to do is a hatchet job where functionality is crudely chopped out of the desktop to fit some conception of light weight. Read on after the break to see how we're doing it.

We're approaching problem from 3 sides:

Minimal footprint

The first method of attacking this is by packaging. It involves factoring optional components of the KDE desktop out of the base installation into subpackages that the main packages only have weak dependencies upon, allowing a minimal installation without them.  This targets big lumps of ram/cpu usage and objects of user hatred like Nepomuk and Akonadi, but also smaller items like Activities and Attica (social desktop support) and non-core window decorations/styles/etc.  The actual KDE build includes everything; the optional components are always available, so those who do need one of them can just add the package and start using it.

The second approach is by configuration.  This allows different profiles of KDE desktop with the same installed packages.  We've collected sets of configs that represent these profiles, but I'm not entirely sure how to package this yet.  One way would be to ship default profiles as X sessions.  Another would be a first run wizard or KCModule so users can select profile and apply it to their configuration after login.

Simple config
Is a mixture of usability and perception.  A simplified configuration presents fewer choices and is therefore easier to understand.  It also looks faster and more lightweight, because people equate visual simplicity with efficiency.  This is incorrect, of course, but I'm not above exploiting this fallacy to give people what they want. For this aspect, we're providing an alternate set of System Settings metadata to give it a cut down tree.  The full set remains available, if needed.

Fast startup

Is the most high-risk-for-reward effort.  It's mostly a perception/first impression thing.  A working desktop shouldn't need to be started up all the time.  But for people trying out KLyDE for the first time, a fast startup supports the claim to minimalism.  The interesting thing I note so far is that the package splitting and configuration in 1) makes very little different to startup time.  The optional components of KDE are already highly optimised to not affect startup time.  So I'm investigating alternate startup systems; refactoring startkde, Dantti's systemk, Plasma Active's startactive, and a systemd-managed startup.

Progress

The packaging effort is mostly done; we have packages in an Open Build Service project, that give you a basic 'KlyDE' Plasma Workspace when installed on top of a minimal X SUSE 12.3 installation with --no-recommends.

Jos has put a great effort into understanding System Settings and has produced a simple layout, I just need to complete my patch to allow it to use the alternative metadata scheme at runtime.  If we have time, we'll also customise some KCMs to provide a simple way to control KDE's theming.

I've been busy converting systemd, kdeinit and ksmserver into a native systemd startup by defining systemd unit files.  It's a steep learning curve as it exposes a number of assumptions on both sides, but I'm getting there.  The unoptimised systemdkde.target starts up in 4s here, vs 6s for the same .kde4 started by startkde.  That might be due to legacy/fault tolerance parts of startkde being left out, so I won't give more detailed numbers yet.

Update Thursday 9pm
The freedesktop.org sprint is happening at the SUSE offices this weekend so I had a long discussion with Lennart Pöttering about the systemd session effort. It left us with a number of open questions such as how to perform XSMP session restore and XDG autostart of apps, tasks which align with what systemd does, and I got some useful tips on how to start up a real session without losing configurability

Next steps

You can see the state of the project on Trello. I'd like to see if there is a startup time  win by parallelizing kded and ksmserver starting modules and apps. I'd like to make an openSUSE pattern for existing installations, and an iso or a disk image for testers.  I've also submitted a talk on the subject for Akademy, so I'd like to work on that and get some real data to support this work.

 

Comments

I just can't wait for KDE to get proper systemd startup support (and for systemd to get the user session stuff to good state). Props for you.


By teho at Fri, 04/12/2013 - 08:13

I'm really, really excited about KLyDE! Thanks so much for this initiative. I run my own minimal implementation of KDE 4.10 on openSUSE 12.3, and its memory usage is almost comparable to XFCE after quite a bit of component disabling. But I would love to have a simple way of installing a minimal implementation of KDE without having to do so much manual work. Here's what I'd like to see:

  1. 32-bit packages and 32-bit SuseStudio build, please. I noticed that the "kdebase4-klyde" package for 32-bit is marked as "disabled" on OBS. For lightweight systems, we can usually assume that they will often be 32-bit.
  2. A way to install KLyDE concurrently with regular KDE. I'd like to try KLyDE on my main machine, but I'm not ready to uninstall KDE proper yet.
  3. Include a default flat plasma theme with no gradients. I can't stand almost all the plasma themes with their gloss and glow and gradients. All I want is contrast. Think Windows 2000. ;-) Seriously, I don't understand why the Plasma theme should be different from the KDE/Qt theme. I would like my panel and plasma menus to look just like the rest of my apps with simple text on a regular flat background with the same colors as the rest of my apps. XFCE also does this, looks beautiful and simple.
  4. Remove the Plasma notification system and replace it with Colibri. (http://agateau.com/projects/colibri/) Colibri is much simpler and creates less distraction for the user, and contributes to the overall simple/clean motif.

Again, thanks again for this initiative! Can't wait for it to become stable.


By sb56637 at Mon, 04/22/2013 - 21:27