Moreover, a kgdb session could likely track this bug down. I'm going to guess that it's a simple locking bug, likely in the intel drivers. Compiz or whatever is performing some operation out of synch with what is "normal" activity and trying to perform a double-lock.
Since cursor operations are tied to a hardware interrupt they still continue to operate.
Another possibility is that the kernel is running at a higher interrupt level in the driver after wakeup, and not locking the iommu/register area away from userspace operations - thus the graphics chip state is getting corrupted and goes into a unknown hardware state. Switching video modes is causing an interrupt which awakens the chip again, and restarting X causes the graphics unit to reset properly.
Yes, I used to be a graphics driver developer for X long, long ago.