##################################### ## GUIDE TO SURVIVE THE ACPID MESS ## ##################################### # Install acpid using apt-get or dnf sudo dnf install acpid # Enable acpid at startup systemctl enable acpid.service # Check if the use of some keys is inhibited by some program systemd-inhibit --list # The following applies if the problem is xfce4-power-manager. # Tell xfce4 not to handle power key xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-power-key -n -t bool -s true # Tell xfce4 not to handle the lid switch xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s true # Tell xfce4 not to handle suspend key xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-suspend-key -n -t bool -s true # Tell xfce4 not to handle hibernate key xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-hibernate-key -n -t bool -s true # Stop and restart the power manager xfce4-power-manager -q xfce4-power-manager # In /etc/systemd/logind.conf change the following to tell systemd not to handle the some keys # Power button HandlePowerKey=ignore # Suspend key HandleSuspendKey=ignore # Hibernate key HandleHibernateKey=ignore # The lid switch HandleLidSwitch=ignore # Now everything should run smoothly, enjoy your acpid. # NB: systemd runs acpid as root. I repeat: AS ROOT, not as SUDO. This means that the acpid scripts will often have to use # su - user # to execute a command from the right username. You will also have to specify stuff like DISPLAY:=0 to instruct X about where to display # what. Enjoy your acpid experience.