clockworkpi-uconsole-cm4 - inaccurate reading of axp20x-battery
Describe your issue
What's the expected behaviour?
I am currently using 2 18650 cels (LG MJ1s) in my uConsole. The cells should be reporting somewhere around 22Wh, but the uConsole sees them at 8 Wh. This is an issue present in Clockwork Pi's Debian-based images as well. It will report 8 Wh regardless of which cells you use.
Yatli on the ClockworkPi forum wrote a patch for the axp228 driver, which correctly reports energy and power readings for the axp20x-battery. While it was written for the A06 core, Yatli believes it should work with the CM4 core as well.
What's the current behaviour?
When I run cat /sys/class/power_supply/axp20x-battery/uevent
it reports
POWER_SUPPLY_ENERGY_FULL=0
POWER_SUPPLY_ENERGY_NOW=0
POWER_SUPPLY_ENERGY_FULL_DESIGN=8000000
How to reproduce your issue?
run cat /sys/class/power_supply/axp20x-battery/uevent
What device are you using?
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v23.12
-
v23.06
(supported until 2024-01-18) -
I confirm that the issue still is present after running sudo apk upgrade -a
On what environment did you encounter the issue?
Environments
-
GNOME Shell on Mobile -
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway) Please post the output of sxmo_version.sh
-
Other: Wayland/Sway
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device