让Mac启用休眠模式

在windows下除关机外还支持待机和休眠两种“关机”模式。考虑到有人可能并不了解待机和休眠的区别,这里简单的介绍下。

  • 待机
    计算机在待机状态时,内存中的信息未存入硬盘中,计算机可以被迅速唤醒。如果断电,内存数据将丢失无法常唤醒。
  • 休眠
    计算机在关闭前首先将内存中的信息存入硬盘,唤醒时将硬盘上的数据重写回内存。休眠状态下的唤醒速度比待机慢,好处是休眠后可以断电。

在Mac中就只有睡眠一种待机模式了。默认情况下Mac的睡眠相当于windows的待机模式。虽然Mac mini的待机功耗非常低,不过长期待机浪费的电加起来也不少,对产品寿命也会有些影响。实际上Mac已经提供了对休眠功能的支持,稍微做些设置即可将睡眠的默认行为由“待机”改为“休眠”。

Mac的睡眠方式说明:

  • 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
  • 注: 我使用5的时候无法正常唤醒,因此不建议使用5&7

查看当前的睡眠模式: pmset -g | grep hibernatemode
修改睡眠模式: sudo pmset -a hibernatemode X

Comments are closed.