What I understood is acpid caputures power events like closing lid and according to defined rules, it triggers a activity like shutdown, sleep etc.

So, can I say that acpid service is not required for running commands like shutdown -h now. It appears like it is, as acpid service itself is running shutdown -h now command inside configuration file.

And also I wonder if acpid is required for servers. What kind of power events can we have for servers?


As a general rule, yes, you do need the daemon running for a proper orderly shutdown. The kernel's ACPI modules just act as an intermediary for the userspace component which is what actually responds to events Note however that on some systems systemd may handle this without requiring acpid at all (though systemd is much less flexible in what it can do in response to ACPI events, so some people do still run acpid on systemd systems).

As far as servers, you largely have the same types of events, and they're not necessarily power related. The events you might see include but are not limited to:

  • Hitting the power button.
  • Closing or opening the lid (on laptops, 2-in-1's, and some tablets that have integrated cases).
  • Docking and undocking (same type of systems as for the lid switch), possibly with a special trigger event similar to the power button that's used to tell the system to get ready to undock (though this is not as common anymore because most things you connect to through a dock are hot pluggable these days).
  • Hot-plug and hot-remove of certain types of devices on some systems.
  • Switching modes on 2-in-1 systems, if it's not handled like a keypress.
  • The sleep button on some systems (usually this is actually a keypress, not an ACPI event).
  • Thermal throttling. In many modern systems (especially servers and laptops), you get an ACPI event if certain system components overheat or get close to overheating.
  • Any number of low-level system internal error conditions, possibly overlapping with other reporting mechanisms (we've got at least one server where I work that triggers an ACPI event whenever it hits a memory error, despite the fact that those are handled by a completely different part of the OS).
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.