I leave my Ubuntu (20.04 LTS) running with multiple applications as a VMware guest. When the host is locked and the display turns off, I come back to Ubuntu and it's logged me out, closing all applications. This behavior does not happen on the same machine with Windows guests... they come back normally. This is making it really difficult to use Ubuntu productively.

I've tried: - Setting "Automatic Screen Lock" to off - Setting "Blank Screen Delay" to Never - Setting "Lock Screen on Suspend" to off - Setting "Blank Screen" to Never - Setting "Suspend & Power Button"'s "Automatic Suspend to Off - Installing Gnome Tweaks and turning off "Suspend when laptop lid is closed" - Editing /etc/systemd/logind.conf and adding HandleLidSwitch=ignore - Editing the virtual machine's .vmx file and adding suspend.disabled = "TRUE"

Nothing works. Any ideas?

Environment is: VMware workstation player 15.5.5; Ubuntu 20.04 LTS guest running on Windows 10 host. The problem appears specific to Ubuntu, as Windows 10 guests don't have this problem.


Definitely not an answer; was posted as a comment ...

Happens with native instance too, albeit 18.04. There was a 'debate' long ago on Gnome bugtracker about this and it ended with thread being closed with no definitive solution past 'should be fixed in 18.04.' Interesting thing to add could be that I've never had this issue until switch to DisplayPort connection. Even when using DP->DVI active adapter.

Now it annoys me beyond belief.

Best guess is 'monitor off' signal never reached graphic driver before and so system had nothing to act upon. What is beyond my understanding is logic underpinning decision that system with monitor turned off should have no active session regardless of said session's state. I suppose it could be just a copy from server behavior where nobody ever locks screen and this 'feature' is sort of marriage between convenience and security insuring admins don't stay logged in accidentally.

| improve this answer | |

Stop VMWare. Edit the .vmx file and add the line

suspend.disabled = "TRUE"

to the end of the file and save it. See Disabling the suspend feature for a virtual machine in VMware Fusion and VMware Workstation (2056501).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.