Fedora 33 lock screen does not lock

I have been running fedora 33 since it was released. Recently I noticed that when the screen blanks it does not actually lock even though it is set to lock immediately.

What can keep it from locking and how do I find and fix it.?

1 Like

Hi JV,

where and how did you set the screen blanking and what wm/de are you running?

2 Likes

Running Gnome, screen blanking and locking set in settings → privacy.
It has always locked and I needed to enter my password to unlock it until at some point it did not.
I have no clue why the change.

I have run boinc for many years, and used the GPU to process work units while the screen continued to lock so I do not think that is a factor.

I tried it in a vm. Checked settings-privacy and screen lock was enabled. Set it to 1 minute and waited, screen went blank and when I moved the mouse I got back the screen without a password. Then I tried locking the screen by using “lock” in the upper right menu, the screen locked and then moving the mouse caused the computer to ask for a password to unlock. Then waited again for automatic screen lock and then it worked as expected. So I was able to reproduce your issue 1 time. Googling “gnome screen lock not working” gives a lot of results.

1 Like

Automatic screen lock does not work. I just realized that the menu from the upper right that used to have a lock option along with power and logout, now does not have that option. I have no clue when that disappeared but do remember that screen lock worked when I first installed F33. This machine is running fully updated fedora 33 with gnome 3.38.

I just checked my laptop which is also running F33 and fully updated and the screen lock works there. The menu still has the lock option as well.

I have gnome-tweaks installed on both systems so that is not the cause AFAICT.

I checked the search you suggested (I had already done similar) and the only thing that struck me was one of the posts seemed to have success with a dconf setting, but my setting was already the same as his final so that did not really pan out.

Are you running GDM?
Can you post the output of gsettings get org.gnome.desktop.screensaver lock-enabled ?

1 Like

Yes, Running gdm and gnome.

# gsettings get org.gnome.desktop.screensaver lock-enabled
true

# gsettings get org.gnome.desktop.lockdown disable-lock-screen
false

I also checked the disable-lock-screen setting since some threads indicated that was the issue. As you can see those appear correct.

I do not currently have anything that plays audio or (that I know of) actively uses the GPU when I am not at the computer.

I did create another user, and logged in under that name. There the screen locks and the drop-down menu in the upper left corner shows the lock option and it works, so this appears to possibly be a config setting issue. I have looked under the 3 hidden directories for gnome (.gnome, ,gnome2, and .gnome2-private) and cannot find anything that would affect the screenlock. Any pointers in that direction?

2 Likes

Changing org.gnome.desktop.lockdown disable-lock-screen to true replicates the “no lock icon on the menu” behavior for me, for what it’s worth.

Any chance you may have an extension installed that’s causing a conflict?

1 Like

With your comment I tried to change a dconf setting, thinking that I would switch the setting just in case it was misreported, and got the error below.

[root@eagle share]# gsettings set org.gnome.desktop.lockdown disable-lock-screen true

(process:357425): dconf-WARNING **: 09:54:15.556: failed to commit changes to dconf: Error sending credentials: Error sending message: Broken pipe

I now am concerned about a dconf problem. Possibly database corruption

So, with doing a bit more testing I found that the values from the gsettings command cannot be changed by root, but are user specific and can only be changed by the user.
As user I did
$ gsettings get org.gnome.desktop.lockdown disable-lock-screen
true
Since it returned true I then did
$ gsettings set org.gnome.desktop.lockdown disable-lock-screen false

I then verified that it was now set to false and the screen lock is working now, both automatically and from the drop-down menu.

Thanks for the pointers @mattdm
I think I finally got the message :upside_down_face: that not all settings need root privileges to change.

One thing that still puzzles me is how it changed from earlier behavior, since it used to lock and I did not make any dconf changes in, well, forever.

1 Like

Yeah, there’s a way to introduce system-level defaults (and even make those defaults enforceable, or at least hard to change). But generally it’s per-user.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.