Skip to main content

Unlocking the Gnome 3 Lock Screen

·2 mins

Yesterday I found that my computer (Arch Linux with Gnome 3) refused to lock by any means. My keyboard shortcut (Super + L) seemed to be disabled, and the Gnome Settings were grayed out as well, preventing any changes.

In Gnome Settings, under Privacy, the screen lock options are grayed out, though enabled
They’re on, but disabled?

Turns out the solution to this was quite simple, though difficult to figure out at first. Gnome uses a configuration storage called dconf, which can be compared to the Windows Registry. In it are configuration keys that map to values, which are used by Gnome to customize your experience. In this case, the key of interest is disable-lock-screen, located in org.gnome.desktop.lockdown. Using dconf-editor, you can drill down this path and see the setting enabled.

Using dconf-editor, we can enable the lock screen by turning off “disable-lock-screen”
Disable the enabled disable-lock-screen

Simply flipping the switch to off will re-enable the lock screen functionality! Additionally, you can do all dconf editing from the terminal. In this case, running the command gsettings reset org.gnome.desktop.lockdown disable-lock-screen gives the same result. Using gsettings get org.gnome.desktop.lockdown disable-lock-screen will show the current setting for that option.

The most likely reason I got into this mess in the first place was by using the Phoronix Test Suite. I had also installed that yesterday and was messing with the tests. My guess is that it enabled this dconf option (to prevent faulty tests?) and never set it back to default. I find it interesting that Gnome Settings did not show why the settings were disabled in the first place.