Home / Community / Blog / CentOS - Power Button Behaviour - headless version

CentOS - Power Button Behaviour - headless version

My last resolution about power button works only when monitor is connected.

If you have headless server you can use systemd-logind service. By default (in CentOS 8) it do nothing. I've only found:

systemd-logind[1373]: Power key pressed

in /var/log/messages.

To change this behaviour you can modify

/etc/systemd/logind.conf

I've uncommented line

#HandlePowerKey=poweroff

After thins restart service:

systemctl restart systemd-logind

Now power key works on headless Linux server.

Comments

Log in or create a user account to comment.

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31