1. When to use it
Useful on laptops, mini PCs, and physical hosts where you want predictable ACPI behavior.
acpid | events | power button | logs | rc.acpid
2. Base setup
chmod +x /etc/rc.d/rc.acpid
printf 'event=button/power.*\naction=/etc/acpi/acpi_handler.sh power\n' > /etc/acpi/events/powerbtn
/etc/rc.d/rc.acpid start
Adjust host names, IPs, interfaces, paths, and versions to the real system before making the change persistent.
3. Quick verification
ps aux | grep '[a]cpid'
acpi -V
tail -n 20 /var/log/messages
Confirm that the output matches the expected state before considering the intervention complete.
4. Operational notes
Test events on real hardware: many VMs do not expose the same ACPI flow as physical machines.
Quick checklist
[ ] Steps completed\n[ ] Config updated\n[ ] Tests executed\n[ ] Rollback ready\n[ ] Logs checked