Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

striders

macrumors 6502
Original poster
Mar 11, 2009
406
24
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.
 

striders

macrumors 6502
Original poster
Mar 11, 2009
406
24
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?
 

randomgeeza

macrumors 6502a
Aug 12, 2014
624
460
United Kingdom
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?

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.

:)
 

striders

macrumors 6502
Original poster
Mar 11, 2009
406
24
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.

:)

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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.