Resolved I disabled safe sleep, but my sleep image file keeps returning...

Discussion in 'MacBook Pro' started by eliehass, Jul 25, 2013.

  1. eliehass, Jul 25, 2013
    Last edited: Jul 25, 2013

    macrumors regular

    Joined:
    Aug 19, 2008
    #1
    Edit: Nevermind, I think I found the solution here.



    I have a rMBP with 16 GB of RAM which was causing me to have a 16 GB sleep image file. I decided I didn't want that much hard drive space wasted for a feature I'm not that interested in, so I opened up the terminal and entered these commands:
    sudo pmset -a hibernatemode 0
    sudo rm /var/vm/sleepimage

    The sleep image file was erased and I was happy.

    My issue is that every time I put my laptop back to sleep, the sleep image file returns, even though I disabled safe sleep. I even checked in the terminal. When I input this command in the terminal:
    pmset -g | grep hibernatemode
    I get this result:
    hibernatemode 0
    which seems to imply that safe sleep is in fact off...

    Does anyone know what may be causing this issue?
     
  2. macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
    #2
    from another thread


     
  3. thread starter macrumors regular

    Joined:
    Aug 19, 2008
    #3
    Thanks!
     
  4. macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #4
    EDIT: ninja'd
     
  5. macrumors newbie

    Joined:
    Jul 25, 2013
    #5
    Just curious, what's the disadvantage of disabling safe sleep?
     
  6. macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #6
    If you disable safe sleep and then lose power(battery dies) then you could lose data. Safe sleep is basically a hibernation backup for regular sleep.
     
  7. macrumors newbie

    Joined:
    Jul 25, 2013
    #7
    Oh interesting. Is there a way to just reduce the size of the sleep image then?
     
  8. macrumors regular

    Joined:
    Oct 12, 2012
    #8
    Does disabling it give any performance?
     
  9. macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
    #9
    it frees up storage space equal to the amt of ram you have installed.
     
  10. macrumors regular

    Joined:
    Oct 12, 2012
    #10
    Oh ok, thanks. So basically if you have a large ssd there's no need?
     
  11. thread starter macrumors regular

    Joined:
    Aug 19, 2008
    #11
    It just saves you some hard drive space. And possibly lowers the time between when you close your laptop, and when it is actually sleeping, since your computer doesn't have to go through the step of writing your ram to the hard drive. With an SSD though, that time is minimal anyway.
     
  12. macrumors P6

    dukebound85

    Joined:
    Jul 17, 2005
    Location:
    5045 feet above sea level
    #12
    Correct. If you don't mind the space the file takes up, leave it be. For those with smaller ssd and a lot of ram, it is an unwelcome manifestation at times
     
  13. macrumors regular

    Joined:
    Oct 12, 2012
    #13

    Thanks
     
  14. macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #14
    Good news on this front. In Mavericks, it only takes up the amount of space equal to the amount of used ram, instead of total ram.
     
  15. macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #15
    It is still the difference between a couple seconds and pretty much instant. I hat safe sleep because often I close the notebook and remember I still need to check some thing and then you have to wait for it to fully shut down before it can wake again. With hibernate 0 that is pretty much just close, open and ready.

    I never had my battery completely loose power when it is sleeping. It is really a rare issue. Effectively it is like crashing your notebook when the battery runs out. Today you rarely loose any power as most either save their current work progress before they put a system to sleep or it autosaves and you don't loose much.
    There really isn't much of a disadvantage. In 98% of times you probably wouldn't loose any data or nothing important and in 99% of the time it would never happen anyway.
    Safe sleep exists to make the system more idiot proof but it is really a waste of time, energy and most of all space. An SSD that doesn't have to write a sleep image all the time will live longer and more happily.
     

Share This Page