I thought I would give my 2 cents worth into this thread. I can't believe it's been going on since 2014.
My issue started a little differently.
I have a late 2013, 27 inch iMac. About 2 months ago I heard a buzzing noise coming from the bottom left hand side of my iMac. I did some searching on Google and up came threads with people who had a similar issue. It's amazing once you have an issue, doing a simple search you find out you're not the only one.
After reading through various threads I worked out it was most likely a faulty power supply that needed replacing.
I took my iMac to my local Apple Store, told them about the buzzing noise and they said that had heard of this before and they will check it out and fix the problem. As it turned out, it was a faulty power supply, which they replaced.
And it totally fixed the buzzing noise...Yay.
Anyway last week, out of the blue, 2 months after the power supply being replaced, my iMac just shut down by itself. I had to reset the SMC to get it to start up again. I had to do this sometimes 3 or more times in a day.
I did some searching on Google and this thread came up. I had never even heard of this issue before this thread.
Anyway, straight away I booked in to see the genius bar last Thursday at my local Apple Store. I took my iMac in again, and told them the whole story. I even mentioned this thread and said that it looks like a fault and Apple hasn't acknowledged it yet. I even said it may be the brand of the power supply. But they weren't really interested in hearing about this thread. They also said anything is fixable....while I agree, this thread left me feeling deflated.
They said they would do a full diagnostic test on it which takes over 5 hours and see if they can replicate the issue, which means they will have have my iMac for a few days.
I wasn't feeling too positive about it after reading this thread with no one having a solid solution to this issue.
Anyway, I got a call from Apple on Sunday saying my iMac is ready to be picked up. And of course, it passed all diagnostic tests without any issues, and they couldn't replicate it shutting down by itself. They said they they even did a CPU dump which means they worked the machine very hard to get it to crash or shut down and it didn't.
I was thinking this is just typical.
He then told me just to be safe they replaced the power supply again with a new one. When I heard that I felt a bit happier, as at least they had done something even though they found no issues.
So here I am sitting typing on my iMac, I've used it for a few hours here and there and it hasn't shut down.
I'm still not 100% convinced and I am just nervously waiting for the thing to shut down based on everyone else experiences.
But what I am certain about is I think it's a power supply issue.... first I get the buzzing noise...the power supply gets replaced and the buzzing is fixed. Then I get the shutting down issue. It's too much of a coincidence.
So perhaps the initial new power supply was faulty. Now they have replaced it with another one, I'm hoping that fixes it.
Only time will tell, but I will update everyone here if it shuts down again and I need to take it back to the Apple Store.