Issue #2125

Report battery % / charging

Added by Denis 'GNUtoo' Carikli about 1 year ago. Updated 1 day ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Galaxy S 3 (I9300), Unknown
Type of work:
C programming

Updated by Victor Shilin 6 months ago

The battery driver needs to use VF SOC register in order to report the charge percentage correctly (the following patch by Wolfgang Wiedmeyer made this work on Replicant 11:
The charger driver reports "Discharging" (in the status sysfs node) even when the cable is connected (the "online" sysfs node, however, is showing the value "1").
I tried to force the "status" node to return "Charging" instead (whenever the "online" node reports value "1"), but this didn't help (need to investigate how exactly the healthd service detects charging).


Updated by Kurtis Hanna 6 months ago

Not sure if this helps at all, but here is a max17047 related commit from upstream that was added a few months ago.


Updated by _I3^ RELATIVISM 6 months ago

  • Type of work C programming added

Updated by Victor Shilin 6 months ago

healthd service detected device charging after setting the charger driver type from POWER_SUPPLY_TYPE_BATTERY to POWER_SUPPLY_TYPE_MAINS:

Not sure if this the correct way to resolve the issue, though.
smdk4412 kernel instead use "samsung_fake_battery" driver to create "usb" and "ac" power supplies:


Updated by Kurtis Hanna 26 days ago

It looks like postmarketOS has recently been trying to solve this issue, but have run up against some issues:


Updated by Kurtis Hanna 1 day ago

This patch, which is a v2 of an old Wolfgang patch, was just submitted upstream which claims to cause the i9300 to provide an accurate State of Charge value at all times.

Also available in: Atom PDF