Introduction to acpid
The acpid (Advanced Configuration
and Power Interface event daemon) is a completely flexible, totally
extensible daemon for delivering ACPI events. It listens on netlink
interface and when an event occurs, executes programs to handle the
event. The programs it executes are configured through a set of
configuration files, which can be dropped into place by packages or
by the user.
This package is known to build and work properly using an LFS-8.0
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/acpid
Installation of acpid
Install acpid by running the
./configure --prefix=/usr \
This package does not come with a test suite.
Now, as the
make install &&
install -v -m755 -d /etc/acpi/events &&
cp -r samples /usr/share/doc/acpid-2.0.28
acpid is configured by user
defined events. Place event files under
/etc/acpi/events directory. If an event occurs,
through the event files in order to see if the regex defined after
"event" matches. If they do, action is executed.
The following brief example will suspend the system when the laptop
lid is closed (it requires pm-utils-1.4.1):
cat > /etc/acpi/events/lid << "EOF"
cat > /etc/acpi/lid.sh << "EOF"
/bin/grep -q open /proc/acpi/button/lid/LID/state && exit 0
chmod +x /etc/acpi/lid.sh
Unfortunately, not every computer labels ACPI events in the same
way. To determine how your buttons are recognized, use the
Also, look in package documentation's samples directory for more
To automatically start acpid when the system is
rebooted, install the
/etc/rc.d/init.d/acpid boot script from the
acpid, acpi_listen, and kacpimon
is a program that listens for ACPI events and executes
the rules that match the received event.
is a simple tool which connects to acpid and listens for
is a monitor program that connects to three sources of
ACPI events (events file, netlink and input layer) and
then reports on what it sees while it is connected.
Last updated on 2017-02-15 01:25:58 -0600