UPower detects incorrect battery state
Submitted by afn..@..ll.edu
Assigned to Richard Hughes @hughsient
Description
Created attachment 129128 upowerd log
I have a MacBook Pro (mid-2014) with a bq20z451 battery. UPower detects when the battery state changes, but it reports the incorrect state each time, and doesn't correct itself until the poll interval (120 seconds) has expired. It also detects the power state correctly on startup. So it looks like there's some sort of race condition where UPower is being notified of a state change, but it's responding too quickly, before the state has really changed.
I'm attaching a upowerd log in which I:
- Start the daemon with AC power connected (detected correctly)
- Unplug the power supply (which is immediately detected, but the battery state is still detected as "charging"
- Wait 120 seconds, and then the battery status is corrected.
It's unclear whether this is a bug in UPower, udev, or the kernel. Thoughts?
Tested with the latest upower from git (402640be), Linux 4.9.4, and systemd 232.
Thanks! Tony
Attachment 129128, "upowerd log":
upower.log