mirror of
https://github.com/systemd/systemd.git
synced 2024-12-30 12:33:50 +08:00
bd37360a21
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
19 lines
532 B
Plaintext
19 lines
532 B
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
ACTION!="add", GOTO="autosuspend_end"
|
|
|
|
# I2C rules
|
|
SUBSYSTEM=="i2c", ATTR{name}=="cyapa", \
|
|
ATTR{power/control}="on", GOTO="autosuspend_end"
|
|
|
|
# Enable autosuspend if hwdb says so. Here we are relying on
|
|
# the hwdb import done earlier based on MODALIAS.
|
|
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"
|