diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-09-15 18:37:24 +0200 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-09-21 20:28:10 +0200 |
commit | bd37360a210603cb2c27feb7602008c71ca2ab67 (patch) | |
tree | 49dc751f33417e5e3dcc6e41739563f0048a0ef4 /rules.d/60-autosuspend.rules | |
parent | mkosi: Fix CI (diff) | |
download | systemd-bd37360a210603cb2c27feb7602008c71ca2ab67.tar.xz systemd-bd37360a210603cb2c27feb7602008c71ca2ab67.zip |
hwdb: Permit unsetting power/persist for USB devices
The USB persist feature allows devices that can retain their state when
powered down to work across suspend/resume. This is in particular useful
for USB drives.
However, the persist feature can get in the way for devices that are
unable to retain their state when power is lost. An example of such
stateful devices are fingerprint readers where USB persist should be
disabled to ensure userspace can detect whether the USB device had a
power loss during system suspend.
This will initially be used by the libfprint autosuspend hwdb.
Closes: #20754
Diffstat (limited to 'rules.d/60-autosuspend.rules')
-rw-r--r-- | rules.d/60-autosuspend.rules | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rules.d/60-autosuspend.rules b/rules.d/60-autosuspend.rules index 1f9ebef631..332d052caa 100644 --- a/rules.d/60-autosuspend.rules +++ b/rules.d/60-autosuspend.rules @@ -11,4 +11,8 @@ SUBSYSTEM=="i2c", ATTR{name}=="cyapa", \ ENV{ID_AUTOSUSPEND}=="1", TEST=="power/control", \ ATTR{power/control}="auto" +# Disable USB persist if hwdb says so. +ENV{ID_PERSIST}=="0", TEST=="power/persist", \ + ATTR{power/persist}="0" + LABEL="autosuspend_end" |