At boot, the Asus battery driver returns -ENODATA [1] to avoid resetting charge threshold settings. This behavior prevents UPower's udev rules from detecting the charge threshold feature. This issue can be resolved by testing for the attribute's existence when matching udev rules, rather than performing a read operation at boot. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers?id=186bf90 Resolves: #347 Signed-off-by: Kate Hsuan <hpa@redhat.com>
11 lines
414 B
Text
11 lines
414 B
Text
ACTION=="remove", GOTO="battery_end"
|
|
|
|
SUBSYSTEM=="power_supply", TEST=="charge_control_start_threshold", \
|
|
IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \
|
|
GOTO="battery_end"
|
|
|
|
SUBSYSTEM=="power_supply", TEST=="charge_control_end_threshold", \
|
|
IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \
|
|
GOTO="battery_end"
|
|
|
|
LABEL="battery_end"
|