Web lists-archives.com

Re: T570 Powerkey doesn't work

Op Sun, 07 Jan 2018 15:11:54 +0100 schreef Floris <jkfloris@xxxxxx>:

Op Thu, 04 Jan 2018 22:42:34 +0100 schreef Markus Grunwald <markus@xxxxxxxxxxx>:


as far as I understand, pressing the power key on my Lenovo T570 should
produce some output in the journal like this:

Mär 31 18:04:47 my_computer systemd-logind[1402]: Power key pressed.

On my laptop, this doesn't work - I see nothing in the journal.
Hibernating doesn't work, neither but that's the reason, I think...

Is there something special that I have to do?


Can you find the Powerkey with evtest?

[NumLock example]

sudo evtest /dev/input/event12
Event: time 1434666536.001123, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70053 Event: time 1434666536.001123, type 1 (EV_KEY), code 69 (KEY_NUMLOCK), value 0
Event: time 1434666536.001123, -------------- EV_SYN ------------

from markus@xxxxxxxxxxx
I see this in /dev/input/event3

Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x1 version 0x0
Input device name: "Power Button"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 116 (KEY_POWER)
Testing ... (interrupt to exit)

But nothing happens when I push the button

Neither does it on any of the other /dev/input/event*


The power button is recognized by the kernel. Does systemd also recognize the button?
$ udevadm info /dev/input/event3
Look for a "E: TAGS=:power-switch:" line
	P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input11/event3
	E: TAGS=:power-switch:
$ loginctl seat-status seat0
	input:input11 "Power Button"
Is the power button inhibit by a DE?
	$ systemd-inhibit
	Who: Debian-gdm (UID 111/Debian-gdm, PID 1535/gsd-media-keys)
	What: handle-power-key:handle-suspend-key:handle-hibernate-key
	Why: GNOME handling keypresses
	Mode: block