I have recently switched to Mac from Windows hence I do not have much information.

  1. I want my Mac to go to safe sleep state on closing the lid.
  2. I also need an extra option available somewhere which can be used to move to hibernate mode (no battery used at all).

I read safe sleep is default on closing lid and minimal battery is used at that time, but my Mac drains full battery in less than 2 days, which does not seem like "safe sleep".

I researched about it but every answer/blog mentions having only 1 option at one time, either hibernate or sleep. Also, some mention using mode 25 for hibernate and some mention using mode 1 for hibernate. I tried Mode 25, but it does not seem to be working (does it take time to fully implement?), and mode 1 seems to have risk involved. I do not want to risk losing data.

How can I achieve the desired behavior and also test wether it is working or not?

Currently in use:  
 standbydelay         4200  
 standby              0  
 womp                 1  
 halfdim              1  
 hibernatefile        /var/vm/sleepimage  
 sms                  1  
 networkoversleep     0  
 disksleep            10  
 sleep                0  
 autopoweroffdelay    14400  
 hibernatemode        3  
 autopoweroff         1  
 ttyskeepawake        1  
 displaysleep         0  
 acwake               0  
 lidwake              1  

Software OS X 10.9.2 (13C64)
13-inch, Mid 2012

  • 1
    which model of Mac Book Pro do you have? If you go to the apple menu > About This Mac > More Info... it should say there. – dwightk Apr 6 '14 at 16:07
  • 1
    I use OS X 10.9.2 (13C64) – anuja Apr 6 '14 at 16:09
  • 2
    It will say something like: "Mac Book Pro Retina, 15-inch, Early 2013" – dwightk Apr 6 '14 at 16:10
  • 1
    it is 13-inch, Mid 2012 – anuja Apr 6 '14 at 16:11
  • How did you get the output above? – NobleUplift Apr 28 '15 at 17:38

The default sleep mode used by Mac laptops is a hybrid between traditional sleep mode (suspend to RAM) and hibernation (suspend to disk): the contents of the RAM are saved to the disk, but the RAM is kept powered as well. Desktop Macs use traditional sleep mode (suspend to RAM) by default.

See man pmset:

SAFE SLEEP ARGUMENTS
     hibernatemode takes a bitfield argument defining SafeSleep behavior.
     Passing 0 disables SafeSleep altogether, forcing the computer into a reg-
     ular sleep.

     0000 0001 (bit 0) enables hibernation; causes OS X to write memory state
     to hibernation image at sleep time. On wake (without bit 1 set) OS X will
     resume from the hibernation image. Bit 0 set (without bit 1 set) causes
     OS X to write memory state and immediately hibernate at sleep time.

     0000 0010 (bit 1), in conjunction with bit 0, causes OS X to maintain
     system state in memory and leave system power on until battery level
     drops below a near empty threshold (This enables quicker wakeup from mem-
     ory while battery power is available). Upon nearly emptying the battery,
     OS X shuts off all system power and hibernates; on wake the system will
     resume from hibernation image, not from memory.

     0000 1000 (bit 3) encourages the dynamic pager to page out inactive pages
     prior to hibernation, for a smaller memory footprint.

     0001 0000 (bit 4) encourages the dynamic pager to page out more aggres-
     sively prior to hibernation, for a smaller memory footprint.
     hibernatemode = 0 (binary 0000) by default on supported desktops. The
     system will not back memory up to persistent storage. The system must
     wake from the contents of memory; the system will lose context on power
     loss. This is, historically, plain old sleep.

     hibernatemode = 3 (binary 0011) by default on supported portables. The
     system will store a copy of memory to persistent storage (the disk), and
     will power memory during sleep. The system will wake from memory, unless
     a power loss forces it to restore from disk image.

     hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The
     system will store a copy of memory to persistent storage (the disk), and
     will remove power to memory. The system will restore from disk image. If
     you want "hibernation" - slower sleeps, slower wakes, and better battery
     life, you should use this setting.

To make a laptop or a desktop Mac always hibernate (suspend to disk), run:

sudo pmset -a hibernatemode 25

To make a laptop always hibernate on battery power, run:

sudo pmset -b hibernatemode 25

Setting hibernatemode to 25 decreases energy consumption during sleep but makes waking up take longer.

Some new Macs automatically enter a standby mode after a specific amount of time of being in regular sleep mode under certain conditions. See http://support.apple.com/kb/HT4392 (Mac computers: About standby mode):

Macs that can use standby mode:

  • MacBook Pro (Retina, 13-inch, Late 2012) and later
  • MacBook Pro (Retina, 15-inch, Early 2013) and later
  • MacBook Pro (Retina, Mid 2012)
  • MacBook Air (Mid 2010) and later
  • SSD and Fusion drive versions of Mac mini (Late 2012) and later
  • SSD and Fusion drive versions of iMac (Late 2012) and later

Mac computers manufactured in 2013 or later enter standby after three hours of "regular" sleep. Earlier computers activate after just over an hour of "regular" sleep.

To enter standby, the computer must:

  • Be running on battery power (if it is a Mac notebook computer).
  • Have no USB devices attached.
  • Have no Thunderbolt devices attached.
  • Have no SD card inserted.
  • Have no external display attached.

man pmset:

STANDBY ARGUMENTS
     standby causes kernel power management to automatically hibernate a
     machine after it has slept for a specified time period. This saves power
     while asleep. This setting defaults to ON for supported hardware. The
     setting standby will be visible in pmset -g if the feature is supported
     on this machine.

     standby only works if hibernation is turned on to hibernatemode 3 or 25.

     standbydelay specifies the delay, in seconds, before writing the hiberna-
     tion image to disk and powering off memory for Standby.

sudo pmset -c standbymode 1 would enable standby mode even when not on battery power. sudo pmset -a standbydelay 1800 would change the delay before entering standby mode to 30 minutes.

Some Macs also hibernate after four hours of normal sleep under certain conditions. See http://support.apple.com/kb/HT1757:

With the release of the OS X Mountain Lion v10.8.2 supplemental update 2.0, a new feature was introduced to enter safe sleep after four hours of the computer being connected to AC power. This is an effort to comply with the European Energy Standards (ErP Lot6). This will only occur if there is no wireless or Ethernet activity and no activity from external devices such as USB storage devices.

man pmset:

autopoweroff - Where supported, enabled per default as an implementation
of Lot 6 to the European Energy-related Products Directive. After sleep-
ing for <autopoweroffdelay> minutes, the system will write a hibernation
image and go into a lower power chipset sleep. Wakeups from this state
will take longer than wakeups from regular sleep. The system will not
auto power off if any external devices are connected, if the system is on
battery power, or if the system is bound to a network and wake for net-
work access is enabled.
autopoweroffdelay - delay before entering autopoweroff mode. (Value =
integer, in minutes)

I don't know if there is any difference between the hibernation mode that is used when hibernatemode is set to 25, standby mode, and the hibernation mode that is used when autopoweroff is enabled.

Standby mode or hibernation does not save that much energy though. According to Apple's environmental report, the current 13-inch MacBook Air consumes 0.25W when it is turned off and 0.68W when it is in sleep mode on 230V voltage. The MacBook Air has a 54-watt-hour battery, so a full battery should last about three days when in sleep mode (if the Mac does not enter standby mode) and about nine days if the Mac is turned off. The energy consumption in hibernation or standby mode is probably close to the energy consumption when the Mac is turned off.

  • 2
    So what's the difference between hibernation and standby? – Drazen Bjelovuk Oct 3 '14 at 6:16
  • This is a whole essay. Thank you! – Dave Pritchard Oct 1 '15 at 19:00

I think you are trying to find out what is draining the battery during the sleep.

Macs are designed to use the sleep time to do some house cleaning and chores.

The first 4 hours

autopoweroffdelay 14400 seconds

it will do nothing (energy saving regulations EC), then it will wake up to do its stuff.

But based on this study under "normal" conditions draining about 350mAh/8 hours a fully charged battery with 7000mAh capacity should last up to 7 days in sleep mode.

Battery drain

There are many 3d party apps that "manage" the sleep mode, but my answer is focusing on finding out what is draining your battery.

Safe Sleep for example means it will save the RAM information to the disk (safe) while the RAM stays fully powered, and it does not stop it from performing maintenance tasks and others.

I know I am not giving you sleep modes, but trying to explain that you need to find out why is your computer draining so much during sleep.

What I recommended to do is to find what is going on, (what is your Mac dream off during the sleep).

For example this in Terminal will tell you the wake reasons

syslog |grep -i "Wake reason"

For details use pmset -g log in Terminal.

Then look and the nightly hours (during the Sleep) to see what is really going on and who is active.

For example you have the

ttyskeepawake

set to ON.

If you are not using the remote wake then disable it in Network setting or use this in Terminal to disable it pmset ttyskeepawake 0

Here is some more detailed information.

MacBook Air can easily last up to 30 days (I believe it's close to 25-28 days) in stand-by/hibernation, not sure where the 3 and 9 days come from.

  • Do you have a source for this information or is this personal experience? – grg Apr 25 '15 at 14:30
  • Personal experience. Both 2010 and 2012 Mac Air last at least 25 days with OWC SSDs which drain more power than the stock Toshiba SSDs. With Toshiba SSDs it's something like 27-28 days. I assume Mac Air goes automatically to Deep Sleep or whatever it's called..... (Quite confusing actually, Deep Sleep, Hybernation... I assume it's same called Standby in Mac, although Standby in Windows is like Sleep in Mac). Note Mac Air 2010 is listed while Macbook Pro 2010 is not. – guest2324 Apr 25 '15 at 18:38
  • 1
    I was also arguing previously with OWC because I purchased an SSD from them and it was faulty, it wasn't working with "suspend to disk" in Mac Air so the machine would die after 3.5 days. I returned the SSD and they replaced it with a new one and the "suspend to disk" works as expected. I calculated, it's about 3-4% of battery loss per day with suspend to disk. With suspend to RAM it's about 1% per hour battery loss. That was based on battery logs and battery status. – guest2324 Apr 25 '15 at 18:50
  • 1
    This article also confirms the Macbook machines have up to 30 days stand-by time with suspend to disk... osxdaily.com/2013/01/21/mac-slow-wake-from-sleep-fix – guest2324 Apr 25 '15 at 18:52
  • Every MacBook Air no matter how old it is and how hard its life has been?? – hippietrail Aug 17 '17 at 0:30

I have had good experiences with SmartSleep: http://www.jinx.de/SmartSleep.html

For instance it will go to hibernation when the battery level goes below a certain percentage.

Mac portables will go to sleep when their lids are closed but, story doesn't end here. If you leave your mac for prolonged in standby mode and its batters run downs, mac will suspend to disk and will shutdown completely. My early 2008 MacBook Pro does it all the time, so I can assume that new macs are also doing it.

  • Yes, the save to disk is when the battery runs down. (I wonder whether that's what the Sleepimage file is for, since it wouldn't be a regular shutdown). That feature is available with all portables, even older once, including your 2008. The newer models can do suspend to disk which is apparently (?) using the same Sleepimage file to save copy of RAM to disk. – guest2324 Apr 25 '15 at 19:06

protected by bmike Sep 30 '15 at 10:20

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.