Comment 16 for bug 64978

Revision history for this message
Luka Renko (lure) wrote :

I think this is caused by this assumption:

            if properties["battery.rechargeable.is_charging"]:
                state = "charging"
            elif properties["battery.rechargeable.is_discharging"]:
                state = "discharging"
            elif not properties["battery.rechargeable.is_discharging"] \
                 and not properties["battery.rechargeable.is_charging"]:
                if current == 0:
                    state = "empty"
                else:
                    state = "charged"

If battery reports both charging and discharging as false, then we current level and if it is zero, it is empty, otherwise we consider it as fully charged.
It may be that your laptop does not consistently report charging=true and this case powermanager wrongly assumes the battery is fully charged.