NewsWorksSoftwareTextBioContact
background image

Forcing MacBook to hibernate

2011-06-22

Pardon this exceedingly geeky note, I just want to store it for my own future self.

There are different ways of bringing a Mac laptop to sleep. I would like to prevent my laptop from drawing power when sleeping, and the following is based on instructions I found here. However I don’t see any need for creating terminal aliases, and hence no need for editiing the .bash_profile file.

Sleep mode can be controlled with the pmset command in the terminal. According to the following excerpt from the man pmset documentation, one should stick to one of three values:

We do not recommend modifying hibernation settings. Any changes you make are not supported. If you choose to do so anyway, we recommend using one of these three settings. For your sake and mine, please don’t use anything other than 0, 3, or 25.

hibernatemode = 0. 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. 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. (This is the default for my current laptop.)

hibernatemode = 25. 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.

Sleep mode can be set with the following terminal command (this one will set it to the 25 hibernation mode):

sudo pmset -a hibernatemode 25

You can check what sleep mode is currently being used with the following command:

pmset -g | grep hibernate

Up

comments powered by Disqus

 
 
 

Creative Commons License Licensed under a Creative Commons Attribution 3.0 Norway License. Web site hosted by BEK.