Change Macbook or Macbook pro from sleep to hibernate

Written by
Date: 2011-07-30 14:33:00 00:00

Sleep vs Hibernate

First thing we'll define the differences between sleep and hibernate.

  • sleep: The computer is 'almost' off, the system is on the RAM and the rest of the computer is off.
  • hibernate: All computer is off, the system has been copied to the hard disk to resume from it later.

Well, we will now be a little more deeper, Macs during sleep (normal default mode) put a copy of the running system on the hard disk and another to the RAM, this way they can rapidly wake up from RAM, but in case battery losses all power, it can then recover from disk.

This is great if you plan to just rest for 5 minutes to 2 hours and then continue working on what you were doing, but if you plan to put your system to sleep for a day or more, you will be better with hibernate. In hibernate mode, the computer will save all RAM to disk and will shut the power off, then your battery will remain charged, for days or weeks, until you wake your Mac up.

As you may have already noticed the main difference is that sleep mode is faster but uses battery and hibernate mode is slower but uses not battery.

Now, is up to you to decide which to use, to change between one or the other use this commands, from the shell

Put your Mac in sleep mode

You may need not to do this, as it is the default.

sudo pmset -a hibernatemode 3

Put your Mac in hibernate mode

sudo pmset -a hibernatemode 25

Check which mode your Mac is using

pmset -g | grep hibernate

Thats it, remember to read the man page for more info.

man pmset