I would echo several of the earlier comments - that for many (including me), this must be caused by bad solder joints.
On my 2011 Imac, I first tried all of the "settings" type of solutions mentioned in the thread and none worked.
I then installed mac fan control. I monitored for a few weeks and realized that I would only see the dots or anomalies when the GPU temp was below 130 deg F (54c). To keep the temps on my machine up, I have had to resort to having numerous browser windows open which stream video constantly. If I don't do that, the temps fall, the dots reappear, and the computer may crash.
This has been going on for the past 10-12 months and I have duplicated this behavior dozens of times.
To further reinforce this hypotheses, the problem only really started happening in earnest, immediately after I replaced the crashed mechanical hard drive with an SSD which cooled the internal operating temps significantly.
It's gotten bad enough, that I've tried to adjust the fan operating using the program but it doesn't seem to help. The machine runs so cool now the hard drive fan never runs, and even with the CPU & smart drive fans idling, I have trouble keeping the temp above 130deg F.
Having 4-5 windows open streaming the video is a real pain. Eventually the video queue ends and needs to be manually restarted. With that many browsers going I need to check every few hours. If anyone has any ideas on how to keep the internal temp on the machine up without doing this please let me know!!?
All in all this is extremely discouraging. My first Imac lasted 5 years and died due to the bad caps issue. This replacement also seems to have a 5 year life span. Disassembling and baking the motherboard seems to be temporary repair at best though it may come to that. One thing is nearly certain, I can't see myself replacing this machine with another Apple product.
Meanwhile, I have two 10+ year old PC's in the basement that still run fine...