Imported from the Apple Support Forums via the Wayback Machine 🔗
I'm using 10.4.9 on a PowerBook G4 1.67Ghz HR. For reasons too long to go into here, I have disabled "safe" sleep by setting hibernate mode=0. However, the sleep image file keeps hangin' on. I delete it, and sooner or later it's back. Since I have 2 gigs of memory, it's a 2 gig file. I could use the disk space.
Is there a way to tell OSX not to generate this sleepimage file? Thanks!
PS -- I am not sure when the file is regenerated. I usually do not shut the computer down; instead I leave it asleep but plugged in. So this is kind of a mystery.
Imported from the Apple Support Forums via the Wayback Machine 🔗
I've never seen one of those files, but I'd still bet that your choices are having that file generated whenever you sleep, so the power to the memory can be shut down, or finding another low power mode that doesn't sleep the whole Mac, or shutting down completely.
0
reezekeys·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Ive never seen one of those files<</div>
The file is in /private/var/vm/. /private/ is invisible so you're not going to see it.
As I understand it, the file is needed for safe sleep, so if your battery goes dead while sleeping memory contents are preserved. Setting hibernate mode=0 disables safe sleep so as I see it, you don't need the file. Unless there's something I'm not getting.
0
reezekeys·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I may be getting closer to the answer. I had the finder window open showing the /private/var/vm directory. I pulled the power cord so the PB switched to battery power. The sleepimage file immediately appeared! This is strange because it seems to me it would take a few seconds to write a 2GB file. Maybe it's just "pre-allocating." Anyway, putting the computer to sleep was still instantaneous, so I really don't think any memory contents were written to this file. It seems to me then that the sleepimage file is basically useless -- it's 2GB of nothing.
0
reezekeys·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I just did this so I can't be 100% but it looks like this solution, which I found at macosxhints.com, works!
*******************************
Try this. Even after disabling "SafeSleep" using the other hints in this thread, and then actually doing "sudo rm /var/vm/sleepimage" or even "sudo tcsh; cat > /var/vm/sleeepimage ^D" everytime it seems that /var/vm/sleepimage comes back after a restart or shutdown! So....
sudo rm /var/vm/sleepimage
sudo ln -s /dev/null /var/vm/sleepimage
*******************************
It looks like OSX is being "fooled" by an alias to the sleep image file -- now it's using 4K of space imstead of 2 gigs!