How to disable auto log in after suspend?

After turning on my 22.04 desktop from suspend mode I am logged in automatically. But I would like to change this and to protect my system so that it would require typing password to log in to the OS.

1 Like

Control Center > Users & Groups > select user, modify to require pass

if you dont have users & groups, sudo apt install gnome-system-tools


Hi, @griffin :slight_smile:

As far as I can tell, that issue of the screen not being locked (that is, not requiring that the user enters his/her password to unlock the screen), after resuming from suspend / suspension, is apparently an old bug that started on Ubuntu MATE 16.04 LTS ("Xenial Xerus"), still existed on Ubuntu MATE 18.04 LTS ("Bionic Beaver") and also on Ubuntu MATE 20.04 LTS ("Focal Fossa") and on Ubuntu MATE 22.04 LTS ("Jammy Jellyfish").

The good news is that there is a working workaround - at least I tested the workaround in my laptop running Ubuntu MATE 22.04 LTS ("Jammy Jellyfish") and it worked, with the caveat that, after resuming from suspension, the desktop screen is shown for about a second before the unlock window appears prompting for a password.

The most relevant Bug / Issue (where we can also find the workaround in a comment) that has been reported about this problem seems to be the "Bug #1777889 "Lock screen doesn't appear when resuming from suspend” : Bugs : mate-screensaver package : Ubuntu" - - regarding the "mate-screensaver" software package, reported in "Launchpad", on 20 June 2018, by Akram, for "Ubuntu MATE 18.04 LTS (Bionic Beaver)":

The workaround is available in the following comment in that same Bug, posted by mvaldez (mario-mariovaldez) on 24 October 2020:

For easier reference, I'm now quoting here that comment by Mario Valdez that explains the workaround in its entirety:

" Comment 14 for bug 1777889

mvaldez (mario-mariovaldez) wrote on 2020-10-24: #14

Upstream bug reports:

Seems to be an issue with mate-screensaver not supporting the PrepareForSleep systemd signal (it was previously supported but it was not configurable, so they removed the support).

As mentioned in one of the bug reports, a workaround is to install xss-lock and then create an item in the Preferences' Startup Applications to use:

xss-lock -l -- mate-screensaver-command -l

The xss-lock application will detect the systemd signal and instruct mate-screensaver to lock the screen. You can create the startup item manually or you can create a .desktop file in /etc/xdg/autostart/ to enable it for all users.

This is really a kludge, but it works."

I hope this helps you, @griffin :slight_smile:

For completeness, here are links to other discussions that took place here in the Ubuntu MATE Community discussion forums, regarding this issue: