| 動作 | XP | Vista | Windows 7 | Linux | ACPI |
|---|---|---|---|---|---|
| Suspend to RAM | 待命 (Standby) | 睡眠 (Sleep) | 暫停、待機 (suspend) | S3 | |
| Suspend to Disk | 休眠 (Hibernate) | S4 | |||
| Suspend to RAM+Disk | - | 睡眠 | 交互式睡眠 (hybrid sleep) | suspend hybrid | S3+S4 |
「待命」或 Windows 7 的「睡眠」是將狀態維持在記憶體 (Suspend to RAM),按電源鍵即時恢復運作,記憶體等必要的硬體仍需要一點電力。
「休眠」是將記憶體狀態存到硬碟 (Suspend to Disk),然後將電源關閉,下次開機就從硬碟回復記憶體、恢復運作。需要一些硬碟空間,且存到硬碟需要時間。
「交互式睡眠」或 Vista 的「睡眠」,其實是「待命」+「休眠」,還有電的時候用「待命」的方式恢復,沒電的時候還有「休眠」的方式恢復。
Lubuntu 14.04 的 Suspend to RAM 可以用,但「休眠」有問題。
Linux
- Hibernate 預設停用,由於 Hibernate 在許多硬體設定運作不正常。
- 需要 swap partition,參考 https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/
- cat /sys/power/state 顯示支援的模式
- 'freeze' (Suspend-to-Idle):永遠支援
- 'standby' (Power-On Suspend)
- 'mem' (Suspend-to-RAM)
- 'disk' (Suspend-to-Disk, hibernation):需要 kernel 設 CONFIG_HIBERNATION
- 參照 Documentation/admin-guide/pm/sleep-states.rst for a description of each of those states.
- /sys/power/disk 顯示和設定 hibernation 建立 hibernation image 後的運作模式。The currently selected option is printed in square brackets.
- platform:採用 platform-provided method,例如 ACPI。
- shutdown (shut the system down)
- reboot (reboot the system)
- suspend:執行 Suspend-to-RAM。
- test_resume (resume-after-hibernation test mode),參照 Documentation/power/basic-pm-debugging.txt。
- /sys/power/image_size 控制 hibernation image 盡可能的最大限制。
- /sys/power/pm_trace
- 參考:https://www.kernel.org/doc/Documentation/power/interface.txt
參考
沒有留言:
張貼留言