under Windows we have the power management system is very familiar with, we can achieve STR, STD and other functions through the motherboard's advanced power management module. For laptop users to use advanced power management, let the laptop sleep, saving battery is even more important. The implementation of these features on the Windows platform may not be difficult for us. But if you switch to Linux, I am afraid that few people know about it. Today we will introduce the implementation of power management under the Linux operating system. Since many servers use Linux, the importance of power management becomes apparent.
In x86 machines, there are two power management methods: APM (Advanced Power Management) and ACPI (Advanced Configuration and Power Interface). APM is the old standard, and ACPI provides a more flexible interface for managing computers and devices. Linux supports both protocols, but sometimes it requires manual configuration. In addition, the two standards cannot be run at the same time. By default, Linux runs ACPI.
APM allows you to put your machine in a Suspend or Standby state and check the battery capacity. ACPI also allows you to power off peripherals (such as monitors, graphics cards, PCI buses) and have more control over energy savings. In order for the power management function to take effect, you need to open it in the BIOS and Linux kernel, and load the necessary application software in Linux.
Checking whether the system supports power management
In the newer core, support for ACPI and APM is included. In general, ACPI is active. Use dmesg to check:
dmesg |
Egrep -i '(apm|
Acpi)'
Kernel command line: vga=274 quiet console=ttyS3,9600acpi=no-idleoot=/dev/hda3
ACPI: Core Subsystem version [20010208]
ACPI: Subsystem enabled
ACPI: System firmware supports: C2
ACPI: plvl2lat=99 plvl3lat=1001
ACPI: C2 enter=1417 C2 exit=354
ACPI: C3 enter=-1 C3 exit=-1
ACPI: Not using ACPI idle
ACPI: System firmware supports: S0 S1 S4 S5
In addition, systems that support ACPI will also add a directory of /proc/sys/acpi. If it exists, it means that the core has loaded the ACPI driver.
Specific application examples
It is recommended to use the latest core (eg 2.4.5). Because the old core support features less, and the core of 2.2.x is to support ACPI, and there are very few features.
1. Advanced Power Management
APM applications include: apmd (APM's background server) and other applications (such as APM). It is recommended to find the latest version for your use at rpmfind.net. After installing and running OK, we can test the APM command.
The simplest use of APM is to display the battery capacity in the machine.
APM
AC on-line, no system battery
If APM is not supported, “No APM support in core” is displayed. At this time, first check if there is /proc/apm. If not, check if you are running the core after installing APM. If you have APM as a module, check if the module is loaded. Apm can also enter the Standby and Suspend states with -S/-s.
Figure 1
Figure 1 is the KDE system interface, which uses APM to check the battery capacity, and can also manage the energy-saving mode of other hardware (Figure 2), and display it in the taskbar. . Further knowledge can be found at www.linuxdoc.org.
2, ACPI
Linux has good support for ACPI, and related documents are more than APM.
ACPI's authoritative website http://phobos.fs.tum.de/acpi/, which includes two content in the download bar: acpid and pmtools, which can better optimize and manage ACPI.
Figure 2
There is a command in Pmtools that is Pmtest, which lets you detect devices. In general, it displays ACPI devices in your system and allows you to "hang" or "standby" them. It must be run as root.
/pmtools/pmtest
VGA (D0)
keyboard (D0)
PCI 0x0 (D0)
system 0x0 ( D0)
It seems that the VGA display, keyboard, PCI bus and system are all recognized as ACPI devices. Their status is D0, which is the active state. We can set the status to D1/D2 (power consumption minimized) or D3 (completely off). For example:
/pmtools/pmtest -d1 VGA
The display should now be black. This does not stop the video card from generating a video signal (the display also indicates an input signal), but simply turns the signal all black. /pmtools/pmtest -d0 VGA can be restored.
Above we just gave a few examples, you can give you a third-hand, manage your system and give full play to advanced voltage management functions.
Many beginners linux childrens shoes application have this experience, when I first contacted Linux,
We use this program and output to analyze the usage and characteristics of waitpid. We set waitpid t
In the adb shell terminal, enter ps, you can view all current process status of the phone, where the
Download NetBeans Take netbeans-7.0beta2-ml-javaee-linux.sh as an example #sh netbeans-7.0beta2-ml-
Linux manual adjustment date time
Configure Network Bonding on CentOS 6 /RHEL 6
How to view the hard disk model and hard disk serial number
How to clear the old Linux kernel
Linux How to prohibit root from using ssh to log in and modify ssh port
The reason why the driver of the single-chip microcomputer should be set to low level is
VMware vCenter Converter Standalone converts Linux troubleshooting
STM32 DAC configuration basic tutorial
Linux+Apache+Mysql+PHP build detailed instructions
Linux paging mechanism started (X86)
Linux system management and maintenance -bzip2/bunzip2 command
Avoiding the real "virtual" VMware super practical skills
What are the common operations of Linux?
The role of the Win8 system Microsoft account
Win10 update is 30% faster than Win7: Do you know these hidden features?
What should I do if the Win10 system file is damaged? Win10 tips for repairing damaged files
Win10 "Mail and Calendar" 17.6118.42001.0 update download
Six must-kill technology to solve the Windows system crash
Tips for locating windows8 favorites