Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lilabila

macrumors member
Mar 27, 2011
60
27
I can confirm that the issue still persists on 10.8.3
At least my sleepimage file is only 2GB out of 16GB RAM
 

falcn

macrumors member
Aug 6, 2011
90
51
Yep, there is a bug in ML that make sleep image come back even if hibernatemode is set to 0.

I have 16Gb of RAM, so that is kinda irritating.

Workaround:

sudo rm /var/vm/sleepimage
sudo mkdir /var/vm/sleepimage

Works like a charm:
drwxr-xr-x 2 root wheel 68 May 14 09:49 sleepimage/
 

chaseychasem

macrumors regular
Aug 4, 2012
137
0
Set sleep mode in shell:
sudo pmset -a hibernatemode 0
Remove the image:
sudo rm /private/var/vm/sleepimage
Create a blanked file:
sudo touch /private/var/vm/sleepimage
Make file immutable:
sudo chflags uchg /private/var/vm/sleepimage

Tried this for the first time today after applying the 10.8.4 patch. Doesn't work, unfortunately. Sleepimage always returns. Any tips? Is there a way to undo this setting if nothing does the trick? Would that even be necessary?

EDIT: Never mind. I think I got it, but the fact that Chameleon still showed Disable Sleep Image as off confused me. I assume this is due to the nature of the workaround?
 
Last edited:

sir. mac

macrumors regular
Nov 21, 2006
113
0
Thanks a bunch!
This worked, but what does the last command do, and is it reversible?

this: sudo ln -s /dev/null /var/vm/sleepimage
 

priitv8

macrumors 601
Jan 13, 2011
4,038
641
Estonia
I think it creates an alias
It redirects (creates a symbolic link in Unix terms) sleepimage file to dev null (the black hole of Unix). So everytime system writes to sleepimage, the bytes are drained to outer space.
It is reversible, just
Code:
sudo rm /var/vm/sleepimage
 

sir. mac

macrumors regular
Nov 21, 2006
113
0
On a related note, now "swap-files" of 1GB keep cropping up. Anyone know how to fix this?

It redirects (creates a symbolic link in Unix terms) sleepimage file to dev null (the black hole of Unix). So everytime system writes to sleepimage, the bytes are drained to outer space.
It is reversible, just
Code:
sudo rm /var/vm/sleepimage
 

priitv8

macrumors 601
Jan 13, 2011
4,038
641
Estonia
On a related note, now "swap-files" of 1GB keep cropping up. Anyone know how to fix this?
I'm not sure why would you want to mess with virtual memory management of OS X, but if you insist, then you can disable the Apple dynamic pager and get rid of the swapfiles, as instructed in this article:
http://osxdaily.com/2010/10/08/mac-virtual-memory-swap/

Once you're done, you are left with only physical memory that you've got installed (4GB, 8GB, 16GB or whatever you have in your Mac), no virtual memory.

NB! I also recommend you read the comments to the article above before making the final cut.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.