Hi All,
Brand new to this site, but felt compelled to post based upon this thread. I've got an iMac G5 20" ALS that has had this same shutdown problem since I bought it about six years ago.
The machine runs fine for about 18 months then starts degrading so that shutdowns happen faster and faster.
This is a very tricky problem as Apple has replaced my logic board and power supply a couple times over but with no luck. Moreover, though they've made certain allowances, they keep pointing out that my machine falls slightly outside the serial number range for the repair extension program and so can't have the fatal flaw that the other units seem to have . . . even though it does. Gotta love corporate America.
I would contend however that different machines have different problems and that's confusing folks.
For instance, one of the theories has been that a number of the units have bad capacitors, and this seems to be confirmed by articles such as this one . . .
http://jimwarholic.com/2008/07/how-to-repair-apple-imac-g5.php
Still, since this last time I had a failure, I was outside warranty, I decided to remove the back and see what I could figure out on my own.
First off, interesting to note that while the computer seemed completely dead by now, jumping the power button contacts with a paper clip hundreds of times, finally got the machine to come back on again. (This alone may be misleading a lot of users AND repair techs; they think they're dealing with a completely dead machine when they're really not.)
Despite this small victory, the machine would still shut down spontaneously without following any kind of a predictable pattern.
I did notice that it would shut down more quickly when performing processor-intensive tasks, like playing video.
This led me to suspect a heat management issue (in keeping with the power management concerns outlined in this thread)
Leaving the back off and placing ice packs against the power supply and processor seemed to help improve performance initially, but even then the machine behaved erratically.
I also noticed that unplugging the unit for 10-15 seconds and/or resetting the NVRAM as described helped some.
Finally though I found that if threw out my entire System Configuration Folder from the Preference file in the Root Library AND then reset my screen saver (didn't matter to what, just so long as I forced the computer to write something to the new preferences file) the computer started running stably again. Note that the the above tip suggests simply deleting the PowerManagement preference, but I took it a step further.
Unfortunately, I wasn't rigorous enough in my testing. Success may have been because I threw out the old file, or because I overwrote the new preference file, or because I rebooted, or any combination thereof. It's worth noting however that simply removing the file wasn't enough to get the machine running predictably.
Hope this helps others. I apologize for the long story!