Is Your Mac Slow to Wake from Sleep? Try this pmset Workaround

Jan 21, 2013 - 12 Comments

Fixing Slow Wake on a Mac

If your MacBook Pro or MacBook Air feels slow to wake from sleep after it’s been sleeping for a while, there may be a fairly simple cause: standby mode. Standby mode allows a Mac to potentially have up to 30 days of ‘standby’ time, meaning it can sit in a prolonged sleep state for that long before draining the battery. Basically, standby (and sleep) works by dumping everything out of active RAM into a sleep image file on the hard drive, and then when the Mac wakes from sleep that sleep image file is copied back from the hard drive to RAM. You may have guessed this already, but the reason some Macs take a long time to wake from sleep is that process of copying contents of sleepimage back into memory, and typically the more RAM you have in a Mac the slower the process can be. As you can imagine, it can take a while to copy 8GB or 16GB of data anywhere, even when a Mac has a super fast SSD drive it’s reading from.

A workaround of sorts is available for newer MacBook Pro and MacBook Air models, and that is to change the standby delay from the default setting of 70 minutes to a higher setting, preventing standby mode from being used so soon. This could be a reasonable solution for anyone annoyed with slow wake times, like commuters and anyone who drags a MacBook around with them throughout the day for periodic use. A potential downside is slightly reduced battery life, and an accompanying reduction in the potential standby life of the Mac, but for most Mac users who have access to a power adapter at least once a day shouldn’t find this to be an issue.

Read the Default Delay for Standby Mode

First, find out what the default length is by running the pmset command with the -g flag:

pmset -g |grep standbydelay

You will see something like this (4200 seems to be the default for MacBook Air, but your number may be different):

standbydelay 4200

That is the time in seconds before the Mac enters standby. Make a note of what your default setting is because that is what you would use if you were to revert the change.

Set Standby Mode to Wait Longer

You may want to calculate a time that works better for your needs, but for the purposes of this article we’re going to go with 12 hours, because if your Mac has been asleep for 12 hours already the assumption is it’s either nighttime, a weekend, or you’re in a period of longterm travel or storage. Accordingly, 12 hours is 43200 seconds, thus the pmset command would be as follows:

sudo pmset -a standbydelay 43200

Using the sudo command requires admin privileges, so enter the root password and hit return. Changes should then be immediate.

Testing the Difference & Reverting Back to Defaults

Because the default setting is over an hour anyway, you won’t be able to tell the difference until after the default 70 minute period has lapsed, but when you wake the machine up it should now happen much faster because it’s waiting until the full 12 hour period to pass before going into deep sleep standby mode.

If you want to go back to the default setting (4200 seconds in this case), use the following command:

sudo pmset -a standbydelay 4200

This all should work the same on desktop Macs as well, but for most desktops there’s no harm in just leaving the Mac turned on all the time instead, and thereby never going to sleep or having to tweak pmset settings.

This trick was sent in by Barry D. who found it over at Ewal, and though it was primarily aimed at Retina MacBook Pro users, I found it to be just as effective at speeding up long wake times on a MacBook Air (2012) with 8GB of RAM as well. They went with a more aggressive 24 hour (86400 seconds) period before standby activates, but give either a try on your Mac if you feel it’s slow to wake after its been sleeping a while, it should help considerably.

.

Related articles:

Posted by: William Pearson in Command Line, Mac OS, Tips & Tricks, Troubleshooting

12 Comments

» Comments RSS Feed

  1. David MacFarlane says:

    This is to great. My ungrateful wife turned her nose up at an M1 8gb Pro, because it slowed down. It slowed down because she’s never learned how to close a browser tab, use a less resource intensive browser than chrome, bookmark anything, or use the One Tab add-in I set up for her. Now she’s complaining her 24gb Air is slow to wake. If I show her this, maybe she can sudo brick my laptop. Ha!

  2. Mark says:

    Really cool – it worked!!
    No more waiting for up to a minute after opening the lid of my macbook air!

    Thanks!!!

  3. Paul Gamboa says:

    THANK YOU! THANK YOU! THANK YOU!!!! Worked like a charm for me after trying this for a week. Worked like a charm for me and made my 2011 Macbook Pro useable again. I owe you guys big time.

  4. banger says:

    same warning message when I try to revert to default….

    Last login: Mon Jan 28 20:40:50 on console
    localhost:~ kyu-roo$ sudo pmset -a standbydelay 4200
    Password:
    Warning: Idle sleep timings for “AC Power” may not behave as expected.
    – Disk sleep should be non-zero whenever system sleep is non-zero.
    localhost:~ kyu-roo$

  5. banger says:

    I’m pretty sure this is causing damage to my hardrive.. after I lift my lid now…. the drive sounds like it is having a heart attack… it chokes and splutters… loud cranking and grinding noises… I’m sure this is not good…. now I have to figure out how to ‘reverse’ this?…. not happy.

  6. banger says:

    @dexterfm thanks…. I tried your tip now I’m not sure….

    Warning: Idle sleep timings for “AC Power” may not behave as expected.
    – Disk sleep should be non-zero whenever system sleep is non-zero.
    localhost:~ kyu-roo$

  7. dexterfm says:

    @banger: You have to copy this command “sudo pmset -a standbydelay 43200” leaving no trailing spaces at the end of the number, otherwise Terminal will think that is your password. Just enter that line as it is in the parentheses and then enter your pass at prompt.

  8. Kuray says:

    What if i set hibernation mode to 25 [or 1(I don’t see any difference)] and set standby mode to 30 seconds.

    As for as I know in mode 1 and 25 goes to standby mode automatically.

    I want more battery power. Waiting is not important.

  9. Tom says:

    OMG – thank you for this. I was wondering why I could use my MBA on a semi-frequent basis, and things woke up quickly, but if I let it sit for a longer timeframe (okay, not really “long”) it would sit and sit and sit before I could enter my wake password. I set to 24 hours instead of 12 – that schedule will work out best for me, I think.

    YAY!

  10. banger says:

    localhost:~ kyu-roo$ sudo pmset -a standbydelay 43200

    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type “man sudo” for more information.

    To proceed, enter your password, or type Ctrl-C to abort.

    Password:
    Sorry, try again.
    Password:

  11. parakeet says:

    Interesting. I ran into this a while back on a MacBook Pro and my solution was to disable the Hibernate Mode which stops sleepimage from being used, also done with pmset

    sudo pmset -a hibernatemode 0

    And turn it back on with

    sudo pmset -a hibernatemode 1

    YMMV

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site