You referenced the HT4044 article covering pixel anomalies in your title, but the description sounds like an issue that is affecting a larger area of your display.
How big are the squares that appear on the display?
How long has the issue been occurring? Did you make any changes just prior to the issue occurring?
What version/build of Mac OS X are you running? Have you checked for software and firmware updates which can sometimes correct these types of issues?
Have you tried creating a new user to see if the issue goes away?
By any chance did you clone your data from another system to your iMac? If you did then you may have an incomplete version/build of Mac OS X that doesn't have the necessary kext files to support your graphics hardware. Reinstalling the OS may be worth considering.
Have you run the Apple Hardware Test to see if it generates any errors?
Can you post a picture showing the issue?
If it won't go into the Apple Hardware Test mode then the hard drive may have been reformatted at some time. If you have the original Install discs that came with the system you'll see that the Applications Install DVD has a note on it in very tiny type saying "To use Apple Hardware Test, hold down the D key as the computer starts up." It fails to mention that the disc should be in the optical drive since that is where the Apple Hardware Test will load from if it cannot be found on the hard drive.
Booting in Safe Mode is another troubleshooting tool that can help determine whether you have a hardware or software problem. You can boot in Safe Mode by holding down the shift key as soon as the gray Apple logo appears at power ON. If the issue goes away when in safe mode you should consider reinstalling Lion using the Lion Recovery mode. If you continue to experience problems then you may have a graphics card issue that will require a service tech for evaluation. Here are some articles that explain what Safe Mode is.
I have this same issue on my 2011 27" iMac. A partial screen shot can be seen in the image above. I've ran the hardware test myself, and I've taken the machine into the Apple store where they've run the more extensive hardware test. Everything comes back with passing results. At the Apple store, they informed me that I had two options. The first was to reinstall Lion using Lion Recovery Mode, and the second was to leave the iMac at the store and have them install a new graphics card. I opted to try Lion Recovery Mode. It unfortunately did not fix the issue for me. I will soon be bringing the iMac back to the Apple store for them to install the new graphics card.
Unlike the original poster, my red squares appear entirely at random. Sometimes they appear while I'm browsing the web, sometimes while using photoshop, or sometimes while there are no applications open and I am staring at the desktop. Taking an open window and swiping it over the red squares causes them to go away.
I will update this post after I get my new graphics card installed.
Oops I forgot to come back and post my findings. I wish I could say that getting a new graphics card fixed the issue, but in reality it made the situation even worse. The day I brought my iMac home it began to freeze, and instead of seeing little red squares, the entire screen was now dominated by multi-colored vertical lines. I immediately went to the Apple store and worked with them to get an entirely new replacement unit. They were very understanding since I had made about 6 trips back and forth the store overall, and they ultimately gave me a new 2011 model to replace the 2010 model I had. Its been a while since then and I have not had a single issue with the new iMac, and I am a very happy customer.
No, unfortunately the problem has only gotten worse. If I reset the PRAM it temporarily gets rid of the dots but as time goes on it gets worse. I suspect some kind of video memory issue that once it hits a certain amount of use it fills to the point where the problem is. I really have no idea though. The diagnostics come back with nothing wrong. It's a bummer being out of warrantee. It happened right after it expired. The whole reason I switched to Mac was the supposed quality.
I started having this issue several weeks ago. At first I ussumed it was related to Adobe Flash since it presented itself when I was viewing video content in Safari. I uninstalled Flash, Silverlight and so forth.
When it reapppeared and progressively worsened I decided to take it to my friendly Authorised Apple Service Center (The local Apple Store is far too busy). They attempted to diagnose the issue, possibly hardware, using all thier catchy tools.
I noticed it was online Thursday night in Finder so I thought I'd screen share into it from home.
The odd thing, while dinkering around on it remotely, the grid of square dots presented themselves via the remote session. That did not seem like hardware to me but I do not know how these things work with regard to how the remote session is streamed out from Remote login/Screen Sharing (Yes, BTMM worked!)
Seeing that and explaining it to the repair tech confirmed to him what Apple reported during his troubleshooting with them.
They suspected I had an anamoluos Kernel extension (insert techno-jabber here). Apple recommended I install a clean copy of OS X and I did. I was weary of restoring from Time Machine during the install process so I opted for the Migration Assistant post-install. It's been over 48 hours and no sign yet of the issue, fingers crossed.
I hope this corrected my issue, I'll post an update in a few weeks if anyone wants a followup.
Model Name: iMac
Model Identifier: iMac12,1
Processor Name: Intel Core i5
Processor Speed: 2.7 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB
Boot ROM Version: IM121.0047.B1F
SMC Version (system): 1.71f21
AMD Radeon HD 6770M:
Chipset Model: AMD Radeon HD 6770M
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: ATI (0x1002)
Device ID: 0x6740
Revision ID: 0x0000
ROM Revision: 113-C0170C-170
EFI Driver Version: 01.00.544
Display Type: LCD
Resolution: 1920 x 1080
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Connection Type: DisplayPort
Sadly, it has returned.
I thought maybe I restored a baddie from TM backup so I performed another fresh reinstall yesterday and reinstalled all my Apps from scratch only restoring my docs from TM.
I wonder if a firmware update for the AMD Radeon HD 6770M is due anytime soon?
I have almost an exact mirror of Apps and settings on my MBP and it has never displayed this type of issue.
I am also experiencing the exact same issue with my iMac in just the past week. It's like christmas here with flickering blotches of red and green just like the chaddaniels' screenshot. Repeates faster with graphics changes like slowly. Sure seems like bad video ram or video processor to me. It always goes away on reboot, but eventually retruns.
Actually the blotches are not exactly green some are a teal and others are more of a cyan.
But HayMoose, you're right, I just tried logmein and they do appear remotely, so to me it is something of a higher level and not hardware.
I wonder if a recent update is causing it. I really don't want to freshly re-install my system to an older version to find out though!