Scrambled screen when going out of sleep
Although it's likely a hardware issue, you could try a few things if you don't want to get hardware help from Apple yet.


See if this happens when booting in Safe Mode.
Install a clean OS on an external drive to be sure it's not some extension or conflict.
Look in the console logs - see if you can see any obvious errors.
Try with other monitors and cables - it could be a bad cable or display. An EFI or firmware update might be needed to make the mac handle this situation better (it should never freeze) - and a report to Apple with details how to reproduce this might help get a fix sooner unless others have reported this specific combination.
If you have alternate RAM - do try swapping that in for testing. The newest macs use RAM heavily for display buffering - and wake from sleep is a time when you first can see issues with RAM going bad.


I'm lucky to have stores close by and would head there for a diagnostic checkup - so keep that in mind - it could just be a hardware failure / bad RAM, but anything you can do to narrow down the cause or rule out software / accessories by disconnecting everything but the bare minimum could save you a trip to the shop.