This might be too broad since it will listen on *all* gpio-keys based input devices for a power button press, but such is life.
root@arietta-g25:~# udevadm info -a /dev/input/event0 Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/keys/input/input0/event0': KERNEL=="event0" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/keys/input/input0': KERNELS=="input0" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="keys" ATTRS{phys}=="gpio-keys/input0" ATTRS{uniq}=="" ATTRS{properties}=="0" looking at parent device '/devices/keys': KERNELS=="keys" SUBSYSTEMS=="platform" DRIVERS=="gpio-keys" ATTRS{keys}=="116" ATTRS{switches}=="" ATTRS{driver_override}=="(null)" ATTRS{disabled_keys}=="" ATTRS{disabled_switches}=="" --- src/login/70-power-switch.rules | 1 + 1 file changed, 1 insertion(+) diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules index 695d246..7bbe096 100644 --- a/src/login/70-power-switch.rules +++ b/src/login/70-power-switch.rules @@ -11,5 +11,6 @@ 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}=="keys", TAG+="power-switch" LABEL="power_switch_end" -- 1.9.0 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel