MacOs, Sleep-Wake, Power-Management – Fixing Aggressive Hibernate in Mountain Lion

macospower-managementsleep-wake

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?

Best Answer

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.'