OS X Change hibernatemode with pmset for Instant Wake from Sleep

• Updated November 23, 2018

The default hibernatemode on Apple laptops is 3 which does the following:

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.

Even with the APPLE SM256C SSD in the MacBook Air (13-inch Late 2010), there is mouse and keyboard lag on wake from sleep.

If your laptop is charged regularly, and you are not worried about it running out of power while sleeping off the charger, there is no reason to keep a copy of memory on the disk. So, to have instant wake from sleep change hibernatemode to 0, which does the following:

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.

Change hibernatemode to 0

To see what hibernatemode is currently set to, run the following command:

pmset -g | grep hibernatemode

To change hibernatemode for instant wake from sleep, run the following command:

pmset hibernatemode 0

This change will be persistent across reboots.

Remove /var/vm/sleepimage

hibernatefile is the pmset parameter that specifies where memory contents are written to disk. By default, the RAM contents are written to /var/vm/sleepimage, and to verify this, run the following command:

pmset -g | grep hibernatefile

With the change to hibernatemode 0, the RAM contents will no longer be written to disk and this file can be removed to reclaim as much disk space as you have memory. More specifically, if you have 4 GB of memory, you will reclaim 4 GB of disk space when you remove /var/vm/sleepimage with the following command:

sudo rm -f /var/vm/sleepimage

If you found this post useful and would like to help support this site - and get something for yourself - sign up for any of the services listed below through the provided affiliate links. I will receive a referral payment from any of the services you sign-up for.

Get faster shipping and more with Amazon Prime: About to order something from Amazon but want to get more value out of the money you would normally pay for shipping? Sign-up for a free 30-day trial of Amazon Prime to get free two-day shipping, access to thousands of movies and TV shows, and more.

Thanks for reading and take care.