How to Stop OSX 10.9 Mavericks From Sleeping When Display Turns Off

Posted (Updated ) in Uncategorized

It seems OSX 10.9 comes with a “feature” (previously off by default) whereby after 2 minutes on battery (the default display off time) the machine goes to sleep. This of course kills the wi-fi resulting in constant dropping of SSH connections, reconnection to IM clients (spamming friends) and a host of other internet related issues. It was badly thought out, badly implemented and just an all around bad choice.

In previous iterations of OSX there were two sliders; one for how long before putting the computer to sleep and the other for putting the display to sleep. Here’s a screenshot of the Energy Saver options in 10.9. Noticed the two have been unhelpfully merged:

Energy Saver Preferences in OS-X 10.9


Fixing this behavior is thankfully very simple and requires only a single terminal command:

sudo pmset -a sleep 0

Here are my power management settings after the change:

$ pmset -g
Active Profiles:
Battery Power		-1*
AC Power		-1
Currently in use:
 standbydelay         10800
 standby              1
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 darkwakes            0
 gpuswitch            2
 disksleep            10
 sleep                0
 autopoweroffdelay    14400
 hibernatemode        3
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         2
 acwake               0
 lidwake              1

And with that you should be back to having a properly functioning laptop. If you ever need to revert the change for whatever reason, use:

sudo pmset -a sleep 1
  • Greg

    Thanks for this post. I have a similar issue with my 2009 Mac Pro that I thought you might help with. I recently updated to 10.9. The Energy Saver preferences appear as they did previously, with the two sliders. But even when I set these to “Never” the computer seems to go to sleep when my monitor (Asus VS247) does. The monitor seems to have a built in sleep function which I’m trying to see if I can disable, but if there is a way to stop Mavericks from doing this it would be even better. I often upload large files to Amazon S3 as part of my work, so I need to be able to leave the computer uploading.

  • Fannypack

    Thank you for documenting this! Your website is at the bottom of Google’s list of results yet has the most useful information.

  • Bob

    So when I try to do

    sudo pmset -a sleep 1
    I get
    Warning: Idle sleep timings for “Battery Power” may not behave as expected.
    – Display sleep should have a lower timeout than system sleep.
    Warning: Idle sleep timings for “AC Power” may not behave as expected.
    – Display sleep should have a lower timeout than system sleep.

    Perhaps something is not as intended.

    • bratsos

      same here
      revert cmd not work

    • Mario

      This happens when the option “Put Hardisk to sleep when possible” is unticked in Energy Saver pane (System Preferences). You should keep it on (ticked).

  • Jeremiah

    My terminal window says something I want to disable. Any way?

    System-wide power settings:

    SleepDisabled 1 < How to fix? Disable?

    DestroyFVKeyOnStandby 0

    Active Profiles:

    Battery Power -1

    AC Power -1*

    Currently in use:

    womp 1

    halfdim 1

    sms 1

    hibernatefile /var/vm/sleepimage

    networkoversleep 0

    disksleep 10

    sleep 30

    hibernatemode 3

    ttyskeepawake 1

    displaysleep 10

    acwake 0

    lidwake 1

  • I have this problem on 10.9.3 mavericks only in battery power mode. closing lid did not sleep my mac on AC power, but it did on battery power. However this hack did not solve the problem on battery power.

  • anaussieinlondon

    Thanks. Worked brilliantly

  • Dirk

    Hey man, thank you so much!

    This solved a 2 weeks odyssey and a family conflict to give away the mac or not just because of a really creepy but necessary windows software (in Desktop Parallels) 🙂

    Thanks & Regards from Germany