2014年6月6日 星期五

待命、休眠、睡眠

動作XPVistaWindows 7LinuxACPI
Suspend to RAM待命 (Standby)睡眠 (Sleep)暫停、待機 (suspend)S3
Suspend to Disk休眠 (Hibernate)S4
Suspend to RAM+Disk-睡眠交互式睡眠 (hybrid sleep)suspend hybridS3+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

參考

  1. windows 7的睡眠與休眠以及要注意的地方
  2. 關機、待命、休眠與睡眠
  3. [比較]待命、休眠、睡眠 模式的差異
  4. http://chris959.blogspot.tw/2013/05/linux-mac.html 

沒有留言:

張貼留言

SIP header Via

所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...