Hi guys, sorry I don't know how to post a message, it looks like there's only the option to answer to one single person.
Anyway, I bought a new iMac in December 2016 and after one week it started showing this problem (I updated the operating system the first day).
I took it back to the Apple Store and got it replaced FOUR times because every time it had the same problem. Apparently no one there knew what the problem was. I wish they informed their staff of what's happening.
I've chatted with a guy at the Apple service and he told me it's a software problem and "they are working on it" and there's no point in me taking back the iMac to the Apple Store.
To be honest the problem hasn't shown itself in the last couple of weeks, actually... different problem this time: now (always when I turn it off) the screen becomes black line by line and slowly.
Since I've replaced it FOUR times in two months then I guess it's not hardware, how could that be?
Thanks.