~mil/sxmo-tickets#395: 
Battery icon and percentage incorrect when physical keyboard connected

I'm running sxmo on the PinePhone. When I plug it into the docking bar (one of these guys) with a keyboard attached, the battery icon changes to a filled battery icon ( I believe) regardless of the charging status and the number next to the percent symbol disappears.

I investigated a little and discovered that when the dock is plugged in another file appears at /sys/class/power_supply/hidpp_battery_0. It's type is "Battery" but it doesn't have a capacity like the one in /sys/class/power_supply/axp20x-battery. Instead, it has a file named capacity_level:

$ ls -1 /sys/class/power_supply/hidpp_battery_0/
device@
hwmon5/
power/
powers@
subsystem@
wakeup12/
capacity_level
manufacturer
model_name
online
scope
serial_number
status
type
uevent

$ cat /sys/class/power_supply/hidpp_battery_0/{capacity_level,status,type}
Normal
Discharging
Battery

If I plug the dock into a USB power supply, the contents of these files change:

$ cat /sys/class/power_supply/hidpp_battery_0/{capacity_level,status,type}
Unknown
Unknown
Battery

The usual suspects:

  • postmarketos-ui-sxmo-1.5.1-r1
  • sxmo-dwm-6.2.14-r0
  • sxmo-utils-1.5.2.1-r0
Status
REPORTED
Submitter
~flimflam
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

~flimflam 2 years ago

These versions may also be relevant, I really don't know:

  • dbus-1.12.20-r2
  • dbus-glib-0.112-r0
  • dbus-libs-1.12.20-r2
  • dbus-openrc-1.12.20-r2
  • device-mapper-2.02.187-r1
  • device-mapper-event-libs-2.02.187-r1
  • device-mapper-libs-2.02.187-r1
  • device-mapper-udev-2.02.187-r1
  • device-pine64-pinephone-0.28-r3
  • device-pine64-pinephone-nonfree-firmware-0.28-r3
  • eudev-3.2.10-r0
  • eudev-libs-3.2.10-r0
  • eudev-openrc-3.2.10-r0
Register here or Log in to comment, or comment via email.