Im seeing the following line in my Auth.log file

systemd-logind[761]: Power key pressed.

Can this be triggered any other way(script, error, panic)? I ask because unless my cat has become smart enough to press the power button then I think it's being triggered elsewhere.

Does this only show if the physical power button is pressed, or could it be being triggered elsewhere?

Update-

sudo udevadm trigger -v -n -g power-switch
/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0/event0
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1/event1
share|improve this question
up vote 1 down vote accepted

The message is shown under exactly one condition: one of the devices under /dev/input has sent a KEY_POWER or KEY_POWER2 event, and yes, systemd-logind receives those directly from the kernel without any external "triggers".

Though, this could also include the "Power" buttons on regular keyboards as well as some kinds of remote controls. Use udevadm to find out which devices are being monitored for this kind of event:

$ udevadm trigger -v -n -g power-switch
/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input7/event3
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/LNXVIDEO:00/input/input8/event4
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input5/event1
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input6/event2

$ udevadm trigger -v -n -g power-switch | xargs -i cat {}/../name
Power Button
Video Bus
Lid Switch
Sleep Button

Also: Do not underestimate cats.

share|improve this answer
    
So I was right, something physical has to be pressed or closed. Il run those commands later to see wat exactly it is. Thank you – Sarge888 May 1 '16 at 22:00
    
Well, someone could maybe trick logind by setting up a virtual input device via uinput, but... what's the point? That requires root. – grawity May 2 '16 at 4:53
    
Ya that sounds unlikely lol. But with the command you gave me it shows 2 power buttons and a suspend (presumably the case power switch and motherboard switches) – Sarge888 May 2 '16 at 8:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.