Entire X session crashes if the screensaver starts while notebook lid is closed
## Submitted by leo..@..il.com
Assigned to **Sean Davis `@bluesabre`**
**[Link to original bug (#16528)](https://bugzilla.xfce.org/show_bug.cgi?id=16528)**
## Description
Created attachment 9569
Logs with information of the crash
It was observed that xfce4-screensaver can cause a Xorg crash. This crash will make the entire Xorg session close, closing all applications and, due to how the computer is configured, will suspend the system.
Steps to reproduce:
1) Have xfce4-screensaver running. For now, I can reproduce this with the "pop art squares" screensaver (but may work with others);
2) Ensure the screensaver never started before in the current session;
3) Close the notebook's lid;
4) Wait the idle time when it should start;
5) Notice how, after that, Xorg has crashed and lightdm login screen appears, showing the user is not logged in.
This does not work 100% of the times. By the log messages, it may be related to the disabling of the screen when the lid is closed and xfce4-screensaver starting on what would be no screen, but then it crashes the session.
The steps that caused the crash are particularly noticeable on the xsession-errors log (it was attached with a few other relevant logs).
Relevant information:
xfce4-screensaver versions: 0.18-1 and git (af3808583fbc1abae353cfc13b291effa1bc3b50)
Distribution: Xubuntu 20.04 Daily
Kernel: 5.6-rc4 and 4.19.108
GPU: Intel HD Graphics 520
Xorg driver: intel
**Attachment 9569**, "Logs with information of the crash":
[crash20201003095500.tar.xz](/uploads/07ddafba48ba4938d9a2a1d94896d9ab/crash20201003095500.tar.xz)
Version: 0.1.8
issue