Recently I built an SSD (128GB Samsung 470) into a late 2007 Macbook, and swapped the old HDD with the Superdrive, I used Carbon Copy Cloner to transfer the system, Desktop, Applications, Library and System is on the SSD, user folders on the HDD symlinked to the SSD home folder. Everything works fine, except when I close the lid the computer restarts. Before I noticed this, I tried to move the sleep image to the hdd to save space on the ssd with the following command:

sudo pmset -a hibernatefile /Volumes/DATA/sleepimage

I started to notice this problem, so I formatted the SSD and restored a previous backup with the original settings, and deleted the sleepimage from DATA. However the problem is still there, so I think it wasn't because I messed with the location of the hibernation file. Now, I tried EVERYTHING that I can think of (except fresh install which I don't really want to do):

  • reset PRAM and SMC
  • Diskwarrior
  • disabled hibernation completely in Terminal and deleted the sleepimage file
  • SmartSleep

When I choose sleep from the apple menu or use the sleep and hibernate command from SmartSleep, it works fine, the problem seems to be connected with closing the lid. And if I close the lid and let it reboot several times, it doesn't want to restart anymore just grey screen or restarts again and again, unless I do an SMC reset. Any solution? It would be much appreciated!

UPDATE: I did a fresh Snow Leopard install to the external drive and does the same. So is it a hardware issue or just the setup? What can be the problem which effects the lid closing only? If I put the computer to sleep manually and then close the lid it wakes up without a problem. Also the magnet is definitely in the display frame.

UPDATE 2: After extensive research, I found the problem is in the SSD/HDD combination - Optibay setup, many people have the same issue and nobody could even track the problem down, it works with some drives, with others it doesn't.

BEST SOLUTION: I found NoSleep, which is a kernel extension:


(the only one which works under Lion) to prevent sleep when closing the lid, so I can do it manually when I want and then close the lid. Also, manual sleep is instant now, no lag at all!

  • Please answer your own question if you found a solution. You can even accept that tomorrow or so! – slhck Apr 23 '12 at 7:51

From man pmset:

hibernatefile - change hibernation image file location. Image may only be located on the root volume. Please use caution. (value = path)

This is probably why it's crashing, and the fix is to set this path back to a file on the root volume. The default value is /var/vm/sleepimage, and using it is strongly recommended. Reading the documentation and warnings is also a good idea before playing with pmset.

| improve this answer | |
  • When I restored the startup disk from backup, it updated everything, isn't it? So sleepimage would be on its place, but it's deleted and hibernation is disabled anyway. However I tried and the command was executed, but still crashes. Any idea why? – yoli Apr 22 '12 at 10:39
  • You'll need to check Console.app to see if anything is logged about crashes. As for restoring from backup, that gets state that's in the filesystem but not necessarily state kept elsewhere (and resetting the PMU etc. may also miss things). I don't know if Apple has documented all the details of what pmset changes anywhere. – geekosaur Apr 22 '12 at 10:45
  • there's a continuous crash report, i uploaded to here: dropbox.com/s/a0vspyth1elirv4/… I'm kinda noob to figure out anything from that... – yoli Apr 22 '12 at 10:55
  • I've also found a kernel panic, maybe it helps: dropbox.com/s/jtcs9qnp8wwrqdg/Kernel_2012-04-22-094258_z.panic – yoli Apr 22 '12 at 11:02
  • That doesn't appear to be related (discussions.apple.com/message/15717563#15717563) although it's probably worth cleaning up per that URL. – geekosaur Apr 22 '12 at 11:03

Best workaround yet: I found is a kernel extension NoSleep.

(The only one which works under Lion) to prevent sleep when closing the lid, so I can do it manually when I want and then close the lid. Also, manual sleep is instant now, no lag at all!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.