Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 25, 2013, 10:34 PM   #1
eliehass
macrumors member
 
Join Date: Aug 2008
I disabled safe sleep, but my sleep image file keeps returning...

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?

Last edited by eliehass; Jul 25, 2013 at 10:41 PM.
eliehass is offline   0 Reply With Quote
Old Jul 25, 2013, 10:40 PM   #2
dukebound85
macrumors P6
 
dukebound85's Avatar
 
Join Date: Jul 2005
Location: 5045 feet above seal level
from another thread


Quote:
Originally Posted by derbothaus View Post
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

That should do it.
dukebound85 is online now   0 Reply With Quote
Old Jul 25, 2013, 10:42 PM   #3
eliehass
Thread Starter
macrumors member
 
Join Date: Aug 2008
Quote:
Originally Posted by dukebound85 View Post
from another thread
Thanks!
eliehass is offline   0 Reply With Quote
Old Jul 25, 2013, 10:43 PM   #4
Dalton63841
macrumors 65816
 
Dalton63841's Avatar
 
Join Date: Nov 2010
Location: SEMO, USA
EDIT: ninja'd
__________________
mid-2009 13" Macbook Pro, 2.26Ghz, 8GB RAM, 120GB SSD + 1TB HDD
Dalton63841 is offline   0 Reply With Quote
Old Jul 25, 2013, 11:18 PM   #5
beakerface
macrumors newbie
 
Join Date: Jul 2013
Just curious, what's the disadvantage of disabling safe sleep?
beakerface is offline   0 Reply With Quote
Old Jul 25, 2013, 11:23 PM   #6
Dalton63841
macrumors 65816
 
Dalton63841's Avatar
 
Join Date: Nov 2010
Location: SEMO, USA
Quote:
Originally Posted by beakerface View Post
Just curious, what's the disadvantage of disabling safe sleep?
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.
__________________
mid-2009 13" Macbook Pro, 2.26Ghz, 8GB RAM, 120GB SSD + 1TB HDD
Dalton63841 is offline   0 Reply With Quote
Old Jul 25, 2013, 11:26 PM   #7
beakerface
macrumors newbie
 
Join Date: Jul 2013
Quote:
Originally Posted by Dalton63841 View Post
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.
Oh interesting. Is there a way to just reduce the size of the sleep image then?
beakerface is offline   0 Reply With Quote
Old Jul 25, 2013, 11:34 PM   #8
Godf1st
macrumors regular
 
Join Date: Oct 2012
Quote:
Originally Posted by Dalton63841 View Post
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.
Does disabling it give any performance?
Godf1st is offline   0 Reply With Quote
Old Jul 25, 2013, 11:37 PM   #9
dukebound85
macrumors P6
 
dukebound85's Avatar
 
Join Date: Jul 2005
Location: 5045 feet above seal level
Quote:
Originally Posted by Godf1st View Post
Does disabling it give any performance?
it frees up storage space equal to the amt of ram you have installed.
dukebound85 is online now   0 Reply With Quote
Old Jul 25, 2013, 11:38 PM   #10
Godf1st
macrumors regular
 
Join Date: Oct 2012
Quote:
Originally Posted by dukebound85 View Post
it frees up storage space equal to the amt of ram you have installed.
Oh ok, thanks. So basically if you have a large ssd there's no need?
Godf1st is offline   0 Reply With Quote
Old Jul 25, 2013, 11:39 PM   #11
eliehass
Thread Starter
macrumors member
 
Join Date: Aug 2008
Quote:
Originally Posted by Godf1st View Post
Does disabling it give any performance?
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.
eliehass is offline   0 Reply With Quote
Old Jul 25, 2013, 11:40 PM   #12
dukebound85
macrumors P6
 
dukebound85's Avatar
 
Join Date: Jul 2005
Location: 5045 feet above seal level
Quote:
Originally Posted by Godf1st View Post
Oh ok, thanks. So basically if you have a large ssd there's no need?
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
dukebound85 is online now   0 Reply With Quote
Old Jul 25, 2013, 11:40 PM   #13
Godf1st
macrumors regular
 
Join Date: Oct 2012
Quote:
Originally Posted by eliehass View Post
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 you ram to the hard drive.
Quote:
Originally Posted by dukebound85 View Post
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

Thanks
Godf1st is offline   0 Reply With Quote
Old Jul 26, 2013, 12:08 AM   #14
Dalton63841
macrumors 65816
 
Dalton63841's Avatar
 
Join Date: Nov 2010
Location: SEMO, USA
Quote:
Originally Posted by dukebound85 View Post
it frees up storage space equal to the amt of ram you have installed.
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.
__________________
mid-2009 13" Macbook Pro, 2.26Ghz, 8GB RAM, 120GB SSD + 1TB HDD
Dalton63841 is offline   0 Reply With Quote
Old Jul 26, 2013, 04:24 AM   #15
dusk007
macrumors 68030
 
Join Date: Dec 2009
Quote:
Originally Posted by eliehass View Post
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.
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.

Quote:
Just curious, what's the disadvantage of disabling safe sleep?
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.
__________________
15" MBP 2013 2.3/750M, 16GB/512GB
dusk007 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:28 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC