Fix possible hibernation activation in desktop Macs

Jun 04, '12 07:30:00AM

Contributed by: kirkmc

I had some swapping issues the other day on my Mac mini, so I went into /var/vm to check how many files were there. I was surprised to find a sleepimage file; this is a file that is written when a Mac goes into hibernation mode. This file was about 9 GB - or the size of my RAM (8 GB) plus a bit.

Hibernation is only supposed to be used on laptops, but in an informal query of acquaintances (read: Twitter followers), I found that several people had seen this issue after the 10.7.4 upgrade. In addition to the space used, hibernation mode means the Mac takes a lot longer to go to sleep.

This hint from 2006 shows how to turn off hibernation and save that disk space. Essentially, you run the following command:

sudo pmset -a hibernatemode 0
(I didn't run the second command, and it doesn't seem to be needed.)

So, if you've found that your desktop Mac has lost a lot of disk space, check in /var/vm.

You can also check which mode your Mac is in by running this command:
pmset -g | grep hibernatemode
If the result is 0, then you're in normal sleep mode. See man pmset for more information about the different sleep modes.

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2012060101021939