A few months ago, I dropped my 15″ MacBook Pro from about 3 feet. Upon immediate inspection, I only noticed a small dent near the DVI connector, but I figured that was the extent of the damage since the computer was off (or at least in sleep mode) at the time.
The next time I turned on the laptop, it went to sleep after a few minutes. I would power it back on and it would go to sleep again seconds later. This repeated again and again. I decided to let it sit overnight. The next morning, I powered it on and it would stay on for about 15 minutes before it would go to sleep, only this time when I would wake it back up the screen would not come back on. This happened for two weeks before I could get a new laptop (thanks State Farm Insurance, for covering a large chunk of the purchase). In the mean time, I used the machine with an external display. For whatever reason, when the DVI port was in use, the machine would stay awake.
I figured the problem had something to do with the “sleep sensor” in the MacBook Pro. When the computer would stay awake, the screen worked fine and the computer itself worked fine. My thought was that the computer thought the lid was constantly closing and so it would go to sleep.
I thought the “sleep sensor” was located in the latch or somewhere in the front of the laptop, but after poking around on the Internet and on the machine, I found out that its located on the back of the right side of the keyboard, right in the middle. It is something that is commonly called a reed switch. It sends an electrical impulse to sleep the computer when the force of a magnet is felt. The magnet is located in the bezel halfway down the display on the right side. Confirm this by placing a paperclip in that location! When you close the lid, the magnet lines up with the sensor on the underside of the right speaker grill and tells OS X to go to sleep.
If you take the top of the laptop off, you’ll see the second part of the reed switch with a three-wire connector leading to the main keyboard ribbon cable.
I removed, cleaned, and reinstalled the sensor, and now the machine has been working on battery power for hours without a problem (I’m typing this entry on it now). I’ll update this post if something goes awry, but if you’re having weird sleep problems and think you’ve tried everything like the dozens of other people that have posted on Apple’s discussion boards, try cleaning the reed switch and make sure you don’t have strong magnets near the right side of your MacBook Pro.