Rtc:
The real Time Clock (RTC) unit can was operated by the backup battery while the system power was 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.
The live Clock (RTC) unit can be run through standby power when the system is powered down. The data contains the time, that is, seconds, minutes, hours, dates, days, months, and years. The RTC work 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 knowledge: ACPI and APM.
1. What is ACPI
ACPI is the abbreviation for Advanced Configuration and Power Interface, which is an industrial standard developed by Microsoft, Intel and Toshiba in Chinese, which means "Advanced Configuration and Electrical interface".
ACPI can mainly implement the following functions:
① users can make the computer at a specified time to open, off;
② Plug and Play devices can be controlled and powered by ACPI when plugged in;
③ computer can be put into hibernation when no one is using it, but ensure some communication devices open;
The ④ operating system can allocate energy to its peripherals and motherboard specific requirements;
The ⑤ operating system can reduce the clock frequency when the application does not have high time requirement;
⑥ users who use laptops can designate computers to enter a low-power state at low voltages to ensure that important applications run.
At the same time, ACPI can be divided into six different working states, respectively S0 to S5, they represent the meaning of the difference is:
S0: The computer is working normally, all the hardware equipments are in the state of opening or working normally;
S1: Also known as POS (Power on SUSPEND,CPU stops working), other hardware devices are still working properly;
S2: Shut down the CPU, but the rest of the hardware device is still running;
S3: Often referred to as STR (Suspend to RAM, suspend to memory), the running data will be written to memory to shut down the hard drive;
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/
S4: Also known as STD (Suspend to disk, hangs to hard drive), memory information is written to the hard drive, then all parts stop working;
S5: All hardware devices (including power supplies) are turned off, that is, the shutdown.
2. What is APM
APM is actually an abbreviation for Advanced Power Manager, an administrative model for controlling and managing the power of a computer's hardware through the operating system, but also a computer power management program (software) that differs in its version and functionality, such as APM V1.0 &v1.1, these two versions are directly controlled by the BIOS, and APM V1.2 can first be defined by the operating system and then the BIOS is responsible for performing the power management.
In today's popular operating system, APM is built in, and in the previous DOS era, APM was not actually introduced into the operating system, so it was unable to perform standby, Hibernate, and so on, and the reset key could only be used with ctrl+alt+delete or power.
S1 =>standby. That is, the system is in the low power supply state, in the Windows or BIOS, you can set the screen signal to shut down, the hard drive to stop running into standby state, the power source lights in the blink flashing state. This time, you can wake up the computer by clicking on the keyboard or any mouse.
S2 =>power Standby. and S1 almost the same.
S3 =>suspend to RAM. That is, to keep all of the data in the existing memory in Windows, and then go into the "fake machine." At this point, the rest of the equipment and devices were stopped for electricity, except that the memory needed a power source to keep the data. That is, the theory is that the CPU, PCI, AGP device can be removed and plugged back in, and the computer may normally complete the open and operate, as long as it does not move to the memory and the parts of the source. All that's left is a flashlight. There is nothing like the other and the machine. (The fan of the power supply will also stop running.) After the new one, the computer simply S3 the data integrity of the memory and immediately goes back to the front of your screen.
S4 =>suspend to Disk. That is, the data in Windows memory is intact in the hard disk. When you're at it, you can simply read the memory directly from where it was stored, without having to run a stack of apps. Using this mode, the hard drive must burn a complete continuous space. Windows 98/se must use software to make a large file or a magnetic field to provide win98/se perform S4 this function, WINME/2000/XP itself has made a big file for the S4 function (there is an active hibernation in the power management, this is it). After the activation, in C: You will see a big file with your computer's memory size.
S5 =>shutdown ..... You don't have to say it!
S1/S3 is called standby or standby"in Windows, so there's an option in the BIOS that says standby mode is S1 or S3, so. S1 and S3 cannot exist at the same time. Either S1,S4,S5 or S3,S4,S5.
S1, S2: Standby, can be awakened by the mouse, keyboard, low power saving;
S3: Suspend, is to save all the current running environment in memory, and turn off the hard drive and other devices all stop power, must be in accordance with the device's boot button wake up to load;
S4: Hibernate, after saving all the currently running environments to the hard drive, only the RTC processor is powered up, and the RTC is powered by the BIOS battery, so it is the same as shutting down, when the wake-up time is set or when the Power-on button is reset, from the hard disk to the saved environment into memory, That is, the state before hibernation, to facilitate rapid recovery to the previous work environment.
The Gnu/linux system provides the Rtcwake command for the above 5 modes:
Dormancy:
The computer goes into hibernation mode and wakes up automatically 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 let the system into the S3, sleep 20 seconds and then automatically wake.
sudo rtcwake-v-S 20-m mem
The-m parameter allows you to view the supported modes under the system:
gy@yy:~$ cat/sys/power/state
Standby MEM Disk
Visible is the support of the above three modes. For more on Rtcwake, please gnu/linux man.