acpid_survival_guide 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #####################################
  2. ## GUIDE TO SURVIVE THE ACPID MESS ##
  3. #####################################
  4. # Install acpid using apt-get or dnf
  5. sudo dnf install acpid
  6. # Enable acpid at startup
  7. systemctl enable acpid.service
  8. # Check if the use of some keys is inhibited by some program
  9. systemd-inhibit --list
  10. # The following applies if the problem is xfce4-power-manager.
  11. # Tell xfce4 not to handle power key
  12. xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-power-key -n -t bool -s true
  13. # Tell xfce4 not to handle the lid switch
  14. xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s true
  15. # Tell xfce4 not to handle suspend key
  16. xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-suspend-key -n -t bool -s true
  17. # Tell xfce4 not to handle hibernate key
  18. xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-hibernate-key -n -t bool -s true
  19. # Stop and restart the power manager
  20. xfce4-power-manager -q
  21. xfce4-power-manager
  22. # In /etc/systemd/logind.conf change the following to tell systemd not to handle the some keys
  23. # Power button
  24. HandlePowerKey=ignore
  25. # Suspend key
  26. HandleSuspendKey=ignore
  27. # Hibernate key
  28. HandleHibernateKey=ignore
  29. # The lid switch
  30. HandleLidSwitch=ignore
  31. # Now everything should run smoothly, enjoy your acpid.
  32. # NB: systemd runs acpid as root. I repeat: AS ROOT, not as SUDO. This means that the acpid scripts will often have to use
  33. # su - user
  34. # 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
  35. # what. Enjoy your acpid experience.