Power Management in openSUSE and SLE11

May 11th, 2009

Energy Star Logo

Wanna know what we’re doing to make your laptop run longer? Have a look at the new wiki page I have just finished. It talks about three major topics:

  • What is done
  • What can be done better
  • What is not done

It might give you some hints to tease even more out of your battery runtime.

Discussion welcome!

killswitch-applet-0.1 … or my personal Hello World in Python

April 17th, 2009

One thing that was on my TODO for already quite some time was to have a look at that half-new language called Python. Because an old-fashioned “Hello World” is far too simple here, I was looking for some kind of project to get familiar with the basic principles.

One thing I found quite annoying in the past was the fact that I always had to disable some kind of radios in some far too complicated ways to save some battery power. Modern laptops often have multiple killswitches for their wireless communication devices like bluetooth, WLAN or WWAN. So that was the chance for me to seize, and the output looks like this:

killswitch-applet

From the README:

killswitch-applet is a small application sitting in the system tray providing the possibility to manage all the killswitches found in the system. In this context, “managing” means enabling or disabling certain killswitches. This is especially useful if you have multiple killswitches like bluetooth, WWAN or WLAN seen in many modern laptops.

Tray Icon on the Left
Tray Icon on the Left

The source tarball for version 0.1 can be downloaded here: killswitch-applet-0.1

The summary here definitely is: Wow, that was damn simple! Especially when it comes down to GTK programming and D-Bus interaction, Python definitely provides a very good way to hack those things together quite easily. The whole source file contains a whole of 189 lines of code including comments.

Another question: Is it worth creating a sourceforge project for this? I’ll wait until and if I’m getting some feedback.

Note for openSUSE users:

Of course this is also available in the openSUSE Buildservice. Go to http://software.opensuse.org/search and search for “killswitch-applet”.

Tomboy^WGnote

April 17th, 2009

Inspired by a recent blog post, Gnote is now available in the openSUSE build service. If you have been using Tomboy and wouldn’t miss any of its plugins (which are WIP), give it a try. The Mono to C++ conversion can be that easy:

  • For Factory: $ zypper ar \ http://download.opensuse.org/repositories/home:/hmacht/openSUSE_Factory/ \ home:hmacht
  • For 11.1: $ zypper ar \ http://download.opensuse.org/repositories/home:/hmacht/openSUSE_11.1/ \ home:hmacht
  • $ zypper in gnote
  • $ mkdir ~/.gnote && cp ~/.tomboy/*.note ~/.gnote/
  • $ gnote

AFAICT, it’s running quite well. Tomboy has been the only Mono application I was running, so ‘zypper remove mono’ removed a bunch of 42 packages.

Have fun,
Holger

Maemo Music Player Client (MMPC) for Diablo

February 24th, 2009

Finally I took the time to respond to multiple requests about providing mmpc 0.2.1 packages for Diablo. That also gave me the possibility to try the maemo autobuilder to upload my packages to the extras repository. And well, it worked out. It’s especially useful for those people not running debian based systems, because with autobuilder you don’t have to care about signing and uploading the packages with debian tools like debsign and dput.

So, this is not a new release, these are just new packages build for the Diable 4.1 distribution. I still did not manage to find the time to enhance mmpc further. There are just too many other things like work and university I have to care about. Either download the packages from Maemo Garage, or just get it through the extras repository as usual.

GreenIT: Power Consumption and -Optimization of PCs

January 14th, 2009

In the middle of last year, I participated in a seminar called “GreenIT” at university. The result was a 17 paged whitepaper called “GreenIT: Power Consumption and -Optimization of PCs”. It took quite some time to finish this up, so it would be a waste of time if I would not publish it. A shortened table of contents looks like this:

  1. Introduction
  2. ACPI
  3. System as a Whole
  4. System Components
  5. Software Policies
  6. Conclusion

Please note: If you are only interested in how things are implemented in Linux, this might not be that interesting for you. It does not include any specific operating system details. It’s rather general, although of a technical nature, and thus can be applied to any operating system out there.

If you are lazy of reading through the whole document, you might consider having a look at the corresponding presentation slides. However, you need to be able to speak, or at least to read, the German language for the slides to be useful for you.

GNOME Docker 0.1 Released

July 14th, 2008

Finally I managed to release gnome-docker 0.1, a small application to support users using a docking station. It is already included in openSUSE 11.0, but other pending things prevented me to do a public release earlier. One of these things is the self designed tray icon :-). I definitely have to look for a better alternative. The README should have all the necessary information:

GNOME docker 0.1

GNOME application for notifying laptop users about the state of their dock station and the possibility to undock the system via software, either from
the tray icon, or via a hotkey. In future, it will also care about hotpluggable devices placed on the dock station, such as hard drives and
DVD/CD drives.

It is meant to be well designed and to fit into the GNOME desktop. So an important aim for gnome-docker is to be shipped with GNOME upstream. It is still in early development.

Currently, it has the following features:

  • tray icon showing the current status and with functionality to undock a laptop
  • handling of hotkeys to undock a laptop (e.g. FN-F9 on ThinkPads)
  • xrandr support to enable/disable external outputs attached to the dock station (experimental, evaluating how it fits there)
  • user notifications about the state of the dock station. E.g.: “Now it’s safe to remove the laptop”

GNOME Docker

As gnome-docker forges ahead, the linux kernel has to improve and has to provide sensible date for userspace to make use of, like exporting which devices are inside a dock station.

Requirements

  • liblazy >= 0.2 from http://www.freedesktop.org/wiki/Software/liblazy

Download

Back from LinuxTag 2008

June 3rd, 2008

Came back from Linux Tag 2008 on saturday evening. It was a short, only two days lasting trip to Berlin, but nevertheless, just great! Had a lot of fun with my colleagues Timo Hönig and Helmut Schaa giving a talk about laptop support in the upcoming openSUSE 11.0. It was a huge success. Great thanks goes to Martin Lasarsch for managing/moderating our talk. The quiz at the end giving away some USB sticks for correct answers has been just fun. It seems people are really listening to our laptops stories, or should we better not have told them at the beginning that there will be give-aways? ;-)

If you like to have a look at our achivement regarding fingerprint readers, suspend, power management and wireless, go have a look at the slides.

I think the improvements have never been so astonishing before! Actually, they even suprised myself when seeing the test results. Just some key facts:

Suspend to Disk

  • LinuxTag 2007: 37.5 seconds
  • LinuxTag 2008: 14.9 seconds

Pretty fast, I guess.

Idle power consumption on a battery powered Thinkpad T61

  • openSUSE 10.3: 11.11 Watt
  • openSUSE 11.0 RC1: 8.51 Watt

Pretty economical, I guess.

For more details, look here.

Providing a D-Bus interface for CPUFreq knobs

May 10th, 2008

There has been a discussion on the HAL development list regarding DeviceKit, a corresponding power management subsystem daemon, and a possible CPU frequency scaling interface.

During the discussion, it turned out, and I realised this quite late, that KPowersave still exports the possibility to set either the powersave or performance governor. That is basically a bad idea, and still there because of former times. See this journal for a good rationale. However, the author quite unfriendly rants towards the developers. Unfortunately, I’ve not seen a bugreport in sourceforge’s bugtracker for that, nor anywhere else. Maybe he could have pointed this out in a more elegant way, instead of immediately telling people they are dangerous. How emotional. And funny after all. I filed it here, just to be sure it is not missed for upcoming openSUSE 11.0.

So that is the one issue of the discussion, a completely other one is about if we need a D-Bus interface for tuning CPU frequency scaling (related to the ondemand governor) knobs. As an example, the ondemand governor provides an up_threshold setting you can tune through sysfs. Basically it defines how long a CPU burst has to be so that the frequency is increased. Quoting the kernel documentation:

up_threshold: defines what the average CPU usaged between the samplings
of 'sampling_rate' needs to be for the kernel to make a decision on
whether it should increase the frequency.  For example when it is set
to its default value of '80' it means that between the checking
intervals the CPU needs to be on average more than 80% in use to then
decide that the CPU frequency needs to be increased.

When having only short CPU bursts, it is better to stay at a low frequency for a short period of time when it comes down to power consumption. And the typical desktop use consists of those short CPU bursts. Browsing a web page, opening a mail folder, etc.

The kernel sets a sane default for this setting. It is nearly self-evident for a default to be sane, someone should have thought carefully about it. However, that does not mean it is ideal. It just cannot be for all different kind of use cases. Servers, desktops, what applications are running, “on battery”, “on AC”, namely, depending on the current power source.

So I am an advocator of having a D-Bus interface somewhere at the system level (we already have in HAL, but this will most likely vanish sooner or later due to its successor called DeviceKit) for tuning such knobs by someone who cares about policy. And policy is more and more put to Desktop applications these days.

Maemo Music Player Client 0.2.1

April 14th, 2008

I finally managed to get to work on MMPC after quite some time. MMPC 0.1 was 2007-11-14 08:45 (wow, that was pretty early in morning :-))

mmpc logo

Well, mmpc-0.2.1 is available for immediate consumption. Changes, which were major concerns until now, are:

  • New buttons and images, finally. And a new logo you can see above.
  • Add tap-and-hold functionality to more places. For example, it’s now possible to update the database from within the client.
  • Add scroll windows to all preference tabs to display the full content.
  • Bold the currently played track.
  • Increase connection timeout to 3 seconds. This will hopefully solve the strange disconnect issues I wasn’t able to reproduce.
  • Fixed tree browsing in playlist browser.

Fresh screenshots can be found here. Packages are available from the extras repository. So most people will get the update automatically (if anything goes wrong, try to enable red pill mode). Otherwise, grab them from garage.

Next things will include the support for some plugins. Please report any problems. Happy listening!

Energy Star: Jump on the Bandwagon!

March 9th, 2008

Do it yourself

Ever wondered what the Energy Star label is good for? Ever wondered why it mostly pops up on things like printers and monitors? But how about your personal computer or your laptop?

If you want to find out, consider reading Measuring Power Consumption in the Light of EnergyStar. It contains a detailed guide about how to test your laptop for Energy Star compliance. At SUSE’s Mobile Devices Team, we’re currently building up a database of all different kind of laptop computers regarding their Energy Star compliance and power consumption. Wanna help? Follow the above mentioned guide and send your results to me (hmacht a t suse d o t de). All results will help us to drive development efforts in this area and will help to identify possible power consumption regressions in upcoming releases. However, to make this possible, the first thing we need is a base collection of laptop results to compare against.

To prevent questions about publishing the results, no, I won’t do that. I do not want to compromise any kind of manufacturer in public. They will notice for themselves as soon as there pop up more laptops running Linux having a shiny blue Energy Star label printed on the case or packing ;-)

Energy Star Label

FOSDEM 2008

Like the homonymous title of this post, I gave a talk at this year’s FOSDEM at Brussels on Energy Star. It focuses on the requirements for laptop computers, and about how anyone can test his laptop for Energy Star compliance.

If you’re too lazy to read through the slides, which should be quite self-explanatory, wait for the video showing me in action. The videos of all FOSDEM talks given by openSUSE community people should be up at the openSUSE FOSDEM page soon. Stay tuned.

http://opensuse.org/PowerMeasurements

Interested in power consumption measurements in general? Consider having a look at the PowerMeasurements openSUSE wiki page. This is, and will be pushed to become the central point for collecting information, hints or tips and tricks about this topic.