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
This is what worked for me:
Disable hibernation:
Remove the sleep image:Code:sudo pmset -a hibernatemode 0
And finaly:Code:sudo rm /private/var/vm/sleepimage
Code:sudo ln -s /dev/null /var/vm/sleepimage
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
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.I think it creates an alias
sudo rm /var/vm/sleepimage
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
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:On a related note, now "swap-files" of 1GB keep cropping up. Anyone know how to fix this?