Chosen Solution
Hello there! Excuse the bad grammar, I am dutch myself. When I click the power button of my iMac it turns on just fine, but when I am at the desktop it randomly shuts off (withing 5 min, sometimes longer sometimes shorter) and immediately restarts to do the same thing again. Sometimes when I leave it at the desktop it stays on and just works fine (browsing the web, accessing the finder etc…) until I shut down the Mac myself, only to repeat it the whole thing again when turning it on. I was wondering if this behaviour is indiciative of a failing power supply? I’m not seeing any other graphical glitches and or io faults so I hope it’s not the logic board. I could also replace the hard drive but it boots into the desktop flawlessly everytime, so I’m also not sure if that’s the problem. To summarize: sometimes it stays on and works perfectly until I turn it off myself, most of the time it shuts down within 5 minutes after booting and sitting on the desktop and then immediately restarts. Thanks in advance! I would also like to add that it seems work for longer when it’s been turned off for longer, implying it might be something overheating inside. How can I maybe verify?
Most likely a failing power supply. If the restarts have gradually increased, this would confirm it: iMac Intel 27" EMC 2429 Power Supply Replacement