Battery statistics are incorrect on krillin and vegetahd
Bug #1471913 reported by
Ionut Negru
This bug affects 73 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Confirmed
|
High
|
Unassigned |
Bug Description
Summary from this question: https:/
The battery percentage is not updated while charging and some times not even after rebooting the device. Battery statistics view also shows wrong information.
Thank you!
no longer affects: | unity8 (Ubuntu) |
Changed in canonical-devices-system-image: | |
status: | New → Confirmed |
tags: | added: power-bugs |
tags: | added: upower |
Changed in canonical-devices-system-image: | |
assignee: | nobody → TWN EDU (twnedu) |
assignee: | TWN EDU (twnedu) → nobody |
Changed in canonical-devices-system-image: | |
assignee: | nobody → Yuan-Chen Cheng (ycheng-twn) |
importance: | Undecided → High |
Changed in canonical-devices-system-image: | |
assignee: | Yuan-Chen Cheng (ycheng-twn) → Jason Yen (jasonyen) |
Changed in canonical-devices-system-image: | |
milestone: | none → backlog |
Changed in canonical-devices-system-image: | |
importance: | Medium → High |
summary: |
- [MX4] Battery statistics are incorrect + Battery statistics are incorrect on MTK based devices |
Changed in canonical-devices-system-image: | |
assignee: | Jason Yen (jasonyen) → Yuan-Chen Cheng (ycheng-twn) |
tags: | added: bq e4.5 |
summary: |
- Battery statistics are incorrect on MTK based devices + Battery statistics are incorrect on krillin and vegetahd |
tags: | removed: meizu mx4 |
Changed in canonical-devices-system-image: | |
assignee: | Yuan-Chen Cheng (ycheng-twn) → nobody |
This is IMO a kernel issue.
The attached script dumps the contents of most files under /sys/class/ power_supply/ battery/ , plus the battery status as reported by upowerd, in CSV format every five seconds. I managed to have it running in the background nearly all of the time during the following routine:
- Started at 95% reported battery level, with WiFi connected and screen lock off, so the screen stayed on all the time.
- Ran Neverball as the active app and "yes" in the background to keep the system busy, at about 150% CPU, until the device shut off and could not be powered on anymore. The attached CSV file shows a near linear drop of the reported battery capacity percentage until the device shuts off after timestamp 1436220202.
- Attached the device to an USB charger rated at 5V/2A, and powered it on as soon as Little Kernel would let me. The CSV data shows some strange output of /sys/class/ power_supply/ battery/ capacity : Despite the battery cell voltage continuously rising until it reaches its "full" level, the reported capacity percentage is first stuck at eight percent, then at ten and 15 percent and finally stays at 20 percent for the rest of the charging process (the rest of the night). So the hardware actually reports the battery voltage correctly, but the piece of software that converts it to a percentage is buggy?
- Shut off the device manually and reconnected the charger to start up the "charging while off" animation shown by Little Kernel. The battery level was immediately reported correctly as "100%". Little Kernel has its own drivers to talk to the battery charger and PMIC circuits, and it seems to do the voltage- to-percentage conversion correctly.
- Powered the device on at timestamp 1436246366. /sys/class/ power_supply/ battery/ capacity now suddenly reported 100 percent as well.