Screen blank when manually locked and machine won't lock

Hello,
I have two issues related to the power options and screen management.
First of all, when I manually lock the screen, the screen immediately goes blank. I want to disable/control that behavior. The Blank Screen Delay in Options (Power and Privacy-Screen) is set to Never.
Secondly, I can't manage to set the computer to lock the screen after some time interval. Under Privacy-Screen, Automatic Screen Lock is toggled on and the interval of 5 minutes is set, but it doesn't have any effect.
gsettings get org.gnome.desktop.screensaver lock-enabled is true
gsettings get org.gnome.desktop.screensaver lock-delay set to 300

Disabling GNOME Extensions, as AI suggests is not a way to go, as I don't want to risk breaking something more serious. As far as I know there are no other conflicting software.

Gemini 2.5 AI response:

Okay, let's break down these two issues with your GNOME environment. Both relate to screen management, but they are controlled by slightly different aspects.

You've correctly identified some key settings using gsettings, which points us to a GNOME desktop environment.

Issue 1: Screen Immediately Blanks on Manual Lock

  • Understanding: When you manually lock the screen (e.g., pressing Super+L, Ctrl+Alt+L, or clicking "Lock" in a menu), the system is supposed to transition to the lock screen greeter. This is the screen where you see the time, date, background image, notifications, and the password prompt. It should not immediately turn your monitor signal off (go black). The "Blank Screen Delay" setting is for inactivity, not for the immediate behavior upon manual lock.

  • Probable Cause: The most common culprits for this kind of unexpected UI behavior in GNOME are GNOME Shell Extensions . Some extensions that modify screen display, power management, or lock screen behavior can interfere.

  • Troubleshooting Steps:

    1. Disable Extensions: This is the first and most important step.
    • Install gnome-tweaks (if you don't have it): sudo apt update && sudo apt install gnome-tweaks (or equivalent for your distribution).

    • Open "Tweaks" (or GNOME Tweaks).

    • Go to the "Extensions" section.

    • Toggle off all extensions.

    • Try manually locking the screen again (Super+L).

    1. Test with a New User: Create a temporary new user account and log in. Manual lock behavior should be default for a fresh user. If it works correctly there, the issue is almost certainly in your user's configuration (like extensions).

    2. Check for Conflicting Software: Are you running any other power management tools, screen dimming software, or utilities that might interfere with the display signal upon locking?

    3. Check System Logs: After reproducing the immediate blanking, check your system logs for errors related to gnome-shell, mutter (GNOME's window manager), or gdm (GNOME Display Manager) around that time. You can often use journalctl -xe _COMM=gnome-shell or similar commands filtered by time.

Issue 2: Automatic Screen Lock Not Working

  • Understanding: You have org.gnome.desktop.screensaver lock-enabled set to true and lock-delay set to 300 seconds (5 minutes). This is the correct configuration in GNOME for enabling automatic locking after 5 minutes of inactivity.

  • Probable Cause: The system is likely being prevented from entering an idle state or from triggering the lock mechanism. This is often caused by applications or system services that inhibit idling or sleeping.

  • Troubleshooting Steps:

    1. Check systemd-inhibit: This is the most common reason automatic locking fails. Applications or services use systemd-inhibit to tell the system not to sleep, idle, or lock the screen (e.g., during video playback, presentations, file transfers).
    • Open a terminal.

    • Run the command: systemd-inhibit --list

    • Look at the output. Are there any entries listed, particularly ones inhibiting idle, sleep, suspend, hibernate, or lock? The "WHO" and "WHAT" columns might tell you which process or application is causing the inhibition.

    • If you find entries, identify the culprit application and close it, or check its settings for options like "Prevent screen blanking" or "Don't allow computer to sleep".

    1. Disable Extensions (Again): Some GNOME extensions can also interfere with inactivity detection or the lock mechanism itself. As recommended for Issue 1, disable all extensions and test if auto-locking works after 5 minutes of inactivity.

    2. Check Applications Running: Certain applications (like some media players, remote desktop clients, or presentation software) might prevent idling even without explicitly using systemd-inhibit. Close non-essential applications and test.

    3. Power Profile: While less likely to prevent locking entirely, check your power profile settings in GNOME Settings > Power. Ensure you're not on a profile that might behave unexpectedly.

    4. Test with a New User: As with Issue 1, testing with a fresh user can help determine if the issue is system-wide or configuration-specific to your user.

    5. Verify DPMS (Less Likely but Possible): While GNOME manages this, sometimes the underlying display power management signaling (DPMS) can be misconfigured, though this usually affects blanking more than locking. On X11, you could use xset q to check DPMS status. On Wayland, this is managed by the compositor (Mutter), and settings are usually via GNOME.

Summary and Next Steps:

  1. Priority 1 (Both Issues): Disable all GNOME Shell Extensions. Test both manual lock behavior (immediate blanking) and automatic lock behavior (after 5 mins inactivity). Report if either or both problems are resolved.

  2. Priority 2 (Issue 2): Run systemd-inhibit --list and see if anything is inhibiting idle or lock. Report the output if you find entries.

  3. Priority 3 (Both Issues): Test with a new user account. Report if the issues persist for a fresh user.

Once you try these steps and report back the results (especially regarding extensions and systemd-inhibit), we can narrow down the cause and provide more specific solutions. Also, mentioning your Linux distribution and GNOME version (gnome-shell --version) can be helpful.

My response:
systemd-inhibit --list
WHO UID USER PID COMM WHAT >
ModemManager 0 root 980 ModemManager sleep >
NetworkManager 0 root 965 NetworkManager sleep >
UPower 0 root 3583 upowerd sleep >
Unattended Upgrades Shutdown 0 root 1030 unattended-upgr shutdown >
GNOME Shell 1000 (username) 4072 gnome-shell sleep >
bitwarden-app 1000 (username) 4434 xdg-dbus-proxy sleep >
(username) 1000 (username) 4265 gsd-media-keys handle-power-k>
(username) 1000 (username) 4265 gsd-media-keys sleep >
(username) 1000 (username) 4268 gsd-power sleep >

Gemini response:
Okay, thank you for providing the systemd-inhibit --list output.

Looking at this list:

  • ModemManager, NetworkManager, UPower, and Unattended Upgrades Shutdown are standard system services. They typically inhibit sleep or shutdown under specific circumstances (modem/network activity, power state changes, updates). This is normal and usually doesn't interfere with screen locking or blanking due to inactivity.

  • GNOME Shell, bitwarden-app, gsd-media-keys, and gsd-power are applications or parts of the GNOME desktop environment running under your user.

  • Crucially, none of the listed items are inhibiting idle or lock. All of the listed user processes are inhibiting sleep.

What this means is that based solely on this systemd-inhibit --list output, there isn't an obvious application or service that is explicitly telling the system "do not go idle" or "do not lock the screen". The inhibits listed are primarily preventing the system from going into a full sleep/suspend state.

Therefore, the systemd-inhibit check, while important, doesn't seem to be the direct cause of your automatic locking issue in this instance.

This strongly points back to the other potential causes, particularly GNOME Shell Extensions .

Revisiting the Troubleshooting Steps:

  1. Disable All Extensions: This remains the most probable cause for both issues. Please confirm if you have tried disabling all extensions via GNOME Tweaks and tested both behaviors again:
  • Does manual lock (Super+L) still blank the screen immediately?

  • Does the screen lock automatically after 5 minutes of inactivity?

  • If disabling extensions resolves either or both issues, you can then re-enable them one by one to find the culprit.

  1. Test with a New User: If disabling extensions doesn't work, testing with a brand new user account will tell us if the problem is specific to your user's configuration files (beyond extensions) or a system-wide issue.

Let's focus on the extension disabling first, as it's the most frequent cause for these kinds of GNOME display and screen management anomalies.

I'm without my zorin test environment right now, but from my understanding;

  1. If you manually choose to lock the screen, I believe the system should do this, regardless of if you have the "Blank Screen Delay" on or off. That just disables or enables the automation of said option. If you wanted to disable the behaviour, you could just remove the keybind and never manually turn it on, and that would mean it should never turn on (there may be an option in gnome-tweaks for a more permanent disable, but would need to check). Which should also be affecting your point 2:

  2. You have a lock enabled, and a delay of 5 minutes. However, from recollection, that lock-delay is in reference to that Blank Screen Delay. So when your system were set to automatically blank, once it blanks, it would then wait 5 minutes (300 seconds) to then lock the screen.

Unfortunately, I do not currently have my test environment with me, but I think that's what is going on here. The lock-delay is set to delay when the automatic blanking is turned on.

The screen never gets locked automatically. The first issue isn't something of importance, even the second one, but those are the strange glitches, especially the system never locking up the screen after any period of inactivity.

If the screen lock after a set amount of time is set to never, this will not stop the screen from going blank if the screenlock from quick settings is selected. The privacy setting with a timeout setting is just that. Time has to elapse before the lock gets enabled. The quick settings option is for an instant lock (You need to go to the bathroom, so you go to quick settings before someone else interferes with what you are doing!) Just set the time for a minute and the screen does go blank but does not lock. Interestingly I only saw Automatic Screen lock after entering Screen Lock in search bar of Settings which took me to Privacy and Location. On selecting Screen I then found the 'automatic screen lock' switch underneath the time interval before the screen blanks and locks!

If I make the screen blank setting to never and then switch on automatic screen lock, manually selecting from quick settings locks the screen:

I doubt even you understand what you wrote :grinning_face:

I understood it just fine; but I am biased because I look over issues like this regularly.

What makes it tricky to read is that it covers two different settings for two different screen lock settings.

1 Like

I should have also wrote that on reflection, I did not see that switch in the second image until I searched for 'screenlock' in the search bar of Settings.

I have a slight feeling they overcomplicated the power settings that are found on multiple places and often changes in GUI won't function. :upside_down_face:
But...I don't have any complaints bcs at this point anything is better than Window$