MacBook restarts when closing lid
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
- disabled hibernation completely in Terminal and deleted the sleepimage file
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!
Is this a good question?