Home / Community / Blog

Last two attempts (one and two) to power off using just short press of power button didn't work or work only when when you are logged in.

Now I've just installed ACPI daemon:

dnf install acpid
systemctl enable acpid

This finally works for my home server.

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.

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