How to Stop Ubuntu From Locking the Screen (GNOME, KDE, Mint)
To stop Ubuntu from locking the screen, open Settings, Privacy & Security, Screen Lock, turn off Automatic Screen Lock and set Blank Screen Delay to Never. The same fix as gsettings commands, how to stop suspend too, how to pause the lock for one task, and the equivalents for KDE Plasma and Linux Mint.
Free tool, runs in this tab
Keep your screen awake and see when Slack sets you away
Press Start. This tab keeps the screen on while it stays open, and shows the minute Slack, Teams and Zoom would set you away if nothing touches the keyboard or mouse.
This tab cannot move your pointer or press keys, so on its own it cannot keep Slack or Teams active. It reads the same idle time the Slack desktop app, Teams and Zoom read. To test a jiggler, start, then take your hands off for 6 minutes: if Your computer stays green, the jiggler keeps them active.
- Your computerNot measured yetPress Start and allow idle detection.
- Slack desktop app-Away after 10 min, any input.
- Microsoft Teams-Away after about 5 min, any input.
- Zoom-Away after 15 min by default, any input.
On this page
To stop Ubuntu from locking the screen, open Settings, go to Privacy & Security, then Screen Lock (on Ubuntu 22.04, Privacy, then Screen). Turn off Automatic Screen Lock, and set Blank Screen Delay to Never if you also want the screen to stay on. An unlocked screen still shows you away in Slack after 10 idle minutes, and Slack Green keeps you green from a server even with the laptop closed, free for 7 days with no card. From a terminal, the same change is two commands:
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.session idle-delay 0
The first stops the lock. The second stops the screen from blanking; 0 means never, and the default is 300 seconds. We ran both on Ubuntu 24.04.5 and 22.04.5 on 3 October 2026 and read the values back; the output is below. Suspend is a separate timer under Settings, Power, covered below.
A screen that stays unlocked does not keep chat apps active. Slack turns you grey after 10 minutes without keyboard or mouse input, locked screen or not; keep Slack active on Linux explains why.
The three timers behind the Ubuntu lock screen
GNOME, the desktop on Ubuntu, runs three settings in a row. We read the defaults from the schemas that a standard Ubuntu desktop installs (gsettings-desktop-schemas, gnome-settings-daemon-common and Ubuntu's own ubuntu-settings overrides) in fresh Ubuntu 24.04.5 and 22.04.5 containers:
| Timer | Settings name | gsettings key | Default on 24.04 | Default on 22.04 |
|---|---|---|---|---|
| Screen blank | Blank Screen Delay | org.gnome.desktop.session idle-delay | 300 seconds | 300 seconds |
| Lock after blank | Automatic Screen Lock, Automatic Screen Lock Delay | org.gnome.desktop.screensaver lock-enabled, lock-delay | On, 0 seconds | On, 0 seconds |
| Lock on wake | Lock Screen on Suspend | org.gnome.desktop.screensaver ubuntu-lock-on-suspend | On | On |
| Suspend, plugged in | Automatic Suspend, Plugged In | org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout | 0 (never) | 0 (never) |
| Suspend, on battery | Automatic Suspend, On Battery Power | sleep-inactive-battery-timeout | 900 seconds | 1,200 seconds |
So out of the box, a Ubuntu 24.04 laptop on battery blanks and locks at 5 minutes and suspends at 15. Plugged in, it locks at 5 minutes and never suspends. Upstream GNOME suspends on AC power too (after 900 seconds in GNOME 46); Ubuntu's override sets that timeout to 0.
The lock follows the blank. If Automatic Screen Lock is off, the screen goes dark after the idle delay but comes back without a password when you move the mouse. That is the answer if you want the screen to turn off without locking. If you want the screen on the whole time, set the blank delay to Never as well.
Stop Ubuntu from locking with gsettings
These commands change the current user's settings and take effect at once, with no reboot:
# stop the automatic lock
gsettings set org.gnome.desktop.screensaver lock-enabled false
# never blank the screen (value in seconds, 0 = never)
gsettings set org.gnome.desktop.session idle-delay 0
# do not ask for a password after suspend (Ubuntu only key)
gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false
# check the current values
gsettings get org.gnome.desktop.screensaver lock-enabled
gsettings get org.gnome.desktop.session idle-delay
To keep the lock but make it later, leave lock-enabled on and raise idle-delay, for example 900 for 15 minutes. lock-delay adds seconds between the blank and the lock.
An Ubuntu screen that never locks still shows you away in Slack 10 minutes after your last keyboard or mouse input. A server-side tool keeps your Slack dot green with no input, even while the laptop sleeps or the lid is closed.
To undo everything:
gsettings reset org.gnome.desktop.screensaver lock-enabled
gsettings reset org.gnome.desktop.session idle-delay
What the commands did in our test
We ran the three set commands as a normal user in each container, then read the values back and dumped what dconf stored. Ubuntu 24.04.5 printed:
$ gsettings get org.gnome.desktop.screensaver lock-enabled
false
$ gsettings get org.gnome.desktop.session idle-delay
uint32 0
$ dconf dump /org/gnome/desktop/
[screensaver]
lock-enabled=false
ubuntu-lock-on-suspend=false
[session]
idle-delay=uint32 0
Ubuntu 22.04.5 gave the same output. The values live in your user's dconf database (~/.config/dconf/user), which is why they survive a reboot and do not affect other accounts. idle-delay is an unsigned number, so gsettings set org.gnome.desktop.session idle-delay -1 fails with "number out of range for type 'u'"; use 0 for never. gsettings reset put both keys back to true and uint32 300.
The test ran in containers, so it shows the settings layer, not GNOME Shell drawing the lock screen. GNOME Shell reads these same keys.
Stop Ubuntu from sleeping as well
A suspended computer always wakes to the lock screen if lock on suspend is on, so stop suspend too if you step away for long. On Ubuntu, plugged in already means no suspend (timeout 0, from the table above); on battery the default is 15 minutes on 24.04 and 20 on 22.04. In Settings, Power, turn Automatic Suspend off for On Battery Power if you want that too. From a terminal:
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'nothing'
Closing the laptop lid is handled by the system, not GNOME. Ubuntu suspends on lid close by default; HandleLidSwitch in /etc/systemd/logind.conf controls it.
Pause the lock for one task only
To keep the screen awake while a download, a video or a long build runs, without changing settings, wrap the command in gnome-session-inhibit. The inhibit is removed when the command exits:
# keep the session from going idle for one hour
gnome-session-inhibit --inhibit idle --reason "long build" sleep 3600
# keep it awake while a script runs, and block suspend too
gnome-session-inhibit --inhibit idle --inhibit suspend ./long-job.sh
gnome-session-inhibit --list shows which apps hold an inhibit right now. Video players and browsers playing full-screen video take one on their own, which is why the screen stays on during a film. The GNOME Shell extension Caffeine adds a top-bar toggle that does the same thing; install steps and settings are in Caffeine GNOME extension. If an app also needs to see input, a short xdotool or ydotool loop does that; see mouse jiggler for Linux.
KDE Plasma and Linux Mint
KDE Plasma (Kubuntu, KDE neon, Fedora KDE). Open System Settings, Screen Locking, and set Lock screen automatically to Never. Turn off After waking from sleep if you want no password after suspend. Screen dimming and sleep are under Power Management (Energy Saving on Plasma 5). From a terminal on Plasma 6 (use kwriteconfig5 on Plasma 5):
kwriteconfig6 --file kscreenlockerrc --group Daemon --key Autolock false
kwriteconfig6 --file kscreenlockerrc --group Daemon --key LockOnResume false
Linux Mint (Cinnamon). Open System Settings, Screensaver. Set Delay before starting the screensaver to Never, and turn off Lock the computer after the screensaver starts and Lock the computer when put to sleep. From a terminal:
gsettings set org.cinnamon.desktop.screensaver lock-enabled false
gsettings set org.cinnamon.desktop.session idle-delay 0
When the lock comes back anyway
- • Your company locked the setting. Managed Linux laptops can pin these keys with a dconf lock. Check with
gsettings writable org.gnome.desktop.screensaver lock-enabled. If it printsfalse, the value is set by policy and only IT can change it. We reproduced this by adding a lock file under/etc/dconf/db/local.d/locks/and runningdconf update. After that,gsettings writableprintedfalse, andgsettings set ... lock-enabled falseprinted "The key is not writable" and exited with code 1, whileidle-delaystayed writable. So a policy can force the lock even when you are allowed to change the blank delay. - • A second user or remote session. Switching users, or signing in over RDP, locks the local screen by design.
- • The lid. Closing the lid suspends the laptop and locks it on wake, whatever the idle timers say.
- • It is a different machine. The same question on other systems: how to stop Windows 11 from locking and keep a Mac screen from locking.
If the goal is to stay green in work chat while you step away, an unlocked screen is not enough, because Slack needs input, not only an awake screen. What does work is in how to keep Slack active.
FAQ
How do I disable the password on the Ubuntu lock screen?
You cannot keep the lock screen and drop its password. Turn off Automatic Screen Lock and Lock Screen on Suspend instead; the screen still blanks but wakes straight to your desktop. Signing in at boot without a password is a separate setting, Automatic Login, under Settings, System, Users on 24.04.
Do these commands work over SSH?
Not as typed. In our test, a shell with no session bus, which is what a plain SSH login gives you, printed "failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY", exited with code 0, and left lock-enabled at true. So check the warning, not the exit code. Run the command as the desktop user with the session bus set, and it sticks:
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus gsettings set org.gnome.desktop.screensaver lock-enabled false
That needs the user to be logged in to the desktop, because the bus at /run/user/<uid>/bus exists only during a session.
Related Articles
Caffeine GNOME Extension: Keep Ubuntu and Fedora Awake
Caffeine is a GNOME Shell extension that adds a coffee-cup toggle to Quick Settings. While it is on, GNOME does not blank the screen, lock or suspend. It has a 15, 30 or 60 minute timer, turns on by itself for fullscreen apps, and can follow chosen apps. How to install it on Ubuntu and Fedora, every setting and its default, command-line control, and what to use without an extension.
Mouse Jiggler for Linux: Free xdotool and ydotool Scripts
The free Linux mouse jiggler is a short loop: xdotool on X11 or ydotool on Wayland moves the pointer 1 pixel and back every minute. If you only need the screen to stay on, an inhibitor is cleaner. The Slack desktop app counts the movement anywhere on screen.
How to Stop Windows 11 From Locking Itself
Windows 11 locks itself for one of six reasons: the sign-in-on-wake setting, a short screen timeout, Dynamic lock, presence sensing, a secure screen saver, or a company policy. How to find which one it is, turn it off, and what to do when the setting is greyed out.