Advanced Application of Linux acpi Power Management

Source: Internet
Author: User
Tags apm dmesg

There are two Power Management methods in x86 machines: APM (Advanced Power Management, Advanced Power Management) and ACPI (Advanced Configuration and Power Interface, Advanced Configuration and Power Interface ). APM is the old standard, while ACPI provides more flexible interfaces for managing computers and devices. Linux supports these two protocols, but sometimes manual configuration is required. In addition, the two standards cannot run simultaneously. By default, Linux runs ACPI.

APM allows you to put the machine in the Suspend or Standby status and check the battery capacity. ACPI also allows you to independently power off peripherals (such as display, video card, and PCI Bus), giving you more control over power saving. To make the power management function take effect, you need to enable it in the BIOS and Linux core, and load the necessary application software in Linux.

Linux acpi power management check system supports Power Management

Linux acpi power management includes ACPI and APM support in the new core. Generally, ACPI is activated. Use dmesg to check whether:
 

 
 
  1. dmesg |egrep -i ''(apm|acpi)''  
  2. Kernel command line: vga=274 quiet console=ttyS3,9600acpi=no-idleoot=/dev/hda3  
  3. ACPI: Core Subsystem version [20010208]  
  4. ACPI: Subsystem enabled  
  5. ACPI: System firmware supports: C2  
  6. ACPI: plvl2lat=99 plvl3lat=1001 
  7. ACPI: C2 enter=1417 C2 exit=354 
  8. ACPI: C3 enter=-1 C3 exit=-1  
  9. ACPI: Not using ACPI idle  
  10. ACPI: System firmware supports: S0 S1 S4 S5  

In addition, the/proc/sys/ACPI directory will be added to systems that support acpi. If it exists, it indicates that the core has loaded the ACPI driver.
Specific Application Instance
We recommend that you use the latest core (for example, 2.4.5 or above ). Because the old core supports less features, while 2.2.x supports ACPI at the core, there are only a few features.

1. Advanced Power Management
APM applications include apmd and other applications (such as APM ). We recommend that you go to rpmfind.net to find the latest version suitable for your use. After installing and running OK, we can test the APM command.
The simplest use of APM is to display the battery capacity on the machine.
APM
AC on-line, no system battery
If APM is not supported, "No APM support in core" is displayed ". Check whether/proc/apm exists. If not, check whether the core after APM installation is running. If you use APM as a module, check whether the module is loaded. Apm can also use-S/-s to enter the Standby and Suspend statuses.

2. ACPI
Linux provides better support for ACPI and more related documents than APM.
ACPI's authoritative website is.
The Pmtools command is Pmtest, which allows you to detect devices. Generally, it displays ACPI devices in your system and allows you to handle them with "suspension" or "backup. It must run with root.
 

 
 
  1. /pmtools/pmtest  
  2. VGA (D0)  
  3. keyboard (D0)  
  4. PCI 0×0 (D0)  
  5. system 0×0 (D0)  

It seems that VGA monitors, keyboards, PCI buses, and systems are all recognized as ACPI devices. Their statuses are D0, which is the active state. We can set the status to D1/D2 (minimizing power consumption) or D3 (completely off ). For example:
/Pmtools/pmtest-d1 VGA
The display should be black now. This does not cause the video card to stop generating a video signal (the display also indicates an input signal), but only converts all the signals to black. /Pmtools/pmtest-d0 VGA can be restored.

Linux acpi power management is just a few examples above. You can give full play to advanced voltage management functions to achieve the purpose of saving energy and saving power.


 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.