Linux "acpid" Command Line Options and Examples
Advanced Configuration and Power Interface event daemon
acpid is designed to notify user-space programs of ACPI events. acpid should be started during the system boot, and will run as a background process, by default. It will open an events file (/proc/acpi/event by default) and attempt to read whole lines which rep‐ resent ACPI events.
Command Line Options:
This option changes the directory in which acpid looks for rule configuration files. Default is /etc/acpi/events.
acpid -c ...
This option changes the maximum number of non-root socket connections which can be made to the acpid socket. Default is256.
acpid -C ...
and will log to stderr, in addition to the regular syslog.
acpid -d ...
This option changes the event file from which acpid reads events. Default is /proc/acpi/event.
acpid -e ...
This option forces acpid to use the Linux kernel input layer and netlink interface for ACPI events.
acpid -n ...
This option keeps acpid in the foreground by not forking at startup.
acpid -f ...
This option tells acpid to log information about all events and actions.
acpid -l ...
This option changes the lock file used to stop event processing. Default is /var/lock/acpid.
acpid -L ...
This option changes the group ownership of the UNIX domain socket to which acpid publishes events.
acpid -g ...
This option changes the permissions of the UNIX domain socket to which acpid publishes events. Default is 0666.
acpid -m ...
This option changes the name of the UNIX domain socket which acpid opens. Default is /var/run/acpid.socket.
acpid -s ...
This option tells acpid not to open a UNIX domain socket. This overrides the -s option, and negates all other socketoptions.
acpid -S ...
This option tells acpid to use the specified file as its pidfile. If the file exists, it will be removed and over-writ‐ten. Default is /var/run/acpid.pid.
acpid -p ...
This option defines the pseudo-action which tells acpid to abort all processing of an event, including client notifica‐tions. Default is <drop>.
acpid -r ...
This option enables special handling of the mute button for certain ThinkPad models with mute LEDs that get out of syncwith the mute state when the mute button is held down. With this option, the mute button will generate the followingevents in sync with the number of presses (and, by extension, the state of the LED):button/mute MUTE (key pressed) Kbutton/mute MUTE (key released) K
acpid -t ...
Print version information and exit.
acpid -v ...
EXAMPLEThis example will shut down your system if you press the power button.Create a file named /etc/acpi/events/power that contains the following:event=button/poweraction=/etc/acpi/power.sh "%e"Then create a file named /etc/acpi/power.sh that contains the following:/sbin/shutdown -h now "Power button pressed"Now, when acpid is running, a press of the power button will cause the rule in /etc/acpi/events/power to trigger the script in/etc/acpi/power.sh. The script will then shut down the system.TROUBLESHOOTINGacpid is a simple program that runs scripts in response to ACPI events from the kernel. When there's trouble, the problem is rarelywith acpid itself. The following are some suggestions for finding the most common sources of ACPI-related problems.When troubleshooting acpid, it is important to be aware that other parts of a system might be handling ACPI events. systemd(1) iscapable of handling the power switch and various other events that are commonly handled by acpid. See the description of HandlePow‐erKey in logind.conf(5) for more. Some window managers also take over acpid's normal handling of the power button and other events.kacpimon(8) can be used to verify that the expected ACPI events are coming in. See the man page for kacpimon(8) for the proper pro‐cedure. If the events aren't coming in, you've probably got a kernel driver issue.If the expected events are coming in, then you'll need to check and see if your window manager is responsible for handling theseevents. Some are, some aren't. (E.g. in Ubuntu 14.04 (Unity/GNOME), there are settings for the laptop lid in the System Settings >Power > "When the lid is closed" fields.) If your window manager is responsible for handling the problematic event, and you've gotit configured properly, then you may have a window manager issue.Lastly, take a look in /etc/acpi/events (see above). Is there a configuration file in there for the event in question (e.g./etc/acpi/events/lidbtn for laptop lid open/close events)? Is it properly connected to a script (e.g. /etc/acpi/lid.sh)? Is thatscript working? It's not unusual for an acpid script to check and see if there is a window manager running, then do nothing if thereis. This means it is up to the window manager to handle this event.DEPENDENCIESacpid should work on any linux kernel released since 2003.FILES/proc/acpi/event/dev/input/event*/etc/acpi//var/run/acpid.socket/var/run/acpid.pid/var/lock/acpidBUGSThere are no known bugs. To file bug reports, see PROJECT WEBSITE below.
acpid -h ...