Comment 4 for bug 1075192

Revision history for this message
Charles Kerr (charlesk) wrote :

What's causing this bug:

Before 12.10, indicator-power only showed batteries in the panel. The new i-power code shows other devices too as per the Power Menu spec <https://wiki.ubuntu.com/Power#Battery_menu> (which, has an example of showing a mouse in the panel). The new code picks the device based on the spec's rule: "which will lose power soonest (and optionally when), or otherwise which device will take longest to charge (and optionally how long it will take)."

This bug is happening because the above criteria gives the same weight to (1) an AC Power Line and (2) a battery or mouse or keyboard which is neither charging nor discharging.

So we need to refine the choice for the case where no device is charging nor discharging. I suggest i-power picks a battery first, if there is one. Otherwise, other devices like mouse/keyboard/ups. The power line device would be chosen last.