当较新的笔记本电脑进入睡眠状态时,它们应该将RAM的内容保存到,/var/vm/sleepimage
但也要保持RAM供电。默认情况下,台式机应该只使用普通睡眠模式。
man pmset
:
hibernatemode = 0 (binary 0000) by default on supported desktops. The
system will not back memory up to persistent storage. The system must
wake from the contents of memory; the system will lose context on power
loss. This is, historically, plain old sleep.
hibernatemode = 3 (binary 0011) by default on supported portables. The
system will store a copy of memory to persistent storage (the disk), and
will power memory during sleep. The system will wake from memory, unless
a power loss forces it to restore from disk image.
hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The
system will store a copy of memory to persistent storage (the disk), and
will remove power to memory. The system will restore from disk image. If
you want "hibernation" - slower sleeps, slower wakes, and better battery
life, you should use this setting.
- 0(传统睡眠模式):快速唤醒和睡眠,节省磁盘空间
- 3(默认安全睡眠模式):快速唤醒和睡眠,断电时保持状态
- 25(休眠):节省能源,断电时保持状态
您可以查看Mac使用的模式,pmset -g | grep hibernatemode
并使用进行更改sudo pmset -a hibernatemode $mode
。
某些较新的Mac 在10.8和更高版本上支持待机模式。即使hibernatemode
设置为3,它们也会在一个多小时的睡眠后关闭内存。