From 964a6d9fb555cc86528eb1cc1f6d044f85584842 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Jun 2017 16:14:30 +0200 Subject: [PATCH] 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. --- src/login/70-power-switch.rules | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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" -- 2.30.2