Quantcast
Channel: Getting a MBP to hibernate/standby after some specific time spent in sleep even when plugged in - Super User
Viewing all articles
Browse latest Browse all 2

Getting a MBP to hibernate/standby after some specific time spent in sleep even when plugged in

$
0
0

I'm aiming to produce the following behavior on both battery and AC power:

  • Computer goes to sleep as usual upon closing lid or being idle for a few minutes.
  • Computer hibernates if left asleep for 5 minutes.

The reason for wanting it to hibernate is to increase security (and battery life when on battery). (For info on why this increases security see here.) But I don't want it to hibernate immediately, so that when I close the lid and walk to the next room I can wake it up without having to wait for the RAM contents to be loaded from disk.

I have succeeded in reliably producing this behavior when the laptop is on battery power, but when it's on AC power it just never hibernates. I'm doing this with the following settings in pmset:

  • setting hibernatemode to 3
  • setting standby to 1
  • setting standbydelay set to 300 (which is in seconds, so means 5 minutes)

This produces the behavior of the machine storing the sleepimage immediately but leaving the RAM powered; then after 300 seconds standby kicks in and causes the machine to turn off power to the RAM. Except this last part doesn't happen when the AC power is connected. So it seems like something is causing standby to operate differently when on AC power.

These two settings don't appear in the battery pmset profile and do appear in the AC profile:

womp                 0networkoversleep     0

The only other differences are:

gpuswitch            0 (1 when on battery)  disksleep            10 (5 when on battery) 

Here are the full pmset profiles for both:

Battery Power: lidwake              1 autopoweroff         0 autopoweroffdelay    0 standbydelay         300 standby              1 ttyskeepawake        1 hibernatemode        3 darkwakes            0 gpuswitch            1 hibernatefile        /var/vm/sleepimage displaysleep         10 sleep                15 acwake               0 halfdim              1 lessbright           1 disksleep            5 SleepServices        0AC Power: lidwake              1 autopoweroff         0 autopoweroffdelay    0 standbydelay         300 standby              1 ttyskeepawake        1 hibernatemode        3 darkwakes            0 gpuswitch            0 hibernatefile        /var/vm/sleepimage womp                 0 displaysleep         10 networkoversleep     0 sleep                15 acwake               0 halfdim              1 disksleep            10 SleepServices        0

I've tried to use autopoweroff and autopoweroffdelay, since that setting appears to be relevant when the machine is connected to power, but when I do that so far it seems to not cause anything other than normal sleep.

Many thanks!

MacBook Pro (Retina, 15-inch, Early 2013), OS X Yosemite (10.10.1)


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images