This problem did not show up with 16.04 LTS and older, but with 18.04 LTS relatively often. You can see also an error message, when you shut down →
[drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out
.
You have to add a boot parameter to grub to fix this bug. Here is how to modify the grub file to solve the problem:
...