macos 進(jìn)入深度睡眠

查看當(dāng)前配置 pmset

~ ? pmset -g                                                           hans@zzz
System-wide power settings:
Currently in use:
 standby              1
 Sleep On Power Button 1
 womp                 1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 powernap             0
 gpuswitch            2
 autorestart          0
 networkoversleep     0
 disksleep            10
 sleep                0 (sleep prevented by useractivityd, AddressBookSourceSync, configd)
 autopoweroffdelay    28800
 hibernatemode        0
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         60
 tcpkeepalive         1
 standbydelay         10800

當(dāng)前默認(rèn)配置 hibernatemode 0

我們需要配置成 25 存儲(chǔ)到磁盤上,并且清空內(nèi)存,就是開機(jī)慢。

要速度快 請(qǐng)?jiān)O(shè)置成 3

下面是官文的說明

  • 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 mem-ory memory
    ory 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 mem-ory memory
    ory 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.

設(shè)置磁盤存儲(chǔ)的深度睡眠 pmset -a

sudo pmset -a hibernatemode 25

參考文

  • pmset

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/pmset.1.html

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容