/********************************************************************* * Author:samson * date:05/19/2014 * Test PL Atform: * Mint 15-3.8.13.13 * GNU bash, version 4.2.45 * *************************************** ****************************/
Rtc:
The Real time Clock (RTC) unit can be operated by the backup battery when the system power is off. The data
Include the time by second, minute, hour, date, day, month, and year. The RTC unit works with an external 32.768 KHz crystal and can perform the alarm function.
A real-time clock (RTC) unit can be executed with a standby power supply when the system is powered off. The data includes the time, that is, the seconds, minutes, hours, dates, days, months, and years.
The RTC operation is driven by an external 32.768kHz crystal. and can perform alarm functions.
to master Standby and hibernate, you must first understand the following two things: ACPI and APM.
1. What is ACPI
ACPI is an abbreviation for Advanced Configuration and Power interface. The Chinese means "Advanced Configuration and Power Interface", an industry standard developed jointly by Microsoft, Intel and Toshiba.
ACPI mainly implements the following functions:
① user can make the computer on and off at a specified time,
② Plug and Play device can be controlled and powered by ACPI when plugged in,
③ can put the computer into hibernation when no one is using the computer, but guarantee some The communication device is turned on. The
④ operating system can allocate energy to peripherals and motherboard-specific requirements. The
⑤ operating system can reduce the clock frequency if the application has low time requirements.
⑥ users using laptops can specify that the computer enters a low-power state at low voltages. To ensure that important applications are executed.
At the same time, ACPI can be divided into six different working states, each S0 to S5, and they represent the following meanings:
S0: The computer is working properly, all the hardware devices are in the open or working state;
S1: Also known as POS (Power on Sus PEND,CPU stops working), other hardware devices still work,
S2: Shuts down the CPU, but the rest of the hardware is still functioning;
S3: usually called STR (Suspend to RAM. Suspend to memory). Shuts down the hard disk when the data in execution is written to memory;
S4: Also known as STD (Suspend to disk. Suspend to hard disk). The memory information is written to the hard disk, and then all parts stop working;
S5: All hardware devices (including power supplies) are turned off, that is, shutdown.
2. What is APM
APM is in fact an acronym for Advanced Power Manager, which is a management mode for controlling and managing computer hardware power through the operating system, in fact a set of computer power management programs (software) with different version numbers and features, such as APM V1.0 &v1.1, these two version numbers are directly run by the BIOS power management, and APM V1.2 is able to first define power management through the operating system. It is then run by the BIOS.
In today's popular operating system, APM is built in, and in the former DOS era. APM is not really introduced into the operating system, so you cannot run standby, hibernate, and so on, restarting can only use the Ctrl+alt+delete key combination or the reset key of the power supply.
S1 =>standby. This means that the system is in a low power supply state, and in the Windows or BIOS, the output of the screen signal is closed, the hard disk stops running into the standby state, and the power light is in blink flashing state. You can wake the computer when you move a mouse, or any key on the keyboard.
S2 =>power Standby. And S1 are almost the same.
S3 =>suspend to RAM. That is, all the information that Windows now has in memory is preserved. And then enter the "Fake machine".
In addition to the memory needs of the source to maintain the information. All other equipment, devices, all stop power. That is to say. In theory, you can take the CPU, PCI, AGP device and plug it back in, and the computer may end up working and running, just not moving to the memory and the source part. It was just a blink of an electric light, and nothing else was like that. (The fan of the power supply also stops.) Once again, the computer is simply confirming the integrity of the memory. That will immediately return to the front of your S3.
S4 =>suspend to Disk. is to put the information in Windows memory intact in the hard disk. You can read the memory directly from the place where you left it, and you don't need to run a bunch of apps.
With this model, the hard drive must totem out a complete continuous space.
Windows 98/se has to use software to make a big file or a magnetic area to provide win98/se S4 functionality. WINME/2000/XP itself has made a big file for the S4 function (there is a startup sleep in the power management, that's it). After the activation. Under C: You'll see a big file with your computer's memory size.
S5 =>shutdown .... It doesn't have to be said.
S1/S3 is called "Standby or standby" "in Windows, so there's an option in the BIOS that says standby mode. is to S1 or S3, so. S1 and S3 are not available at the same time. Either S1,S4,S5 or S3,S4,S5.
S1, S2: Standby, can be awakened by mouse, keyboard. Low power savings.
S3: Hangs. is to save all currently executing environments in memory. All other devices, such as turning off the hard drive, must be loaded by waking up by pressing the device's boot button;
S4: Hibernation, when all the currently executing environments are saved to the hard drive, only the RTC processor is powered, and the RTC is BIOS-based battery powered. So in terms of power saving is the same as shutting down the machine. When you set the wake-up time or press the on button again. Loading the saved environment from the hard drive into memory, which is the state before hibernation, facilitates high-speed recovery to the last working environment.
The Gnu/linux system provides the Rtcwake command for the above 5 modes:
Dormancy:
The computer enters sleep mode. And wake yourself up after 2 hours (7,200 seconds)
sudo rtcwake-m disk-s 7200
Wake up at 10:45 this time
sudo rtcwake-m disk-t ' date-d 10:45 +%s '
will allow the system to enter S3. Sleep for 20 seconds and wake yourself up.
sudo rtcwake-v-S 20-m mem
The after-m parameters can look at the supported modes under the system:
[Email protected]:~$ cat/sys/power/state
Standby MEM Disk
Visible is support for the above three modes.
A lot of other things about Rtcwake please be under the Gnu/linux man.
Ref
Http://wenku.baidu.com/view/016ff0ee81c758f5f61f67ba.html
Http://wenku.baidu.com/view/c8f9c7f57c1cfad6195fa710.html
Power management ACPI, and the corresponding commands under APM, Gnu/linux system are used