Chosen Solution
I have a mid 2010 MacBook Pro. when inactive for 5 seconds it pops up a message saying “are you sure you want to shutdown your computer now? It does this by itself like clockwork and if I don’t press cancel immediately it shuts down. I have jammed one of the keys down so its not inactive and this has stopped the pop ups but that is obviously not the right thing to do, please help!
Do you have access to an external USB keyboard & mouse? If you do lets open up the system and do an inspection to see how it looks. Post pictures of anything that looks suspect. Dust it out using a soft brush and can’ed air. What we’ll want to do here is disconnect the keyboard and trackpad ribbon connections then using the USB keyboard & mouse see if you still encounter the problem. I’ll warn you the system will ramp up the fans as they are going into Safe mode as the sensor or the trackpad will be disconnected when you pull its connection so don’t let that bother you. We don’t want to let it stay this way too long either as you don’t want to over stress the fans. Follow this IFIXIT guide: MacBook Pro 13” Unibody Mid 2010 Upper Case Replacement Follow the first three steps, then jump down to Step 11 pulling the trackpad connection (3rd image) and follow Step 12. Use care as you don’t want to damage the connector or the ribbon cable. To ease it back in I use a small piece of electricians black tape folded over to make a pull stuck on the ribbon. Is the system still wanting to shut down? If not you’ll need a new keyboard. If is still wants to shutdown we’ll need to look into the battery & temperature sensors within the system.
It’s the keyboard cable. I have a 2012 15" MacBook Pro, it started after I had accidently pulled the wrong cable (thinking it was the battery connector). I realized this, went back, cleaned the cable with alcohol, repositioned it, and it works fine now with NO popups of “Are you sure you want to shut down your computer”.