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.
I really like your idea. Has it been packaged so we can test it out?
No, but it’ll be in the next releases, so it’ll be in Fedora 11 for sure.
Good idea – but won’t that distort the wakeup results too much if you run a DBUS call and GTK stuff every 20 seconds?
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).
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.
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.
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”.
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”.
Very nice. And I agree with you wrt the suggestions
> 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.
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?
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!.
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.
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.