Products › lamco-dsi-tools › Interfaces › ScreenSaver idle inhibitor
org.freedesktop.ScreenSaver Inhibit: Keeping a session awake
org.freedesktop.ScreenSaver Inhibit asks a desktop not to idle, lock or blank while a program runs. How it works, why runs still get locked, and how to check.
org.freedesktop.ScreenSaver is the D-Bus interface on the session bus through which a program asks the desktop not to treat the session as idle: Its Inhibit call is meant to hold off dimming, the screen saver, the lock and other consequences of idleness while, say, a video plays or a long test runs. It's the session-level counterpart to logind's idle inhibitor. lamco-dsi-tools (DSI: Desktop session interfaces) calls it during a long run, records which program owns the name and what it answered, and reads from the session's own state whether the desktop then stayed unlocked.
What it is
The interface is defined by freedesktop.org's Idle Inhibition Service specification, still marked a draft, which GNOME and KDE developers designed together. A service of the session owns the bus name org.freedesktop.ScreenSaver and implements the interface on the object /org/freedesktop/ScreenSaver. The name contains "screensaver" for compatibility: KDE implemented idle inhibition in a screen saver module first, and older KDE releases had the object at /ScreenSaver.
Inhibittakes two strings, the application's name and the reason, and returns a number, the cookie.UnInhibittakes the cookie back and ends the inhibition.- The inhibition also ends when the caller disconnects from the session bus, which usually happens when it exits.
The specification doesn't cover suspend or user switching, and what a session's service does with a request is the desktop's to decide. Sandboxed applications reach the same function through the portal's Inhibit interface, and the system-level counterpart is systemd-logind's Inhibit with idle, which by systemd's manual holds off logind's own idle action and nothing else. When a long run gets locked by the idle timer although an inhibitor was taken, there are two explanations, and the toolkit's finding SOAK-006 names both: The desktop's idle handling doesn't honor the interface that gave the lock, or something no inhibitor covers locked the session, such as a person, a lid or a policy.
Which desktops offered it
The desktop matrix has no row for this interface: dsisee observe doesn't look for it, and the nine captures don't show which desktops own the name. The README's run record has a run of the inhibitor on 2026-11-28 on KDE Plasma 6.8.2 (KWin 6.8.2), where it held off the lock for a run of 6.5 minutes.
The project's record of runs, reconciled on 2026-12-04, adds:
- The idle inhibitor, on GNOME Shell 48.7 on 2026-11-29: It took both locks it asked for, logind's and the screen saver interface's with a cookie, and gave them back. The idle delay of that machine was zero, so there was no lock to hold off.
- The idle inhibitor and the session watch against a real lock, on GNOME Shell 48.7 on 2026-11-29, with the session set for the run to go idle after 60 seconds and to lock, and put back afterwards: Without the inhibitor the session was locked and idle at 1 minute 55 seconds, and the capture beside it stopped delivering. With it the session never locked or went idle, and there were no stalls.
The record, through 2026-11-29, has no run of the inhibitor on any desktop but KWin 6.8.2 and GNOME Shell 48.7. So whether Sway or any other desktop in the set honors this call isn't something the captures show.
How to check it with lamco-dsi-tools
Only dsido touches this interface, since taking an inhibitor changes how the machine behaves. The check is to take it beside a long run and read the session's state afterwards:
dsido session inhibit --duration 12m --out inhibit.json & # take the inhibitors, hold them 12 minutes
dsisee capture observe --route portal --soak 10m --read-markers --out cast.jsonl # the long run beside it
dsitell health cast.jsonl inhibit.json # SOAK-005 and SOAK-006, with the spans
The inhibitor's capture holds, for each interface asked, the call with its arguments, whether a lock was given and what the service answered. For this one it also holds each object that was introspected and whether its own description declares Inhibit as taking two strings and answering with an unsigned number, the object that was called, and the cookie. An inhibitor_names record lists seven names that were looked up and not called (org.freedesktop.ScreenSaver, org.freedesktop.PowerManagement.Inhibit, org.gnome.SessionManager, org.gnome.ScreenSaver, org.kde.Solid.PowerManagement.PolicyAgent, org.kde.screensaver and org.xfce.ScreenSaver), each with its owner, the owner's program and whether the bus could start it. The long run's capture follows the display session, so dsitell health states each span in which the session locked, went idle or blanked, and raises SOAK-006 when one began while a lock was held.
Driving it with dsido
dsido session inhibit --duration 30m --out inhibit.json # hold the session awake for 30 minutes
dsido screen animate --soak 30m --inhibit-idle --out animate.jsonl # the same locks around an animation
dsido session inhibit calls org.freedesktop.ScreenSaver.Inhibit only where something owns the name and its object's own description declares the call, and calls nothing else of the interface but UnInhibit when it gives the lock back. It gives both locks back when it ends, on a signal too, and a process that's killed loses them with its bus connection. Captures taken meanwhile list the held inhibitor in their display_session and machine_state records.
Findings
SOAK-005: The session was locked or idle during the run.SOAK-006: The session was locked or idle although an idle inhibitor was held.SES-002: A graphical login session is locked.
Related
- systemd-logind, the session state the watch reads and the other inhibitor.
- ScreenCast portal, the long screen capture that the KWin idle lock interrupted in the README's record.
- Long runs, for the watch, the lenses and the inhibitor.
- Idle Inhibition Service, the freedesktop.org specification.