samsung-{serranove,a3,a5}: Battery state shown as "empty"
Describe your issue
Issue #1097 (closed) is back. That means that the battery state of devices using rt5033-battery is unknown for some time after boot. At the original issue it was 2 minutes, now it's 30 secs only luckily. After that time, the battery state is recognized as "discharging". Depending on the user interface, there is some sound or screen wakeup.
The issue shows up after upgrading UPower to version 0.99.18-r0. This is because UPower removed the Refresh() D-Bus method [1]. We use that method as a workaround in file /lib/udev/rules.d/95-rt5033-battery-refresh.rules
[2].
A fix within UPower is in discussion [3].
- [1] https://gitlab.freedesktop.org/upower/upower/-/merge_requests/66
- [2] https://gitlab.postmarketos.org/postmarketos/pmaports/-/blob/v21.12/main/postmarketos-base/rootfs-lib-udev-rules.d-95-rt5033-battery-refresh.rules
- [3] https://gitlab.freedesktop.org/upower/upower/-/issues/146
What's the expected behaviour?
Usual battery icon.
What's the current behaviour?
Battery state is unknown for 30 seconds after boot. The behavior on that depends on the user interfaces. Phosh shows a battery with question mark. After 30 secs, there is a sound and the battery icon looks normal.
If it's a slow device needing a long time to boot, the 30 secs seem shorter or may be even not noticable at all. I had the impression when copying sudo cp /lib/udev/rules.d/95-rt5033-battery-refresh.rules /etc/udev/rules.d/95-rt5033-battery-refresh.rules
(thereby overriding the original udev rule), modify sudo vi /etc/udev/rules.d/95-rt5033-battery-refresh.rules
, commenting out all lines, device samsung-serranove boots faster (or Phosh comes up faster) and the issue is more visible.
How to reproduce your issue?
On edge, after apk upgrade, UPower upgrades to version 0.99.18-r0, reboot.
What device are you using?
samsung-serranove
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v21.12
-
I confirm that the issue still is present after running sudo apk upgrade -a
On what environment did you encounter the issue?
Phone environments
-
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway)
Other
-
No environment ("none" in pmbootstrap) -
GNOME -
KDE Plasma -
Kodi -
MATE -
Shelli -
Sway -
Weston -
Xfce4 -
fbkeyboard -
i3wm -
Sxmo (Xorg/Dwm) -
console UI -
framebufferphone
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device
What's the build date of the image? (in yyyy-mm-dd format)
unknown
Additional information
none