“I needed to disable the lid sleep feature on my 2007 MBP, as it kept on coming out of sleep when it was closed in my bag. I’m guessing the magnetic sensor used in the lid momentarily moved at some point, causing it to wake up.
Forget all those other solutions, this one is the cleanest and quickest:
Open up Terminal and type:
sudo pmset -a lidwake 0This will disable the sleep/wake feature when opening or closing the lid.
To reenable it, type:
sudo pmset -a lidwake 1
To check the status of the lid wake feature type:
pmset -gAnd look for the lidwake value.
0 = Disables
1 = Enabled