[systemd-devel] Suspend from wireless keyboard not working
lennart at poettering.net
Fri Feb 13 01:46:21 PST 2015
On Fri, 13.02.15 00:46, Gustavo De Nardin (spuk) (gustavodn at gmail.com) wrote:
> I'm trying to make my notebook (Lenovo Thinkpad X230) suspend when pressing
> the "sleep" extra key on a wireless keyboard (Logitech K270 using the
> Logitech unifying receiver).
> I've been able to map the "sleep" key to the 'pauseplay' action in a
> '/etc/udev/hwdb.d/70-keyboard.hwdb' file, for testing, and it works (as
> pause/play, of course), but when I map it to 'suspend', nothing happens.
> Pressing the "suspend" key on the notebook's own keyboard works as expected
> ("out of the box", no messing from my part).
> I'm running Arch Linux, systemd-218-1, no desktop environment, just
> WindowMaker. /etc/logind.conf has HandleSuspendKey on default
> I also just learned from /usr/share/doc/systemd/NEWS that since v210 logind
> won't suspend when the notebook has the lid closed and is on a docking
> station, which is my case. But even testing with lid open and out of the
> dock, it won't suspend from the wireless keyboard.
> What else would be needed? Where/what should I look for?
logind only listens to keypresses of keyboards that carry the udev tag
"power-switch". It will ignore all others. By default only the buttons
from ACPI devices and certain special laptop input drivers are marked
I'd like to open this up for all keyboards by default, but I don't
want to do that unless we can get patches into the kernel that allow
us to suppress wakeups for any key events but the ones we really care
David Herrmann has been posting patches about this, but so far that
lead to very little:
As a local fix to make this work for you you can write a udev rule
that adds the "power-switch" tag to your keyboard.
Lennart Poettering, Red Hat
More information about the systemd-devel