27" iMac, a few days out of the box, with a screen flicker getting worse. Putting on a UPS made no difference. Phoned Apple Tech Support to get a case reference and something on file; support tech had me power the machine off, unplug USB printer, unplug mains power lead, wait 45 seconds.
Then plug the power lead back in and
while holding down Cmd + alt + R, switch the machine on at its power switch and
immediately (before the startup sound) press and hold P as well. Hold all 4 keys down until the desktop appears. The startup sound may play twice.
Apparently resets the video RAM and something called the P-RAM

.
Whatever. No problems since.