Intel users often run into an annoying bug: When you shut the laptop cover, the machine falls into a light sleep, from which it should theoretically awaken as soon as you open the cover again; however, some computers, especially those with Intel graphics, will hiccup, resulting in a black or frozen screen. This problem is well known to developers [1].
You don't necessarily need to restart the computer to fix the problem. Switching to a virtual terminal (VT) and giving the LightDM display manager a nudge is often enough. Unfortunately, doing so clears the current desktop session of all the open windows.
To access the VT, press Ctrl+Alt+F1, which takes you to a black-and-white screen with a login prompt. On some keyboards, you also need to press the Fn function key to get to the F1 key. Next, you can log in with your user credentials and enter the following to reanimate the display manager:
[...]