So I've had the same problem for quite some time now, and I have been googling around a lot.
In the end I found out that the problem seems related to hibernation/deep sleep and virtual memory.
The problem on my machine was that the swap was disabled and the graphics problems occurs after a wakeup from deep sleep.
Only way to temporary fix this was to reboot the mac into my account in single user mode (holding shift while booting), and then back to normal mode.
The permanent way to fix it is to reenable the virtual memory kernel again.
So starting the virtual memory kernel is done by running :
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
Also on my mac the reason the virtual memory wasn't running was because the file com.apple.dynamic_pager.plist for some reason was deleted/missing.
So I restored it from my Time Machine backup and rebooted.
And it all seems fixed now... finally!
Let me hear if this helps others!