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.

16 responses to “gnome-power-manager and DeviceKit-power”

  1. James Westby

    Hi Richard,

    The first graph needs units on the y-axis.

    Thanks,

    James

  2. Søren Hauberg

    Do you really need the ‘Refresh’ button?

  3. William Lovaton

    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.

  4. jry

    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.

  5. Andreas Nilsson

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

  6. Daniel Schierbeck

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

  7. Matthew Holloway

    Yeah I just popped in to say that two of those icons don’t make much sense. AC adaptor should be a plug, monitor should be a monitor (without the system box)

  8. bash

    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.

  9. anon

    Needs more units

  10. mpt

    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.

  11. mpt

    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?

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