Skip to content

Commit

Permalink
[battery-udev] Enablers for forced udev property refreshing. JB#49693
Browse files Browse the repository at this point in the history
For example pinephone sends udev notification about charger disconnect, but
not about battery making related transition to discharging state - which
leaves system believing battery is still getting charged.

Add enablers for optionally refreshing properties of all power supply
devices whenever at least one device is reporting changes.

Forced refresh is disabled by default. Enabling should be done only
on those devices where it is needed, via hw specific mce configuration.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 25, 2020
1 parent d387d08 commit a01dacd
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 49 deletions.
28 changes: 28 additions & 0 deletions inifiles/battery-udev-settings.ini
@@ -0,0 +1,28 @@
# Configuration file for MCE - udev battery plugin

[BatteryUDevSettings]

# Settings related to orking around missing / too
# infrequent udev change notifications about power
# supply devices.

# Some devices might not send udev notifications
# about all power supply devices e.g. PinePhone at
# the moment does notify about charger disconnect,
# but not about battery making simultaneous
# transition to discharging state.
#
# It is possible to instruct udev battery plugin to
# poll all power supply devices whenever notification
# about change in one is received.
#
# This is relatively costly operation and should be
# enabled only when necessary.
#
# To enable:
#
# RefreshOnNotify = true
#
# Default is:
#
# RefreshOnNotify = false

0 comments on commit a01dacd

Please sign in to comment.