You should reset PRAM, if you have not already.
Also, reset PMU or SMU (power management). This is the procedure for an iMac G5
but I don't know your specific iMac model. There are different procedures.
When you reconnect it back to power, if it was previously connected to a "power strip" of some type (especially if it's old or overcrowded), try connecting it directly to a wall outlet, by itself. Start it up with nothing else connected initially, then connect only a standard mouse and keyboard. Use it that way for a while, to see if there is improvement. Some USB devices (whether faulty or not) can cause "interference."
A weak or dead PRAM battery can cause odd issues during startup.
And it is possible that there is a hardware problem, such as logic board or power supply. It may be helpful to know the iMac model. You can look at this list to help identify it precisely
1.8 GHz PowerPC G5
Moved the iMac to power straight into the wall.
Reset the PRAM by booting holding down COMMAND+OPTION+P+R.
Gonna see how it does before trying anything else.
Interesting thing is when it "fails" (which I haven't witnessed it yet), it's sitting at the white screen and the fan or hard drive is running really loud...believe it's the fan.
Once again after it fails, I have to boot it several times holding down the power button until the horn blows to get it to finally come up.
I've fired off Time Machine because I noticed the last full backup was Jan 2012...one of the kids must have turned it off. If I get it to complete, would I be able use it if disaster is actually striking?
I've got an old eMac that still runs great...can I take the external hard drive that Time Machine is backing up to and use it to load the eMac to what my iMac has on it without much difficulties?
I have a bad feeling the iMac is fatally sick...
It could be something that is resolved with a SMU reset, so be sure to try that one as well, which is the document I linked to before, since your iMac turned out to be a G5.
You will be able to do a complete system restore from the Time Machine backup, if you have the Leopard installation disc that you can use for start up. The command to restore the complete system is in the menu bar of Installer, under Utilities.
However, I would not recommend doing so (restoring the complete system), if the Mac being targeted is not the same Mac (or at least the same model Mac). You should be able to use the Time Machine backup as the "data source" with Migration Assistant. In that case, the eMac would already be set up with it's system and you would be migrating in your user data (and maybe applications). This would work best if the eMac was also running Leopard (10.5.8).
You can also access your data in the Time Machine backup folder directly, using Finder. So, you could even "manually" access and restore your data from the Time Machine backup to a different Mac.
If the external drive is USB, hopefully your eMac is a model that has USB 2.0. Actually, "hopefully" your iMac G5 will be working fine...
Thanks for all the advice.
Let's hope the PRAM reset did it. That was a reboot holding down COMMAND+OPTION+P+R unitl heard to startup sounds.
The Time Machine backup completed successfully so I'm prepared for the worst.
I'll keep my fingers crossed for now.
If it does it again, then I'll do the SMU reset.
If it does it again after that, then I'll take it to an Apple Store for analysis. I believe it has to be a power supply or logic board issue because once I get it to restart, it works like a charm until something happens to it. Just might be a sleep issue or something. Who knows at this point. Fingers crossed...
Thanks for your help & I'll keep things updated.