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:
- 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).
-
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).
-
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?
-
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:
- 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".
-
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.
-
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.
-
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.
-
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.
-
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:
-
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.
-
Priority 2 (Issue 2): Run systemd-inhibit --list and see if anything is inhibiting idle or lock. Report the output if you find entries.
-
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:
- 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.
- 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.