The acpid daemon supports the Advanced Configuration and Power Interface (ACPI) to allow intelligent power management on your system and to query battery and configuration status. It listens on a file (/proc/acpi/event) and when an event occurs, executes programs to handle the event. Rules are defined by simple configuration files. acpid will look in a configuration directory (/etc/acpi/events by default), and parse all files that do not begin with a period (‘.’). Each file must define two things: an event and also a corresponding action.
This service is provided by acpid RPM package.
# yum install acpid
Service Control
To control the acpid service after the next system boot, use the chkconfig utility:
# chkconfig acpid on
# chkconfig --list acpid acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
To control the acpid service immediately, use the service utility:
# service acpid Usage: /etc/init.d/acpid {start|stop|status|restart|condrestart|reload}
Start the service as follows:
# service acpid start Starting acpi daemon: [ OK ]
Stop the service as follows:
# service acpid stop Stopping acpi daemon: [ OK ]
Check if the serivce is started or stopped:
# service acpid status acpid is stopped
If the service is started, then restart it, otherwise do nothing.
# service acpid condrestart Stopping acpi daemon: [ OK ] Starting acpi daemon: [ OK ]
Determine which system run levels the service is active:
# chkconfig --list acpid acpid 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Configuration
The acpid daemon listens on a file (/proc/acpi/event) and when an event occurs, executes programs to handle the event. Rules are defined by simple configuration files. acpid will look in a configuration directory (/etc/acpi/events by default), and parse all files that do not begin with a period (‘.’). Each file must define two things: an event and also an corresponding action.
# ll /etc/acpi/events total 8 -rw-r--r-- 1 root root 168 Nov 12 2015 power.conf -rw-r--r-- 1 root root 236 Nov 12 2015 video.conf
# cat /etc/acpi/events/power.conf # ACPID config to power down machine if powerbutton is pressed, but only if # no gnome-power-manager is running event=button/power.* action=/etc/acpi/actions/power.sh
# cat /etc/acpi/events/video.conf # Configuration to turn on DPMS again on video activity, needed for some # laptops. Disabled by default, uncomment if your laptop display stays blank # after you close and open the lid. #event=video.* #action=/usr/sbin/vbetool dpms on