• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Linux OS Service ‘acpid’

by admin

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

Filed Under: Linux, Linux Services

Some more articles you might also be interested in …

  1. husky Command Examples
  2. cryptcat Command Examples in Linux
  3. grub2-mkpasswd-pbkdf2: command not found
  4. Understanding Mac file timestamps
  5. How to make alias command work in bash script or bashrc file
  6. consul: Distributed key-value store with health checking and service discovery
  7. CentOS / RHEL : How to determine which SNMP version is being used
  8. env Command Examples in Linux
  9. sar: command not found
  10. arp: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright