Sleepimage keeps coming back even with SafeSleep disabled

Discussion in 'MacBook Pro' started by CausticPuppy, Oct 31, 2012.

  1. lilabila macrumors member

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

    Feb 26, 2013
  3. falcn macrumors member


    Aug 6, 2011
    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.


    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/
  4. chaseychasem, Jun 10, 2013
    Last edited: Jun 10, 2013

    chaseychasem macrumors regular

    Aug 4, 2012
    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?
  5. technowar macrumors 6502

    Apr 1, 2011
    Cebu, Philippines
    Brilliant. Thank you for this!
  6. sir. mac macrumors regular

    Nov 21, 2006
    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
  7. bert32 macrumors newbie


    Aug 5, 2009
    I think it creates an alias
  8. priitv8 macrumors 68040

    Jan 13, 2011
    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
    sudo rm /var/vm/sleepimage
  9. sir. mac macrumors regular

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

  10. priitv8 macrumors 68040

    Jan 13, 2011
    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:

    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.

Share This Page