How to prevent Yosemite going to suspend state when MBPr is on power and display is o

Discussion in 'OS X Yosemite (10.10)' started by striders, Apr 12, 2015.

  1. striders macrumors 6502

    Joined:
    Mar 11, 2009
    #1
    Under System Preferences -> Energy Saver -> Power Adapter, there is an option for

    "Prevent computer from sleeping automatically when the display is off"

    However, such option is NOT available in "Battery". The problem is, when I am using battery on my MBPr (unplugged from power), when the display if automatically turned off, the machine always go to Suspend state. This will "kill" whatever process I am running.

    Is there a way to prevent this from happening? I recall in Maverick this behavior did not happen.
     
  2. striders thread starter macrumors 6502

    Joined:
    Mar 11, 2009
    #2
    Found a link about this: apparently it has to be set form Terminal by using the "sudo pmset" command.

    I tried to set the "Sleep" state to 60 minutes while leaving the display sleep to 5 minutes (from System Preferences), but I got this warning:

    $ sudo pmset -b sleep 60
    Password:
    Warning: Idle sleep timings for "Battery Power" may not behave as expected.
    - Disk sleep should be non-zero whenever system sleep is non-zero.


    I assume "Disk Sleep" here is equal to "Put Hard Disk to sleep when possible" in System Preferences, which is already UNCHECKED prior to running the above pmset command.

    Am I missing something here?
     
  3. randomgeeza macrumors regular

    Joined:
    Aug 12, 2014
    Location:
    United Kingdom
    #3
    Reset your Energy Saving properties in System Prefs to default. Apply the Terminal command and then re-adjust the Energy Saving settings, back to your own liking.

    You can then check the state of the system using pmset -g in Terminal.

    :)
     
  4. striders thread starter macrumors 6502

    Joined:
    Mar 11, 2009
    #4
    I run pmset -g and got this:

    Code:
    Active Profiles:
    Battery Power		-1*
    AC Power		-1
    Currently in use:
     standbydelay         10800
     standby              1
     halfdim              1
     hibernatefile        /var/vm/sleepimage
     darkwakes            0
     disksleep            0
     sleep                60 (sleep prevented by backupd)
     autopoweroffdelay    14400
     hibernatemode        3
     autopoweroff         1
     ttyskeepawake        1
     displaysleep         5
     acwake               0
     lidwake              1
    For "sleep 60", I wonder what it means by "sleep prevented by backupd".

    So far my changes seems to work under battery power: screen goes to sleep, MBPr still on (I can ping, remote connect, etc.)
    2
     
  5. randomgeeza macrumors regular

    Joined:
    Aug 12, 2014
    Location:
    United Kingdom
    #5
    The backupd process is Time Machine. So, it is advising that Time Machine will prevent the unit from sleeping (if running) I presume.

    You might find this interesting also, and it may help you understand the pmset command...

    http://en.wikipedia.org/wiki/Pmset
     
  6. striders thread starter macrumors 6502

    Joined:
    Mar 11, 2009

Share This Page