Fedora 35 unable to lock screen

Hi,

I’m unable to lock the screen. I’m using a default Gnome desktop installation.
Pressing Super+L does not lock the screen.
There is no lock button on the menu and no lock option in the “Power Off/Log out” menu.

I found a similar report here but the gconf settings on my system appear to be correct:

$ gsettings get org.gnome.desktop.screensaver lock-enabled
true
$ gsettings get org.gnome.desktop.lockdown disable-lock-screen
false

I have tried to enable the disable-lock-screen and reset it:

$ gsettings get org.gnome.desktop.screensaver lock-enabled
true
$ gsettings set org.gnome.desktop.lockdown disable-lock-screen false
$ gsettings get org.gnome.desktop.lockdown disable-lock-screen 
false

The problem occurs both in an X11 and a Wayland Gnome session.

Additional information:
I reinstalled Fedora to upgrade from Fedora 27. During the upgrade I have preserved my home dir and some other partitions. I did reformat the / and /var partitions.

The installation kickstart shows I installed:

%packages
@^basic-desktop-environment
@gnome-desktop

The only relevant package I installed additionally is gnome-tweaks.

How can I restore the lock screen functionality?

Thanks in advance

1 Like

Can you please confirm what login manager you are using? I think you must use gdm for lock screen to work. Are you using gdm?

If yes, can you create a new user and see if the lock screen works there? if it does, it’s some other user specific configuration that’s messing it up.

I concur with @ankursinha .
You said you upgraded by a reinstall from F27 but retained the /home content. It is possible that something in your users home directory is interfering with the lock screen so the test by creating a new user will verify if that is true or not.

I played a bit on my system with systemd-inhibit, probably after this, I had also the issue that I could not lock my screen any more.
However disable-lock-screen was true in my case:

$ gsettings get org.gnome.desktop.lockdown disable-lock-screen
true

Setting it to false fixed the issue:

$ gsettings set org.gnome.desktop.lockdown disable-lock-screen false

IIRC Automatic Screen Lock was on all the time in GNOME Settings.

2 Likes

I just checked on my systems (Fedora 34, 35, & 36) and on all I found the default setting as false.

2 Likes

The default setting on my install of Fedora 37 was true. This solution worked for me - thank you.