I just figured this problem out on a client's computer. They record movies on this computer using OBS and it would "randomly" close all their programs and return to the user login screen.
I spent a lot of time trying to figure out the pattern - there is always a pattern. And I eventually figured out that it occurs more often when its hot outside. In fact, since they don't have Air Conditioning, when its hot outside, its hot inside.
What I found is when the machine starts to get warm, the Intel CPU will automatically reduce its clock speed. Slowing everything down, generating less heat, but also making it impossible for OBS to keep up recording HD movies to disk! And that would crash the X-Windows server (GPU or graphics card CPU). That crash would in turn emergency close all apps and reboot the X-Windowing server which starts up the login screen.
Since they don't have budget to install AC I am trying two workarounds:
- Installed a GNOME plugin to display and control CPU MAX/MIN speeds
- Bought a low cost fan to blow hot air out of the computer's cabinet.
The default Max/Min speeds are 100% and 20% on this system. Using the plugin I changed that to 100% and 90%. So now, even if it gets hot, it wont slow down much.
It has passed 2 tests so far. What I need is nice hot day for another test.