Q: Is there a way to change the charging percentage display in the top line of the phone (next to time and 4G signal strength) into a real voltage display (with 2 digits after comma)?
Great idea for X10V!
I looked the Charger Control application in openrepos (storeman) – it is not
available for Xperia 10 III (SFOS 5.x, probably not (some) older versions either).
So I went to try the manual methods.
I started with just
devel-su sh -c 'echo 1 > /sys/class/power_supply/battery_ext/lrc_enable'
(failed to see there is also ../battery/lrc_enable
but IIRC that also got the value of 1
)
That was not enough to make any difference how battery is being charged and
getting discharged.
so, then I read more in this thread and tried
240 echo 80 > battery_ext/lrc_socmax
241 echo 75 > battery_ext/lrc_socmin
(those after devel-su
when already chdir’d in /sys/class/power_supply
)
… and, to my delight – now the battery charge level has been steadily in 77% for
the last 3 hours – that’s on Sony Xperia 10 III, SFOS 5.0.0.62.
My guess is this is better for the battery health for the use I have for it just now.
Next is to figure out what is the way to make the device charge battery
until it reaches suitable level (80%) and then not use battery until
charger disconnected (or charger not giving enough power) - all the info
may be in this thread (and it might already work with the current settings), but
that’s to check when I don’t need this current networking setup anymore
(and I already have some systemctl rules that work at boot time so that part is easy).
EDIT: forgot to mention: I’ve been tethering continuously 4 days now, battery
level was swinging between 77% and 80% (discharging and charging). one day
to go – and after that I can start doing all kinds of experiments…
(and before I forget, head -999 /sys/class/power_supply/*/* | less
is convenient way to look the values of these sysctl files)
So, with charger connected, battery level stayed at 77% the couple
of days I kept device in. After I disconnected (charger) cable,
battery power kicked in. Later, when I plugged cable back, device
charged to 80%, the discharged (back) to 77% and then stayed
there (i.e. device was running on external power).
Great, Good enough for me. Couple of iterations with systemd
configs and got the following file work:
# Copy this as (e.g.) /usr/local/etc/chargerpower-oneshot.service
# then execute systemctl enable /usr/local/etc/chargerpower-oneshot.service
# and reboot (or systemctl start chargerpower-oneshot.service)
# Tested in one Xperia 10 III system, **charge limit set to 80% in settings**.
# Battery charges to 80% then discharges to 77% and then powered by "charger".
# I don't know why this works as it works. Good enough for me.
[Unit]
Description=charger power at ~77%
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -eufxc 'for a; do eval $a; done' a0 \
'echo 80 > /sys/class/power_supply/battery_ext/lrc_socmax' \
'echo 75 > /sys/class/power_supply/battery_ext/lrc_socmin' \
'echo 1 > /sys/class/power_supply/battery_ext/lrc_enable'
[Install]
WantedBy=multi-user.target
I also have Battery Buddy installed - great software but (currently) disabled as in Settings → Battery there is similar feature. As
mentioned in #comments above this has been tried with exactly
that one config of mine. With differently configured battery charging
(levels) one may need to tweak the config. Fortunately that is
reasonable easy piece left…
I would guess this charger has a few millivolts too low voltage. This sometimes occur, not all chargers are equal and voltage way vary some millivolts. I suggest to try another charger, best is a strong universal USB power supply with 3A and a short and thick good quality cable.