linux: Re-poll batteries after a line power change

System Internals / UPower - Benjamin Berg [redhat.com] - 13 May 2022 14:07 UTC

When a change on a line power occurs, then re-poll all batteries aggressively for a while. It is very common for batteries to take about a second to refresh their state and many will not send appropriate notifications in this case.

Closes: #179, #159

b342964 linux: Re-poll batteries after a line power change
src/linux/meson.build | 1 -
src/linux/up-backend-linux-private.h | 29 -----------------------------
src/linux/up-backend.c | 9 ---------
src/linux/up-device-supply.c | 23 +++++++++++------------
src/up-daemon.c | 2 +-
src/up-device.h | 2 +-
6 files changed, 13 insertions(+), 53 deletions(-)

Upstream: cgit.freedesktop.org


  • Share