gnome-power-manager and DeviceKit-power

DeviceKit-power is a system activated service I’ll be writing about in detail in a blog post in the near future. It’s a bit like HAL, but makes common API calls easy for applications (is battery power low?) and also moves the battery profiling down to the system layer from the session so it works for all users and more importantly from the GDM login screen. It’s very lightweight and low on resource usage when it’s active.

Here are some screenshots from gnome-power-manager trunk (compile with –enable-devkit-power).

Statistics profile for my battery
Statistics profile for my battery
History for my Watts Up Pro
History for my Watts Up Pro

The monitor device is a Watts Up Pro device. As you plug it in, DeviceKit-power opens the device, and starts reading data. I’m using it here to monitor my power strip with my laptop and all the power-warts attached. I’ll be converting gnome-power-manager to use DeviceKit-power rather than HAL during the next release cycle. Hopefully, I’ll maintain both HAL and DeviceKit-power backends, although this isn’t making the number of #ifdefs any smaller, which sucks from a readability point of view.

The GUI’s are pretty raw, so suggestions and criticisms are welcome.

Published by


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.

16 thoughts on “gnome-power-manager and DeviceKit-power”

  1. Richard, are you saying that DeviceKit-power reads the data directly from the Watts Up Pro device? how is that device connected to the computer? I mean besides the power cord.

  2. i really don’t need an option for “smooth data before plotting”. you either decide that it should be smooth or not, as a user i can’t care less.

  3. jry:

    Most people don’t care about the power spikes and olny care about the average value. I think it”s useful to be able to get the “real” values as sometimes this shows other trends, for instance when a battery discharges every 9 percent in 10, when there are only 90 valid battery states.

  4. Something I would like to see in GNOME is less clutter and less inappropriate use of icons where they are really not needed.
    So perhaps removal of the icons in the sidebar could be cool (this would also give you 32 more pixels to show the graphs).

  5. Perhaps a more suitable icon for “AC adapter”? Also, the “Monitor” icon doesn’t really make any sense…

  6. Nice work so far. I also have some suggestions for the GUI. As other have said the icons really do make no sense at the moment. But I suspect that just due to it being a test version. I think though the icons should stay. As for the charts, gnome-system-monitor got some really nice looking cairo graphs a couple of versions back. Is there a chance that those could be used here as well? Or is that not possible? Also what exactly is the difference between “Statistics” and “History”? They both seem the chart past consumption.

  7. I agree with Søren. I don’t know what a data provider is, but can gnome-power-manager tell the difference between one that updates itself and one that doesn’t? If so, for those that don’t update themselves, can gnome-power-manager be smart enough to do the refresh every minute (or five minutes, or whatever) without human intervention? Then you wouldn’t need the “Refresh” button.

    I agree also with jry. Instead of smoothing the points, how about showing both the raw points and a smooth curve?

    I’m sure I’d find these graphs very interesting if I understood the titles and axis labels. (I’ve never understood why “Power history” doesn’t show real clock times, for example, or what a “Charge time profile” is.) However, I can tell you that the menu for choosing a graph really should go above the graph, not below it, because the graph is dependent on the menu rather than the other way around.

  8. Yep, that looks much better! With that I don’t think you need either of the checkboxes any more.

    To be honest I’m still not sure what that graph is showing, though. Would a perfectly performing battery show the line passing through (1 hour, 1 hour), instead of (32 minutes, 1 hour) as it does in that screenshot? And if it says “Data length: 2 hours”, which of the axes are supposed to show 2 hours, and why don’t either of them?

Comments are closed.