User often logged out without warning: Ubuntu 18.04, GeForce GTX 1060, LightDM,

I’m running Ubuntu 18.04 on a Dell G7 laptop with a GeForce GTX 1060 card.

Issue: I often get logged out unceremoniously and without warning, under the following circumstances:

  1. When the laptop lid is closed and opened (very often)
  2. When unlocking the screen after locking it (less often)
  3. When unplugging a HDMI cable for connecting to an external monitor (less often)
  4. Spontaneously in the middle of normal usage (twice so far)

This has had serious consequences for me, involving loss of work and time.

I’ve noticed that WiFi disappears when I log back in as well, necessitating a reboot. The issue appeared only after installing NVIDIA drivers (described here.

I’ve generated the nvidia-bug-report.log.gz file immediately after logging back in, post one such logout episode.

Please do let me know if I can provide any additional information:

$ uname -r
5.0.0-37-lowlatency

$ nvidia-smi
Wed Jan  8 16:18:34 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.64       Driver Version: 430.64       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   58C    P0    24W /  N/A |    173MiB /  6078MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1560      G   /usr/lib/xorg/Xorg                            97MiB |
|    0      2108      G   /usr/bin/gnome-shell                          73MiB |
+-----------------------------------------------------------------------------+

Thanks in advance.
nvidia-bug-report.log.gz (1.14 MB)

Update: Just experienced another logout episode. I had locked my screen, the lid was open, and upon entering the password, I was taken back to the login screen. Quite a bit of precious work was lost. The nvidia-bug-report.log.gz file is attached.

Any help in resolving this issue would be appreciated.
nvidia-bug-report.log.gz (768 KB)