Xorg crashs (logout) when turn off the screen or suspend Ubuntu 18.04 (Nvidia 390)

When turn off the screen or suspend the system is logged out when return, and the whole session is killed. The greeting screen says login instead of Unlock and when logging in the system locks it self and ask for password again to Unlock.

I face this problem on Ubuntu 18.04 and Budgie 18.04, this problem is only when using nvidia drivers 390 & even 396, but when using “nauveau”, this problem disappears.

I reported a bug on the following https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/1782882

I fed up with this problem where I tried a lot of things:

I switched between budgie and gnome ( on both situations Ii did a clean installation), I tried to not use any gnome-shell-extentions at all, I tried to switch between 390 and 396 Nvidia driver.

The Xorg log and stack traces tell that it’s crashing in libinput because of problems with your wireless mouse. Can you check with the receiver unplugged?
Don’t know why this wouldn’t happen when using nouveau, though.

Nope, forget about the mouse, the problem is only with Nvidia dealing with Xorg, where this problem appears with or without the mouse.

Can you check with a 4.17 kernel? I suspect the known acpi bugs which affect ideapads. Those have been fixed in 4.17.