ubports / unity8

The operating environment for everywhere. Lomiri development has moved to https://gitlab.com/ubports/development/core/lomiri
https://lomiri.com/
GNU General Public License v3.0
722 stars 99 forks source link

Battery charging led is always on #449

Closed Kethen closed 2 years ago

Kethen commented 2 years ago

I'm working on a port and, I found that while qml/Wizard/Page.qml seems to be working properly with showing whether charging is happening (lightning icon and green, brief battery level, red icon when battery level is less than 20%)

on qml/Panel/Indicators/IndicatorsLight.qml it tends to get stuck on battery-full-charging-symbolic, causing the battery light to be always on when screen is off

Meanwhile, deviceState from com.canonical.indicator.power is accurate

I'm happy to assist with narrowing down the issue, or I could use help to tell if it's a porting issue on my end

dbus:
signal time=1658144691.228132 sender=:1.44 -> destination=(null destination) serial=164 path=/org/freedesktop/UPower/devices/battery_battery; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.freedesktop.UPower.Device"
   array [
      dict entry(
         string "UpdateTime"
         variant             uint64 1658144691
      )
      dict entry(
         string "IconName"
         variant             string "battery-good-symbolic"
      )
      dict entry(
         string "Voltage"
         variant             double 3.861
      )
      dict entry(
         string "State"
         variant             uint32 2
      )
   ]
   array [
   ]

unity:
[2022-07-18:19:49:02.365] qml: updateLightState: onDisplayStatusChanged, indicatorState: BATTERY_CHARGING, supportsMultiColorLed: true, hasMessages: false, icon: battery-full-charging-symbolic, displayStatus: 1, deviceState: discharging, batteryLevel: 58
Kethen commented 2 years ago

it seems that my kernel is confusing upower, I found a work-around now (by hiding the extra sysfs device that does not report standard charging/discharging state using mount, but is used by halium), closing the issue