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.

14 responses to “gnome-power-manager and processor wakeups”

  1. Eric "Sparks"

    I really like your idea. Has it been packaged so we can test it out?

  2. oliver

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

  3. Khashayar

    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).

  4. Nathan Y

    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.

  5. Johan

    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.

  6. Bertrand

    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”.

  7. Emilio Pozuelo Monfort

    Very nice. And I agree with you wrt the suggestions

  8. Mathias Hasselmann

    > 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.

  9. William Lovaton

    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. bash

    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. Abbas K

    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.

Bad Behavior has blocked 2769 access attempts in the last 7 days.