I have recently faced a critical issue with my iMac (since May 2016).
It shutdown randomly and suddenly. It's as if the power cord has been disconnected.
And it doesn't restart when I press the power on button. I have to switch off the power socket, wait for a few minutes, then it can be turned back on. These symptoms make me wonder is it a power issue..
These were some thing I did.. which still have not solve the issue..
1. Console says Cause 0
I checked Console.app, and it logged:
kernel: Previous Shutdown Cause: 0
It was said on the forum that a Cause 0 means the power was disconnected. This gives me some clue how it gets shut off.
It will be Casue 5 if triggered from the menu.
2. Running Apple Hardware Test
To isolate that the problem, I tried running AHT (Apple Hardware Test).
You can press and hold D while booting to perform the test.
But the test said the hardware is fine. But I can't be 100% sure. In fact I am thinking it could be caused by the SSD or RAM.
3. Installing Temperature Monitor
I installed Temperature Monitor app to log the temperature of the CPU, GPU, etc.
That again didn't shed light on the cause. The temperatures were all okay when the system crashed.
4. Learn about resetting SMC
I learn that what I have been doing - pulling off the power plug - is the way to reset System Management Controller (SMC).
5. Run memtest
Suspecting it could be a RAM that turned faulty, I run memtest. That is basically a command line tools that write random data to all of the RAM and verify it is correct.
I run memtest all 2 and nothing bad turned up.
6. PRAM Reset
Finally, I called Apple support for advise. One thing new they asked me to perform is the PRAM reset.
During boot up, press and hold Command + Option + P + R. The computer will restart and when you hear the startup sound the 2nd time, you may release.
One thing weird is that after I hear the startup sound the 2nd time, the Mac goes blank. By right it should continue to boot up, but it didn't. In fact, it shutted down..
The Apple support deduce that the SMC logic board might have a problem and need to be replaced.
Hence, I got to bring the Mac down to a service center..
7. Apple forum
Apple forum didn't provide a clear resolution. At least I knew I am not the only one affected.
8. Sending in for repair
After 3 visits to Apple Store to fix this, 1 logicboard had been changed, 1 Fan Sensor also changed, the problem still and I am going to the 4th visit to try to repair it!
to be continued...