Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Shell Scripting
  • Kali Linux
  • Ubuntu
  • Red Hat
  • CentOS
  • Docker in Linux
  • Kubernetes in Linux
  • Linux interview question
  • Python
  • R
  • Java
  • C
  • C++
  • JavaScript
  • DSA
Open In App
Next Article:
addr2line command in Linux with Examples
Next article icon

acpid command in Linux with Examples

Last Updated : 17 Sep, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The acpid daemon provides intelligent power management on a system and allows to query battery and configuration status by supporting the Advanced Configuration and Power Interface (ACPI). The ACPI events are notified to the user-space programs by acpid. 
The ACPI (Advanced Configuration and Power Interface) specification allows the operating system to control the amount of power it provides to each device or peripheral attached to the system. This makes the operating system to turn off specific devices when they are no longer in use such as the monitor, providing stable and efficient power management. 
acpid being a daemon runs as a background process by default and it should start during the system boot. Whenever an event occurs it executes programs to handle the event. It does so as it opens an events file (/proc/acpi/event by default) and reads all the lines. When a line is received (an event), it examines a list of rules to execute the one that matches the event. If there is a lock file (/var/lock/acpid by default) it ignores all incoming ACPI events. 
Simple configuration files are used to define the rules. It looks in a configuration directory (/etc/acpi/events by default) and all the files that do not begin with a period (‘.’) or end with a tilde (~) are parsed. Each file must define an event and a corresponding action. Blank lines or lines with the first character as hash ('#') are ignored. 

There are three tokens in each line: the key, a literal equal sign and the value. 

 

  • The key can take up to 63 characters, is case-insensitive but whitespaces matters.
  • The value can take up to 511 characters, it is case and whitespace sensitive. The event value consists of a regular expression and events are matched against it.



Installation Command: 

 

sudo apt-get install acpid



Synopsis: 
 

acpid [options]



Options: 
 

  • c, --confdir directory 
    Changes the directory that acpid looks for rule configuration files. The default directory is /etc/acpi/events.
  • C, --clientmax number 
    Changes the maximum number of non-root socket connections that can be made to the acpid socket. The default is 256.
  • d, --debug 
    Increases the acpid debug level by one. It runs in the foreground if the debug level is non-zero and logs to stderr and to the regular syslog.
  • e, --eventfile filename 
    Changes the event file. Acpid reads events from it. The default file is /proc/acpi/event.
  • f, --foreground 
    Keeps acpid in the foreground by not forking at startup.
  • l, --logevents 
    Tells acpid to log information related to all the events and actions.
  • L, --lockfile filename 
    Changes the lock file that is used to stop event processing. The default file is /var/lock/acpid.
  • g, --socketgroup groupname 
    Changes the group ownership of domain socket. Acpid publishes events to it.
  • m, --socketmode mode 
    Changes the permissions of the UNIX domain socket. Default is 0666.
  • s, --socketfile filename 
    Changes the name of the UNIX domain socket that is opened by acpid. The default is /var/run/acpid.socket.
  • S, --nosocket filename 
    Tells acpid to not open a UNIX domain socket. This overrides the -s option, it also negates all other socket options.
  • p, --pidfile filename 
    Tells acpid to use the specified file as its pidfile. If the file exists, it will be removed and over-written. The default is /var/run/acpid.pid.
  • v, --version 
    Prints the version information and exits. 

     
version
  • h, --help 
    Shows help and exits. 

     
help




Service Control 
 

  • Use the service utility for controlling the acpid service: 
     
service acpid

  •  
service
  • To Start the service: 
     
service acpid start
  • You will be prompted for authentication.
  • To Stop the service: 
     
service acpid stop

  •  
stop service
  • You will be prompted for authentication.
  • Check if the service is started or stopped: 
     
service acpid status

  •  
status

Next Article
addr2line command in Linux with Examples

S

soumya08
Improve
Article Tags :
  • Linux-Unix
  • linux-command
  • Linux-misc-commands

Similar Reads

    Linux Commands
    Linux commands are essential for controlling and managing the system through the terminal. This terminal is similar to the command prompt in Windows. It’s important to note that Linux/Unix commands are case-sensitive. These commands are used for tasks like file handling, process management, user adm
    15+ min read
    access command in linux with examples
    The 'access' command in Linux is a system call used to determine whether the calling process has access to a specified file or directory. This function is useful for checking file permissions, including whether a file exists, and if it can be read, written, or executed by the process. The check is p
    5 min read
    accton command in Linux with Examples
    'accton' is one of important Linux/Unix command which is used by the administrator to monitor user activities. It is used to turn on or turn off the process for accounting or change the info process accounting file. When the command is run in the terminal without any argument, it stops the process a
    2 min read
    aclocal command in Linux with Examples
    aclocal command in Linux is used to automatically generate 'aclocal.m4' files from configure.in file. automake in Linux contain a lot of autoconf macros that can be used in the different packages. These macros must be defined in the aclocal.m4. If not, then it can’t be accessed by the autoconf.The a
    3 min read
    ACPI command in Linux with examples
    ACPI is the command in Linux that helps the users in managing power settings. It also helps in monitoring the hardware status efficiently. It facilitates with providing essential information such as battery health, CPU temperatures, and fan speeds, providing support in system maintenance and perform
    4 min read
    acpi_available command in Linux with examples
    acpi_available is a command in Linux that tests whether the ACPI (Advanced Configuration and Power Interface) subsystem is available or not. Syntax$ acpi_availableReturn Statuses of acpi_availableThe command returns one of three possible statuses:Status 0: Indicates that the ACPI subsystem is availa
    2 min read
    acpid command in Linux with Examples
    The acpid daemon provides intelligent power management on a system and allows to query battery and configuration status by supporting the Advanced Configuration and Power Interface (ACPI). The ACPI events are notified to the user-space programs by acpid. The ACPI (Advanced Configuration and Power In
    3 min read
    addr2line command in Linux with Examples
    'addr2line' command in Linux is used to convert addresses into file names and line numbers. When the executable files/object files are run with the 'objdump' command, the file is de-assembled and the machine code is displayed. These machine instructions for the executable are displayed along with th
    4 min read
    agetty command in Linux with Examples
    agetty is a Linux version of getty. getty short for "get tty" is a Unix program running on a host computer that manages physical or virtual terminals to allow multi-user access. Linux provides a virtual terminal(tty) which is similar to the regular Linux terminal. agetty command opens a virtual term
    4 min read
    How to Create and Use Alias Command in Linux
    Imagine you're lost in a maze of complicated Linux commands. You stumble upon a secret doorway marked "Alias," and inside you find shortcuts to all your favorite commands! That's what creating aliases is like. You get to make your own mini-commands for the long ones you use all the time, making thin
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences