rules: 60-upower-battery: Fix for Asus battery charge threshold detection
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>
This commit is contained in:
parent
133e024e29
commit
83f86c75d2
1 changed files with 2 additions and 2 deletions
|
|
@ -1,10 +1,10 @@
|
|||
ACTION=="remove", GOTO="battery_end"
|
||||
|
||||
SUBSYSTEM=="power_supply", ATTR{charge_control_start_threshold}!="", \
|
||||
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", ATTR{charge_control_end_threshold}!="", \
|
||||
SUBSYSTEM=="power_supply", TEST=="charge_control_end_threshold", \
|
||||
IMPORT{builtin}="hwdb 'battery:$kernel:$attr{model_name}:$attr{[dmi/id]modalias}'", \
|
||||
GOTO="battery_end"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue