Not asking for password after being awakened from suspend

I am using Zorin Core16.2 with all updates applied. After not using the computer for a while it goes into suspend as expected. When I wake it back up, it doesn't ask for a password. I think, but I can't be 100% sure, that it was asking for a password but stopped a week or so ago.

In power settings, I have automatic suspend on. In User settings for my account I have automatic login turned off.

Thanks!

Check:
Zorin Menu > Settings > Privacy > Screen Lock > Automatic Screen Lock and Lock Screen On Suspend.

Thanks for the reply.

Yes, both of those settings are turned on.

I know in Windows there's a configurable delay after screen-off before the screen locks. I wonder if there's something similar in Linux. That way, if the screen turns off, you have a chance to turn it back on by just wiggling the mouse (for instance, if you're reading a long article and it times out) without having to enter the password.

Have you let it sit for awhile, then wiggled the mouse to see if it asks for a password? If it does, it's that timeout between screen-off and screen-lock.

Yeah, its always when I have to press the power button to wake it up that is won't ask for a password.

Have you uninstalled any screen savers lately? I know the old gnome-screensaver was necessary for the screen to lock... not sure if that's still the case.

gnome-screensaver/focal 3.6.1-11ubuntu4 amd64
Screensaver and screen lock formerly used in GNOME

1 Like

I like the way you are thinking, @Mr_Magoo . I have noticed issues stemming from the use of both a Screenlocker and a screensaver at the same time, where each has its own configuration file.

I don't use either, so I'm a bit out of my depth on this. I just noticed the old gnome-screensaver because I was perusing sudo apt list.

Perhaps OP can install the old gnome-screensaver:
sudo apt install gnome-screensaver
... then issue:
gnome-screensaver-command -l
If it throws an error, issue:
gnome-screensaver &

Nope. I haven't done anything with any screensavers. Actually, I can't seem to find where you configure a screensaver

BTW, I do get asked for my password when booting.

(base) kevin@kevin-GL63-8RE:~$ sudo apt install gnome-screensaver
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-screensaver is already the newest version (3.6.1-11ubuntu4).
gnome-screensaver set to manually installed.
The following packages were automatically installed and are no longer required:
coinor-libcbc3 coinor-libcgl1 coinor-libclp1 coinor-libcoinmp1v5
coinor-libcoinutils3v5 coinor-libosi1v5
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

gnome-screensaver-command -l did not throw an error.

I guess it could possibly have something to do with my hardware and how it goes to sleep. It's an MSI GL63. I just checked and it doesn't ask for a password even if I manually put it to sleep.

Did it lock the screen when you issued:
gnome-screensaver-command -l

If not, that's a problem, that's what that command is designed to do. Try the other command to see if it locks the screen.

You might also try:
gnome-screensaver-command -n
... that lists the calling application that is inhibiting the screensaver.

(base) kevin@kevin-GL63-8RE:~$ gnome-screensaver-command -n

** (gnome-screensaver-command:22059): WARNING **: 22:22:53.280: Unknown option -n

This is kind of interesting...

(base) kevin@kevin-GL63-8RE:~$ gnome-screensaver-command -t

(gnome-screensaver-command:22322): GLib-CRITICAL **: 22:27:37.447: the GVariant format string '(b)' has a type of '(b)' but the given value has a type of '(s)'

(gnome-screensaver-command:22322): GLib-CRITICAL **: 22:27:37.447: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' failed

(gnome-screensaver-command:22322): GLib-CRITICAL **: 22:27:37.447: the GVariant format string '(u)' has a type of '(u)' but the given value has a type of '(s)'

(gnome-screensaver-command:22322): GLib-CRITICAL **: 22:27:37.447: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' failed
The screensaver has been active for 22023 seconds.

Maybe not related, but do you haer a swap file or swap partition or none?

I have a swap file.

Some clarification on points may help suss this out...
There is a difference between

  • Lock screen
  • suspend
  • Hibernate
  • Sleep

Which of these functions is showing the issue?

Definitely suspend. Whether it naturally suspends due to non use for the configured time (30 minutes) or if I manually suspend.

In that case, this is most likely an issue with Gnome Screensaver not properly fulfilling systemctl suspend command.
I realize that you may not be actively using a Screensaver - the Screensaver Program is what manages the Suspend Wake login screen.
From Lockscreen, however, it is the ScreenLock program that handles that - on Core, it would be GDM.
On Zorin OS Lite, it is LightDM and xfce4-screenlocker.

Which... leads us to a potential workaround for your issue until the Gnome Developers can resolve the standing bug in gnome-screensaver: Install xfce-screensaver or xscreensaver and remove gnome-screensaver entirely.

Thanks, that's worth a try! Can you tell me the commands to do that?

BTW, I do have XFCE installed. (Zorin Lite Desktop) I was wondering if that might be causing some sort of conflict (like maybe the last time I used it, the computer suspended and then I logged into Core and maybe Lite left something behind that made core think the screensaver is still running). So I logged out of Core, logged into Lite XFCE, logged back out and into Core but that didn't help.