Help: systemd will shutdown. systemd-logind: Power key pressed

Started by mahesh, Sep 20, 2023, 05:58 AM

Previous topic - Next topic

mahesh

When I was scrutinizing my previous post about powering down, I found in the auth.log that systemd was running out of control.

https://ubuntuforums.org/showthread.php?t=2470777

     Code:
Jan 20 13:15:23 yo-PRIMERGY systemd-logind[1001]: Power key pressed.
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@Jan 20 13:28:14 yo-PRIMERGY systemd-logind[1025]: New seat seat0.

How to prevent systemd from pressing the power button
I understand that I can enable

HandlePowerKey=poweroff

in

/etc/systemd/logind.conf

to prevent systemd from pressing the power button.




I want to prevent systemd from pressing the power button.
However, I want the power button to work when touched by a human.


What should I do in this case?
Thank you.