upower battery indicator/service is delayed in reporting correct power and battery status
Description of problem:
The upower service and battery indicator is delayed in showing accurate results for about 3 to 5 minutes after changing power status from plugged in/charging to unplugged/discharging almost every time. This problem is highly annoying and I did not encounter it until installing Fedora 34 (default Gnome distro). When the charger is unplugged, the upower service still reports the system is charging for 3 to 5 minutes, despite acpi reporting correct results that it is on battery during this time. The same goes for when the charger is plugged in, the upower service still reports that the system is on battery for 3 to 5 minutes even when acpi reports it is charging. Eventually upower reports the correct status, but it takes too long in doing so. Forcing upower to refresh manually using
busctl call --system org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.UPower.Device Refresh
instantly fixes the problem, as does restarting the upower service using
sudo service upower restart
This phenomenon seems to come with an inaccuracy in the reported battery percentage: The battery percentage indicator is also slightly incorrect sometimes, reporting 95% to 99% charge until the upower service is restarted or a refresh is issued via busctl, even when acpi reports 100% charge.
Why is upower not being refreshed soon enough? Something interesting to note is that the sound effect for plugging in and unplugging the charger actually plays correctly most times despite the delay in upower My hardware is a Lenovo Yoga C940 15". I would be grateful if this somewhat bothersome problem (the system does not appear as responsive & trustworthy when it takes so long to report the correct status) could be addressed.
Version-Release number of selected component (if applicable): upower client and daemon version 0.99.11
How reproducible: Almost every time laptop charger is plugged in or unplugged from machine, this delay occurs. Inaccuracy in battery status occurs most times as for this reason.
Steps to Reproduce:
- Unplug or Plug in laptop to power source
- Observe that upower does not update the service or battery indicator to the correct status for 3 to 5 minutes
Actual results: The charging indicator and upower service are delayed in reporting the correct power status by 3 to 5 minutes despite acpi reporting correct results. Battery percentage indicator is also slightly incorrect sometimes, reporting 95% to 99% charge until the upower service is restarted or a refresh is issued via busctl, even when acpi reports 100% charge.
Expected results: The charging indicator and upower service should report almost immediately when power/battery status changes from unplugged/discharging to plugged in/charging and vice versa. The percentage charged indicator should also follow acpi and not stop updating when the battery is fully charged.
Additional info: I don't believe this is a BIOS/hardware issue because acpi reports correct results every time the system is plugged in and unplugged, and manually refreshing upower via busctl or through the service works every time as well. This seems like a problem with the upower service.