Unfortunately, there have been numerous issues with the iMac G5 but Apple has yet to issue a recall on any of the produced units. Issues ranging from freezing or display flickering have been reported by iMac G5 users from all over.
If you’ve got an iMac G5 and you’re experiencing similar issues, the best thing you could do is to quickly send it in for servicing before the warranty expires on it,
For reference, Oliver Kreuzenbeck has documented the issue in great length at his webpage.