Archive for the 'utility' Category

sleep/deep sleep on Mac

17 七月, 2008

一般蓋上 MacBook 的螢幕就能驅動他進入 sleep mode,
白光的指示燈還會緩緩一明一滅,
像是打呼一樣,好不可愛~

可是突然有一天,我的小白每次蓋上螢幕之後再也不會輕輕打呼了… >    <
它會花很長的時間 suspend to disk 進入 deep sleep,
要它醒來也得經過漫長的等待。 (對不起我是急性子)
總之 deep sleep 雖然偶爾有用,
可是每次都來真的很麻煩啊!
而且 MacBook 從 deep sleep 起來之後還會有起床氣。

但拿去 genius bar 竟然說沒辦法修,
他們幫我備份、recover 整個系統之後,只要再把備份資料放回去就又舊事重演。
於是叫我自己回去重灌,不然就要跟我收錢……

可是 project 做到一半,叫我重灌實在很頭痛嘛。
於是花了一點時間找到 hibernate mode 的 document,
輕鬆搞定。

hibernate mode 分五種:

  • 0 (quick): Default sleep behavior on most Apple computers. RAM is still powered on while sleeping. Wake up is fast. Safe sleep is disabled.
  • 1 (deep): Hibernation behavior. System is totally shut down while sleeping. RAM contents are dumped to disk. Wake up is slow.
  • 3 (safe): Default behavior on Powerbook HD and later computers. RAM is still powered on while sleeping. Wake up is fast. Safe sleep is enabled, so RAM contents are also dumped to disk before going to sleep.
  • 5 (deep): Same as mode 1 for systems with encrypted virtual memory.
  • 7 (safe): Same as mode 3 for systems with encrypted virtual memory. 

~$ pmset -g | grep hibernatemode
可以看到系統目前的 hibernate mode,
如果要改變設定的話 (for administrators),執行
~$ sudo pmset -a hibernatemode X
X 替代成上面五種 mode 中任一個。

從此以後我的 MacBook 又會可愛地輕輕打呼啦! (喜極而泣)
早知道就不去 genius bar 浪費我一個下午了。 T____T 

【SouRCe: Deep Sleep widget