You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unable to disable hibernatemode since update 2.0

I did the update 2.0 today and I noticed that hibernate mode has been set to enabled. So I deleted the /private/var/vm/sleepimage and disable hibernatemode like this :


sudo pmset -a hibernatemode 0


But the problem is that hibernate mode is automatically set to 3 when I shutdown my macbook air or I reboot it. Anyone has the same issue ?

MacBook Air (13-inch, Mid 2012), OS X Mountain Lion (10.8.2)

Posted on Nov 9, 2012 3:51 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 9, 2012 6:23 AM

Ok so I managed to solve my problem. Basically, I couldn't prevent the sleepimage to rebuilt even though my hibernate mode is set to 0, I don't know why but now my sleepimage weights 0 byte instead of 8 gigs. Here's the deal :


First, disable hibernation mode :

sudo pmset -a hibernatemode 0


delete /private/var/vm/sleepimage :

sudo rm /private/var/vm/sleepimage


create an empty file and name it 'sleepimage' :

touch /private/var/vm/sleepimage


change his flag to immuable :

chflags -uchg /private/var/vm/sleepimage


That's it ! Now, OS X won't be able to rebuilt over your sleepimage file since it is locked. This one worked for me, hope it'll work for those who encounter the same problem as mine.

22 replies
Question marked as Top-ranking reply

Nov 9, 2012 6:23 AM in response to garbor

Ok so I managed to solve my problem. Basically, I couldn't prevent the sleepimage to rebuilt even though my hibernate mode is set to 0, I don't know why but now my sleepimage weights 0 byte instead of 8 gigs. Here's the deal :


First, disable hibernation mode :

sudo pmset -a hibernatemode 0


delete /private/var/vm/sleepimage :

sudo rm /private/var/vm/sleepimage


create an empty file and name it 'sleepimage' :

touch /private/var/vm/sleepimage


change his flag to immuable :

chflags -uchg /private/var/vm/sleepimage


That's it ! Now, OS X won't be able to rebuilt over your sleepimage file since it is locked. This one worked for me, hope it'll work for those who encounter the same problem as mine.

Nov 15, 2012 10:29 PM in response to garbor

Just noticed the same thing myself. I installed MBA/MBP Update 2.0 today, and just now noticed my MBA (mid 2012) took 10-15 seconds to become responsive after opening it (one of several reasons I disabled hibernate mode in the first place). I checked if /var/vm/sleepimage existed, and sure enough, there it was.


Thanks for the tip about blocking sleepimage from being written. It's more of a band aid than a real solution, but if it actually sticks, it'll do for now.


Are you sure your Mac is actually setting hibernatemode to 3 though? Did you try pmset -g to get the current settings before disabling it again? I just checked mine, and hibernatemode is still set to 0. This leaves me with two working theories:


  1. The hibernatemode setting is now being ignored on purpose*
  2. There's a bug introduced by MBA/MBP Update 2.0 that causes hibernate mode to be on even when it's supposed to be disabled


If it's #2, it might just be a matter of resetting the PMU (and then possibly re-applying the setting via pmset). I'll try that later and report back if it works.


* Why Apple would force everyone to use this "feature" is beyond me, since there are a number of very valid reasons for turning it off, ranging from annoying delays to bigger problems like kernel panics, not to mention the fact that this feature is basically pointless if you never leave your laptop in sleep mode long enough to run out of power.

Nov 22, 2012 9:43 PM in response to Jason Sims

@Jason Sims - I've come to the same conclusion.


No matter what I set hibernate mode to, my retina MacBook Pro takes 10 seconds or more to wake from sleep - it seems to only happen after a while so I guess what the system does is:


- Put computer to sleep

- After a certain amount of time, hibernate. About 30 minutes or so.


If I wake my computer instantly, there's still a short delay with a grey screen showing - that's new also. Prior to that latest upgrade, wake was instant.


The system seems to ignore the hibernatemode setting completely (I had it on 0 and it would remain on 0, but still hibernate and take forever to wake).


Locking the sleepimage like the above is a hack and once they fix it, you have to remember to remove this hack again. If you forget to remove it it might cause problems down the road.


Best to file bugs with Apple.

Jun 17, 2013 9:08 AM in response to garbor

I know that this is a popular post for people looking for the solution, but the simple uchng flag isn't enough. You need to use schg or schange or simmutable chflags to make it so that the system doesn't override (they all do the same thing). So using the orignial workflow, added bold for the changes.


First, disable hibernation mode :

sudo pmset -a hibernatemode 0


delete /private/var/vm/sleepimage :

sudo rm /private/var/vm/sleepimage


create an empty file and name it 'sleepimage' :

sudo touch /private/var/vm/sleepimage


change his flag to immuable :

chflags schg /private/var/vm/sleepimage


For more info on chflags, go to https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/chflags.1.html

Unable to disable hibernatemode since update 2.0

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.