I tell laptop to go into suspend, close the lid, and leave for a while (usually overnight). When I open the lid again, system seems to have either restarted or logged me off - all my programs have closed, and my browser behaves as it had previously crashed. If I try to suspend the computer, close the lid, and then open it again after a few minutes, the system resumes normally.
I don't know if what happens is random, or a function of time elapsed since suspension.
I run Ubuntu 18.04 on Thinkpad T480S with integrated Intel and discrete Nvidia cards using nvidia-driver-396.