My Problem
When idle, the macbook would prompt with a shutdown dialog (are you sure you want to shutdown?). This occurred every 70 seconds. Sometime it would also display the dashboard (like F12 had been pressed).
My Fix
The problem was the upper case (keyboard, power button, trackpad). It was easy to replace with the ifixit guides and it fixed the problem.
My Advice
macs are expensive to replace with a new one and definitely worth repairing if it's cost effective and the mac still meets your needs.
Written on December 3, 2011