From: Lennart Poettering Date: Tue, 27 Jun 2017 14:14:30 +0000 (+0200) Subject: logind: relax udev rules matching devices logind watches for X-Git-Tag: chiark/234.4-1+devuan1.1+iwj1~90 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=964a6d9fb555cc86528eb1cc1f6d044f85584842 logind: relax udev rules matching devices logind watches for Now that we have support for key/switch masking in logind, we can relax the rules by which logind picks the devices to watch a bit, after all we won't wake up anymore for every single event, but instead only the events we actually care about. This should make power/suspend keys on normal usb/atkbd keyboards just work. --- diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules index e2855b50f..394a80f1f 100644 --- a/src/login/70-power-switch.rules +++ b/src/login/70-power-switch.rules @@ -7,12 +7,7 @@ ACTION=="remove", GOTO="power_switch_end" -SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="* WMI hotkeys", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", \ - SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", ATTRS{keys}=="*,116|116,*|116|*,116,*", TAG+="power-switch" +SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_SWITCH}=="1", TAG+="power-switch" +SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEY}=="1", TAG+="power-switch" LABEL="power_switch_end"