gnome-power-manager and processor wakeups

Powertop is a great tool. Is does however have some disadvantages:

  • ncurses GUI
  • You have to run it as root
  • It gives you hardcore suggestions that you have to do manually, which in turn disable bits of the desktop
  • You can only run one instance of powertop at a time, else you get crazy readings
  • There’s no shared library giving access to the data
  • It’s not extensible, so you can’t do much with the data

Now, it turns out the actual data processing code of powertop is pretty easy, sampling /proc/interrupts and /proc/timer_stats every few seconds and throwing away interrupts that are defered and that sort of thing.

In a couple of hundred lines of C, I’ve added this support to DeviceKit-power on a new DBus interface, and added a trivial GObject helper for applications to use.


Long term I want to get this functionality in gnome-system-monitor (it’s querying a simple DBus interface), as I think this data better fits there. gnome-power-statistics is just a handy module that already depends on DeviceKit-power.

As usual, comments and suggestions welcome.

Published by

hughsie

Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management. Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.

14 thoughts on “gnome-power-manager and processor wakeups”

  1. Good idea – but won’t that distort the wakeup results too much if you run a DBUS call and GTK stuff every 20 seconds?

  2. This is exactly what I’ve been hoping for ever since I first found out about powertop. Very nice, indeed! Will it also give suggestions, as powertop does?

    (Off topic: Speaking of powertop, I’ve noticed that gpm causes a lot of wakeups when I switch from AC to battery. Problem’s solved by killing gnome-power-manager and immediately restarting it).

  3. My biggest wish is a way to “package” actions I apply in powertop; why do I have to press “S”, “K”, etc every time to enable USB suspend, kill something or other, etc. I’d like to say “you know, do this every time I go on battery” (or present me with a notification popup and ask if I’d like to.

  4. I agree with Nathan. It would be great if this could have something similar to the powertop powersaving suggestions, but with persistence. Presumably by poking at g-p-m settings/profiles.

  5. I think that this is the part I like the most in modern Linux systems. GUIs for everything. It’s about time to have tools like this one if you want to call yourself a “modern operating system”.

  6. We are not going to offer the suggestions like powertop — i would prefer to just fix the kernel drivers and make all this stuff “just work”.

  7. > We are not going to offer the suggestions like powertop —
    > i would prefer to just fix the kernel drivers and make all this stuff “just work”.

    Short term it still makes sense to provide suggestions: Without applying any powertop suggestions my notebook runs on batteries for only 2 hours, after applying the suggestions I get up to 5.5 hours. Quite a difference, I’d say.

  8. Mathias, as soon as you do short term hacky workarounds, people expect the functionality to be there in future releases. It’s as much work doing things properly in the kernel as bodging things in a GUI. Out of interest, what suggestion in powertop causes the biggest drop in power consumption?

  9. Richard, this is great. I always wanted something like this since powertop came out.

    I have just a little suggestion: Develop a panel applet that show the wake ups with the same colors as powertop does and may be the actual number: Red when it’s too high, yellow when it’s normal and green when it’s very low.

    Great work!.

  10. Now if someone would make a GUI like that for nethogs as well and integrate it with gnome-system-monitor I would be completly happy.

  11. I just hope if it is put into gsm that it is toggleable and not shown in the default config. would be a nice plus for developers.

Comments are closed.