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.

I'm wondering what is a logic of sleep/hibernate of the OS X System.

On the lid closing MacBook should go to sleep - it is obvious but.. What if the machine is running only on batteries and it is in sleep mode for a long time (until complete discharge of the bateries). Does OS X will store RAM on disk to keep user work safe?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It depends on how you have configured the hibernate bits in the power manager.

Setting aside desktop machines which by default to not write anything to persistent storage when the system enters sleep, the default behavior is to write a copy of RAM to storage so that either power remains to wake the machine from RAM or the system will detect the sleep image and restore from that rather than booting from a clean state.

You can set more exotic combinations using pmset and a shell, but it is not officially "supported".

share|improve this answer
    
I have a Mac Pro running Lion and it swaps RAM to disk. –  David Holdeman Dec 20 '12 at 22:49
    
@DavidHoldeman That's interesting. I would assume pmset -g shows a non-zero value for hibernation mode? –  bmike Dec 20 '12 at 23:03
    
I take that back. It DID swap RAM to disk, I know because at one point I had a 6GB (The size of my RAM) file at /private/var/vm/sleepimage. I have no idea when or why it stopped. –  David Holdeman Dec 20 '12 at 23:08

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.