This was happening to me pretty much out of the box when I bought my 27" iMac with 2gb video card in 2011. I called apple several times and sent several screenshots. Noone knew what was happening and i had the logic board replaced but it didnt fix the problem. I was trying to get apple to just give me another computer but they refused and said repairs were their policy. I dont see that problem happen much anymore somehow but I am definetly calling in for a replacement. Also my iMac had a faulty harddrive that they fixed for free aswell. haha. what the hell apple. figure it out.