I am using a late 2008 15 inch MacBook Pro and currently I am running OS X 10.8.2. For several months I have been having problems with system sleep, and since installing 10.8.2 these problems have become noticeably worse. If put into sleep mode (Hibernate mode 3 in my case) the computer sometimes wakes up. Currently this is happening several times per week. If this happens when the computer is in a carrying bag it gets extremely hot (the bag is well padded and therefore will insulated) and automatically shuts down, though I guess being cooked is not good for the computer. It has on occasions happened when I have noticed that it has awoken and I can then avoid the shutdown though once this wake-up occurs it appears that the sleep command in the Apple menu no longer works, though from terminal I can find that hibernate mode is 3 (response from: pmset -g | grep hibernatemode), which is fine, so that is not the problem. Trying to get the computer to sleep using "osascript -e 'tell application "System Events" to sleep'", perhaps not suprisingly, does not work. I have tried resetting the PRAM and the system management controller, but neither has had any noticeable effect. If the computer does refuse to sleet rebooting will restore things.
I would be grateful for any suggestions for fixing this problem as it is making the computer unreliable and maybe even dangerous - it gets very hot before it shuts down and I would guess the surface temperature is of about 45 C (not comfortable to touch, but not so hot you need to let go), so I wonder how hot it is internally. It would be useful, I guess, to know why the computer is waking up - does anyone know if this is recorded in a log anywhere or if there is any tool that can record it? Also does anyone know if there is another way to sleep the computer (other than the sleep button or "osascript -e 'tell application "System Events" to sleep'")? Is there any way to restart the sleep function (if that is the right description) if is no longer functioning or to find out why it is not responding. It is frustrating to have a system misbehave and not be able to work out why.
thanks for you help and sorry the post was so long