Hi, I have a problem, and I'm trying to fix it. I have an iMac on 10.10.5, and it passes the Apple Diagnostics. Yet it won't stay powered on for more than a few hours, but usually just tens of minutes. It will shut down on its own, with no warning, just as if someone yanked the power cable out. It does this whether it's in use, logged out, or even in Recovery mode. Safe mode doesn't help. Resetting PRAM/NVRAM doesn't help. Repair Disk Permissions doesn't help. I thought it might be USB related, but I've tried a couple different keyboards and mice in literally every combination of USB ports available (keyboard on 1, mouse on 2, 3, 4; keyboard on 2, mouse on 1, 3, 4; etc). I've even booted the computer with nothing plugged in except the power cable, and still, it shuts down on its own. Sleep mode has been disabled, but it hasn't changed a thing. I've tried it on different outlets and different circuits. I sent it in for warranty work, and they did hours and hours of stress tests, and it passed all of them. I get it back, and it shuts down on its own, just as before. What else is there to do to fix this? Thanks in advance for any help. --- Post Merged, Jun 24, 2016 --- http://forums.macrumors.com/threads/imac-keeps-shutting-down-unexpectedly.1906058/ This thread suggests it's a faulty power supply. Is there any way to get something from the Console that might confirm this?