Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Recently, my MacBook Pro (mid 2012, 15 inch, 10.8.2) has started going into what seems to be hibernate mode after several hours asleep, whether it's plugged in or on battery. When I unplug it, it wakes briefly without me opening the lid (I can tell because the CD drive cycles). If I open the lid, I see it loading the hibernate file before becoming active again.

I looked at the output of pmset -g, and see the following settings that might be relevant to this problem:

lidwake              1
autopoweroff         1
autopoweroffdelay    14400
standbydelay         4200
standby              0
hibernatemode        3
acwake               0

Interestingly, "acwake" is zero, as is "standby". But "autopoweroff" is 1, and the "autopoweroffdelay" is 14400 (4 hours). Looking at the system log from last night, I see these entries:

Nov 26 22:36:28 ITHAA1STHOMAMBP kernel[0]: sleep
Nov 27 02:36:30 ITHAA1STHOMAMBP kernel[0]: Wake reason: EC.SleepTimer (SleepTimer)
Nov 27 02:36:30 ITHAA1STHOMAMBP kernel[0]: AirPort_Brcm43xx::powerChange: System Wake - Full Wake/ Dark Wake / Maintenance wake
Nov 27 02:36:30 ITHAA1STHOMAMBP kernel[0]: Previous Sleep Cause: 5
...
Nov 27 02:36:51 ITHAA1STHOMAMBP kernel[0]: hibernate_page_list_setall(preflight 0) start 0xffffff80de079000, 0xffffff80de0b9000
Nov 27 08:38:21 ITHAA1STHOMAMBP kernel[0]: hibernate_page_list_setall time: 491 ms
...
Nov 27 08:38:31 ITHAA1STHOMAMBP kernel[0]: sleep

I put the computer to sleep by closing the cover at 22:36. It woke itself 4 hours later at 02:36 and hibernated. At 08:38 I unplugged the power to bring the laptop to work, and it woke briefly.

What it looks like to me is that the computer is going into auto power down after 4 hours. But there are some things I don't understand:

  • Why did this start happening recently (within the last week, as far as I can recall, and not associated with any software update)?
  • Why does it wake on power change when "acwake" is 0?
  • Can I just set "autopoweroff" to 0?
share|improve this question
2  
What exactly do you want - to not sleep and always hibernate or to only sleep and never hibernate? –  bmike Nov 27 '12 at 18:21
1  
1. I want to understand what is actually happening and how to control it. –  Spencer Nov 27 '12 at 20:11
1  
2. I don't want it to hibernate unless (1) I explicitly tell it to or (2) the battery is about to be exhausted. In other words, I want the old behavior back. –  Spencer Nov 27 '12 at 20:12
    
Also - did you not report the value for darkwake or womp from pmset or are they missing (and presumably that your Model doesn't have SSD and/or PowerNap functionality or Wake for network access disabled in software settings)? –  bmike Nov 27 '12 at 20:25
    
womp is 1, darkwake is not shown. I do have the SSD option. I'm not sure about PowerNap. –  Spencer Nov 27 '12 at 20:40

5 Answers 5

up vote 3 down vote accepted

I noticed the same. Luckily I had the free support option still active and I contacted them. See my post here at Apple Support Communities: MacBook Pro wakes from sleep at connect/disconnect AC power.

Regarding waking up when AC power is attached/detached I have contacted Apple support and they were able to reproduce the problem. They consulted the behaviour with their engineers and they said that this is the expected behaviour. I don't know what is the reasoning behind this however I was also informed that I can provide feedback (via apple.com/feedback ) and I did. If you guys think (like I do) that this feature is annoying and probably dangerous (when you detach the sleeping macbook from power and start toss it to put into backpack while hdd spins...) then I suggest to nag Apple on this matter.

Basically, they admitted that the behavior is 'not a bug but a feature.'

share|improve this answer
2  
This must mean that Apple engineers are expected to get no more than 4 hours sleep a night, hence they never realized this was a problem, or to take it another direction, that if your machine is off for more than 4 hours you'd better be dead or in a hospital :) –  jefflunt Jul 12 '13 at 13:41
    
it is definetely meant as a feature (see here). However, the wakeup on powerchange is annoying and probably not intended. –  n1000 Sep 27 '13 at 8:19

ML 10.8.2, mid-2012 15" MBP (non-Retina).

This problem just popped up for me a couple weeks ago: leave MBP sleeping for X hours, unplug MBP, MBP lights/wakes up, enters hibernation. Really annoying to open the lid only to have it shut down right in front of me.

My acwake was also disabled for both battery and AC. Which means that the setting is now being ignored.

The solution appears to be (even though it's not referenced in the pmset man page):

sudo pmset -a autopoweroff 0

I should note that this does not affect acwake being ignored. My computer still wakes up upon AC connect/disconnect, but it's not hibernating or attempting to hibernate after I've unplugged the computer and opened the lid.

share|improve this answer
    
acwake 0 worked on my MBP mid2012. now it acts like i know it from my previous MBPs and does not wake on powerchange –  n1000 Sep 27 '13 at 8:16

To control exactly when your Mac will transition from sleep to hibernate, you can use the following (the delay is in seconds) and you need to have hibernate mode to be set to either 3 or 25 (binary 0011 or 0001 1001):

pmset -a standby 1 standbydelay 600

You could use different settings and timings for -b battery and -c charger if desired. (Perhaps on power, you disable standby mode, but on battery have a 10 hour timeout.) These switches are documented in the manual page for pmset. I haven't messed with acwake lately, but in the past the lid proximity sensor of a portable would take precedence and suppress a wake that would have happened if the lid were open.

share|improve this answer
    
But right now, standby is 0 so I should never be entering standby mode. I think it's doing "auto power off", but I don't understand why. And I don't know what is the downside of changing "autopoweroff" to 0, which might stop that behavior. –  Spencer Nov 27 '12 at 20:38
1  
Hmm - I've found interesting things running a pair of terminal windows, one with pmset -g batt and the other pmset -g pslog and then poring over the detailed logs. Hopefully you don't have a hardware error or a voltage discontinuity in the battery as those are going to be the hardest to track down. –  bmike Nov 27 '12 at 20:43
    
It's a relatively new MacBook (2 months, more or less). The battery has 20 cycles, and I'm getting the behavior when it is plugged in. So battery seems to be unlikely to be the culprit. –  Spencer Nov 27 '12 at 20:47

Apple seems to have added a new setting, "autopoweroff", to allow the system to hibernate when the lid is closed and the laptop is on AC power. This complements the "standby" setting which is only used when on battery.

Some power settings are configurable for different power sources, for example "darkwakes". Some, like "standby", seem to only ever have been used for when the system is on battery power. Since this was the historical use, and people would be upset if "standby" settings started to apply while on AC, Apple probably thought it was best to create a new setting just for AC - "autopoweroff".

share|improve this answer

Using the autopoweroff set to 0 worked for me on a 2011 iMac that was exhibiting this behavior. It seems this is normal for 2012 iMacs, but after I had an Authorized Apple Service Provider replace a defective LCD, this behavior began.

FYI for those who see this thread but are having this with a desktop.

primalman

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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