Galaxy Shell / docs
Docs / Interface and features

Display off when idle

openspec/specs/idle-display-off/spec.md · Edit on GitHub ↗

On this page

Display off when idle

Purpose

Turns every driven output off after a protected idle time with no user input, stops the render loop, and turns the displays on again at the first input.

Requirements

Requirement: Protected setting idleDisplayOff

Only the protected settings SHALL set idleDisplayOff (seconds from a closed list, 0 for never, 600 by default) through /api/idle-display-off; the core SHALL own the value and the default. Full text: section Binding contract (from AGENTS.md).

Scenario: Saved value outside the list

  • WHEN a saved value is not in the closed list
  • THEN it means never, so a broken value never blanks a screen

Scenario: Existing profile

  • WHEN a profile has no saved value
  • THEN it gets the default 600 at the first login with the feature

Requirement: Compositor starts with no time

The core SHALL send the compositor command idle_display_off (capabilities.idleDisplayOff), also while locked; the compositor SHALL start with no time, read no file and no gsettings key for it, and turn nothing off until a core set a time. Full text: section Binding contract (from AGENTS.md).

Scenario: Older core

  • WHEN the compositor never received idle_display_off
  • THEN nothing turns off, locked or not

Requirement: Turn off after the idle time

With a time set, every output SHALL turn off after that time with no input of a device, and after 30 seconds once a lock is confirmed, whatever the time. Full text: section Binding contract (from AGENTS.md).

Scenario: Nunca while locked

  • WHEN the setting is Nunca and a lock is confirmed
  • THEN the display still turns off after 30 seconds with no input

Requirement: Only device input resets the clock and wakes

Only input of a device SHALL reset the idle clock and wake the display (in a nested run, its synthetic input); the event that wakes, the events of the 500 ms after it and the end of a press that was dropped MUST NOT be delivered. Full text: section Binding contract (from AGENTS.md).

Scenario: Wake click

  • WHEN the display is off and the user clicks
  • THEN the click wakes the display and does not reach any client

Scenario: Client activity

  • WHEN a client commits a frame or a tool command arrives on the control socket
  • THEN the idle clock does not reset

Requirement: Idle inhibitors

An idle inhibitor (zwp_idle_inhibit_manager_v1) SHALL hold the display on only while its window shows on an output and the session is unlocked, and an inhibitor of a window of the shell host process MUST NOT count, so generated HTML holds nothing. An application window that the agent opened counts as any application window does; that is an accepted limit. Full text: section Binding contract (from AGENTS.md).

Scenario: Inhibitor on a hidden workspace

  • WHEN the window of an inhibitor is on a hidden workspace or minimized
  • THEN it holds nothing

Requirement: No agent or generated reach

No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel SHALL reach the setting, the route or the command, report activity, turn the display off or on, or hold it on; a response in progress and an approval that waits do neither. Full text: section Binding contract (from AGENTS.md).

Scenario: Long turn while away

  • WHEN a response is in progress and the user is away
  • THEN the display still turns off after the idle time

Requirement: Capture of an output while off

A capture of an output MUST fail with "Display is off" while the display is off, whether pending when it turned off or asked for while off; a window capture still runs offscreen. Full text: section Binding contract (from AGENTS.md).

Scenario: Output capture

  • WHEN a capture of an output is asked for while off
  • THEN it fails with "Display is off"

Requirement: A failed turn-off never ends the session

A failure to turn the outputs off MUST NOT end the session; a frame that fails in the five seconds after a wake SHALL be tried again, and outputs that showed no frame by then SHALL go back to off until the next input. Full text: section Binding contract (from AGENTS.md).

Scenario: Monitor slow to wake

  • WHEN a monitor refuses frames after the wake for five seconds
  • THEN the outputs go back to off and the next input tries again, and the session stays

Requirement: Hotplug while off

A hotplug while the display is off SHALL wait for the wake and five more seconds, and a hotplug MUST NOT wake the display. Full text: section Binding contract (from AGENTS.md).

Scenario: Monitor disconnects in standby

  • WHEN a monitor reports a disconnect while off
  • THEN the probe is deferred and windows stay in place

Requirement: Display off, not lock or suspend

The feature SHALL turn the displays off only; it MUST NOT lock, suspend or dim. Full text: section What it does.

Scenario: Idle time passes

  • WHEN the idle time passes with no input
  • THEN the displays turn off and no lock, suspend or dim happens

Requirement: Wake draws the current state

The first input SHALL turn the outputs on and draw a fresh frame of the current state, never a frame from before a lock that happened while off. Full text: section 3. Turning on.

Scenario: Lock while off

  • WHEN the session locked while the display was off and the display wakes
  • THEN the first frame is the lock content or black

Requirement: Lock while off confirms without waking

A lock that starts while the display is off SHALL still confirm without waking the display, counting each output that is really off as shown. Full text: section 4. The cases around it.

Scenario: Lock while off

  • WHEN a lock starts while the outputs are off
  • THEN the lock confirms with no frame

Requirement: Setting is a closed list with no gsettings

The route POST /api/idle-display-off SHALL take the shell token and exactly the key seconds; the command accepts 0 or 10 to 86400 seconds, and gsettings idle-delay MUST NOT be read or written. Full text: section 7. The protected setting.

Scenario: Extra key

  • WHEN the route receives a key other than seconds
  • THEN it is refused

Requirement: Inhibitor details

Only a window with an xdg toplevel SHALL count as an inhibitor through its root surface, full screen alone MUST NOT be an inhibitor, and the state SHALL report only a count of live inhibitors. Full text: section 5. Inhibition.

Scenario: Full-screen terminal

  • WHEN a terminal is full screen with no inhibitor
  • THEN the display still blanks

Status

Doc status: current contract. Phases 1 and 2 were built and published to main on 2026-11-11 (291ce60b to 7abb6b18) and take effect at the next login. Phase 3 is not done: the owner skipped the physical test on 2026-11-11 ("vou pular o teste de desligamento, se eu testar e nao funcionar eu volto nisso"), so a failure on the real monitors comes back as a new report. Not proven: every physical item of the section Tests (a real monitor in standby, the wake modeset, two monitors, a VT switch, a suspend). Phase 4 is a proposal. Checked 2026-11-11.

Status

The owner asked on 2026-11-11 (Portuguese, quoted): "porque o monitor não desliga?" and then "Sim, planejar". The plan of that day listed ten decisions; the owner took them the same day (section Decisions) and released phases 1 and 2. Publishing, the build, the next login and the check on the real monitors are separate steps; see Phases.

Why the monitor stayed on

Nothing counted idle time and nothing turned a display off:

  • The compositor (native/smithay/src) had no ext-idle-notify-v1, no zwp_idle_inhibit_manager_v1, no wlr-output-power-management and no DPMS or CRTC disable.
  • No idle daemon runs in the session (no gsd-power, swayidle or hypridle), and none could act: there was no protocol for it to listen on or to switch an output with.
  • lock-screen.md (Limits and decisions) leaves "Idle timeout, lock on suspend and user switching" out of its work, and the core has no idle lock.
  • The DRM backend draws all the time: a 16 ms timer calls Backend::render, and each page flip event of the primary output draws the next frame at once. So turning the display off also has to stop this cycle.

One part existed already: Compositor::process_input_event stamps desktop.last_input on every input event that is not a device change, for the user_active limit of an agent fit, and the state reports it as lastInputMs. The idle clock reads the same stamp.

What it does

After a set time with no input from the user, the compositor turns every driven output off: the monitors go to standby, the render loop stops and no client gets a frame callback. The first input turns them on again and draws a fresh frame of the current state. The time is a protected setting, 10 minutes by default; "Nunca" keeps the display on. A locked session turns the display off after 30 seconds, whatever the setting. A window that asks for it (a video player) keeps the display on while it shows.

It does not lock, suspend or dim. A future idle lock can build on the same clock (see Idle lock later).

Design

1. Who counts idle time

The compositor counts, because it owns the input. native/smithay/src/idle.rs holds the clock and its rules with no I/O and an injected time, as hot_corners.rs does. IdleDisplay::tick runs on the control timer (control_tick in ipc.rs, every 30 ms, on every backend) with the time of the last input (desktop.last_input), whether a lock is confirmed and the count of live inhibitors, and it decides off. Each backend follows that value.

What resets the clock:

  • Every event that reaches process_input_event except DeviceAdded and DeviceRemoved: keys, pointer motion, buttons, scroll, gestures and switches (a lid).
  • The return to the VT of the session (SessionEvent::ActivateSession): the user pressed keys on another VT that this compositor did not see.
  • A live inhibitor, and so its end: the time counts from the later of the last input and the last moment an inhibitor was live. A video that ends does not blank the screen in the same second.
  • A new time from the core, a confirmed lock, an unlock, a wake, and a failure to turn the outputs off.

What does not reset it:

  • Anything a client does: a commit, a new window, a title change, a notification, a tray change.
  • Anything else on the control socket: agent tools, core commands, a scheduled turn, a capture request.
  • A pointer move that the compositor makes itself, a hotplug and a device change.

Synthetic input: on the direct session the test_input command is refused (Test input needs the nested backend, nested-qa.md), so only real devices count there. In the nested backends the synthetic input is the only input there is, and it counts; a synthetic motion step, which skips process_input_event, meets the clock in apply_steps. That is what lets a nested QA run prove the clock, the wake and the dropped event. No path gives a client or the core a way to report activity.

One clock serves the whole seat: every output turns off and on together.

2. Turning off

Mechanism: DrmSurface::clear() of Smithay 0.7.0 (backend/drm/surface/mod.rs), reached as head.surface.surface().clear() on the GbmBufferedSurface of each Head. On an atomic device it commits, with ALLOW_MODESET, the reset of the planes, the connectors and the CRTC (surface/atomic.rs, clear_state), which is ACTIVE off with no mode; on a legacy device it sets the connector property DPMS to off. Smithay documents that "the surface will be re-enabled on the next page_flip or commit", and the code agrees: clear empties the current state, so commit_pending() is true and the next GbmBufferedSurface::submit takes the commit branch, a modeset with the kept mode and connector. No Smithay patch and no raw DRM property code is needed.

The Backend of drm.rs has a field scanout (idle::Scanout: On, Stopping, Off), a sibling of active, and Backend::follow_idle moves it on every 16 ms tick through the pure Scanout::step, which has its unit test:

  • On to Stopping when the clock says off. From then render_primary and render_extra return early, exactly where they return for an inactive VT, so no scene is drawn, no buffer is taken and no send_frame goes out. The clients stop drawing, as they do during a VT switch and as the wallpaper does when covered.
  • Stopping to Off once no head has a page flip in flight: every head is cleared. So the outputs turn off between two frames.
  • A failed clear is logged, the buffers are reset, the display stays on and the clock waits one more time. Turning off never ends the session.
  • While not On, the tick does what a frame does besides drawing: space.refresh, the popup cleanup and the flush of the client events (idle_housekeeping), and the offscreen work of the renderer. So a theme check, a workspace preview and a window capture still run with the display off; only a capture of an output has no frame to read (see Capture).
  • The 16 ms timer keeps running, because it also answers dmabuf imports and sweeps holds. With nothing to draw its cost is small. Slowing it while off is a measured follow-up.

3. Turning on

Any input event while off wakes. follow_idle sees it on the next tick: reset_buffers() runs (buffer ages start again, so the first frame is a full redraw), scanout is On, a deferred hotplug probe runs (see Hotplug), and the frame of that tick is the modeset commit that lights each CRTC.

The frame after a wake is always drawn from the state of that moment. If the session locked while the display was off, the first frame is the lock content or black, never a frame from before the lock: the CRTC was disabled, the old buffers are reset, and the lock is read at draw time.

The wake event is not delivered. The user cannot see what a click or an Enter would hit, and in this system it could hit the armed button of an approval dialog or of the change review card. The rule (IdleDisplay::input, called at the top of process_input_event):

  • The event that wakes is dropped before the seat sees it, and so is every event of the 500 ms after it (WAKE_GRACE): the modeset takes about that long, and the user saw nothing yet. The panel itself needs one to three seconds to leave standby; that part is hardware, and the compositor cannot observe it.
  • A key, a button or a gesture whose start was dropped has its end dropped too, whenever it comes, so no client sees a release without a press.
  • A release whose press was delivered before the display turned off is delivered, also when it is the event that wakes, so no client keeps a key down.
  • A dropped event still stamps last_input.
  • This includes the VT switch keys: the first press wakes, the second switches.
  • An event with no pair (a scroll, a lid switch) that wakes is dropped too. The compositor handles no touch and no tablet tool, so none of their events is paired.
  • Under a lock the same holds: the first key after a wake and the keys of the next 500 ms do not reach the password field, so a password typed at once into a dark screen arrives short and is refused.

A monitor that leaves standby can refuse the modeset, or a frame after it, until its link is ready, so the rule after a wake counts time and not tries (idle::Wake, with unit tests). For five seconds after a wake (idle::WAKE_SETTLE) a frame of the primary output that fails, from the timer or from the page flip event, is tried again every 250 ms with the buffers of that output reset. If the five seconds end and no frame reached the screen since the wake, the outputs go back to off and the clock is off again: the next input wakes them and tries for five more seconds, and the session stays. They go back to off only when every head cleared, because off counts as hiding every output and a lock while off is confirmed with no frame; if a head refuses to clear (an extra output that woke may still show the desktop), the outputs stay on, the wake starts again with five more seconds of tries, and a lock waits for a real frame as it does whenever the outputs are on (found by the automated security review of the push of b626894d, 2026-11-11). Only a failure after frames were shown and the five seconds passed follows the existing rule of a failed render ("DRM rendering failed; returning to login"). So a wake by itself never ends the session; a monitor that never comes back leaves a black screen, and a VT switch away and back stays a manual way out: ActivateSession activates the device again and resets every head.

4. The cases around it

Extra outputs. Every head is cleared and woken with the primary one. Inside the five seconds after a wake a frame of an extra output that fails is tried again too, and the output keeps its windows; after them the existing rule applies: the output is dropped and its windows return to the primary output.

Hotplug. Some monitors, mostly on DisplayPort, report a disconnect when they enter standby. A disconnect of an extra output moves its windows to the primary output, and a disconnect of the primary connector ends the session. Neither may happen because the screen went to sleep. So while scanout is not On, hotplug() only sets hotplug_pending and returns, as it does for an inactive VT. The probe does not run at the wake itself: such a monitor reports the connection again only after the modeset lit its CRTC, so the probe waits five seconds after the wake (idle::WAKE_SETTLE), and a change event inside those seconds waits with it. Whenever the outputs draw again and a probe is pending, it runs, also after a stop that the clock took back. A monitor that is really unplugged while off is handled at the wake; one plugged in while off lights at the wake. A hotplug does not wake the display, or a monitor that drops its link in standby would wake it in a loop.

VT switch. PauseSession while off needs nothing. ActivateSession counts as activity and wakes (IdleDisplay::resume).

Lock. Once a lock is confirmed the time is 30 seconds (idle::LOCKED) with no input, whatever the setting; an input while locked wakes the display and starts the 30 seconds again, and the unlock returns to the time of the setting, counted from the unlock. This holds for "Nunca" too: the owner chose the 30 seconds for the lock itself, and a locked screen that stays lit for ever serves nobody. It needs a core that set a time at least once: a compositor that never got idle_display_off turns nothing off, locked or not. The lock content gets the input after the wake as for any input while locked; the wake event itself is dropped. Inhibitors do not count under a lock, which hides every window.

A lock that starts while the display is off must still confirm: a protocol lock client hears locked only after every driven output showed a frame without regular content. An output that is off shows no content, so the tick counts each one as shown (idle_lock_shown), only once the outputs are really off. Waking the display to confirm would light the screen for a future idle lock. The restart marker and the fallback rule of the lock do not change.

Capture and screenshots. No output draws a frame while off, so a capture of an output would wait and keep the capture slot. The control tick ends it with the error "Display is off", whether it was pending when the display turned off or was asked for while off. A user screenshot starts from user input, which wakes first, so the user never meets this. A window capture renders offscreen and still runs.

Work that waits for a frame. The Electron host stops drawing while it gets no frame callback. The core is a Node process and keeps running: a turn continues, tools run, schedules fire. Host work that may wait for a frame, mainly the profile CSS validation of replace_ui, is checked in nested QA; see Verification.

Suspend. A suspend from the quick settings is the work of logind and is not changed. If the machine suspends with the display off, the display stays off after the resume until the first input that libinput delivers. Proven only on hardware.

Nested backends. They have no CRTC. The nested wgpu backends (the headless buffer and the wgpu window, Headless::redraw in wgpu_output.rs) follow the clock by skipping the draw and the frame callbacks, with the same housekeeping, offscreen work and lock confirmation. The state reports idleDisplay.off, so a run can assert it. A nested run turns no real monitor off, and the wgpu window keeps showing its last frame.

5. Inhibition

zwp_idle_inhibit_manager_v1 through Smithay (wayland::idle_inhibit; the handler is in idle.rs). Without it a film blanks after the time. The rules (live_idle_inhibitors):

  • An inhibitor counts only while its surface is alive and belongs to a window that an output draws: on a workspace that an output shows, not minimized, and not while the session is locked. This is what the protocol asks for, and it stops a window on a hidden workspace from keeping the screen on for ever.
  • Inhibitors from the windows of the shell host process do not count (desktop::trusted, the client that the core registered with lock_host). Without this rule, generated HTML in an inline frame could hold the display on through a video element or the Wake Lock API of Chromium, which would give generated HTML a lever on a protected behavior.
  • Trust needs a registered host. While no host is registered (the core is gone or has not connected yet) no window is trusted, so an inhibitor of a host window counts in that time. Accepted: the compositor learns the host process only from that registration.
  • Only a window with an xdg toplevel counts, through its root surface. An inhibitor on a popup, on a lock surface or on any other surface holds nothing.
  • Full screen alone is not an inhibitor. A full-screen terminal still blanks.
  • The state reports only a count of live inhibitors, no surface and no application.

The core during a response or an approval. Neither holds the display on, and a new approval does not wake it (decision 4). A long turn while the user is away is exactly when the screen should sleep, and the turn does not need the display; the dialog is still there at the wake. No command lets the core hold the display on.

D-Bus inhibitors. Some applications ask through org.freedesktop.ScreenSaver.Inhibit or the portal instead of Wayland. Not built; it gets its own decision when an application needs it.

6. ext-idle-notify-v1 and an idle lock later

Phase 4, not built. Smithay has it ready (wayland::idle_notify). It lets a client such as swayidle, a chat application that sets "away", or a future locker hear idle and resume with its own timeout. It gives clients no control over the display.

An idle lock is not part of this work, and nothing here closes the door on it:

  • The clock is one module with one stamp, so a second stage ("lock after N minutes") is a second deadline, not a second mechanism.
  • The order lock, then off, works: a lock while off confirms without waking, and the wake always draws the current state.
  • The lock stays decided by the core after its own rules (lock-screen.md); the compositor would only report idle, in the state or through ext-idle-notify-v1.

wlr-output-power-management is not proposed: it lets any client turn the outputs off and on, and nothing here needs it.

7. The protected setting

The pattern of hot corners (hot-corners.md, One place for the setting):

  • idleDisplayOff in state.json of the profile: a number of seconds from a closed list, 0 (Nunca), 60, 120, 300, 600, 900, 1800, 3600. The core owns the value and the default, 600. A saved value that is not in the list means never, so a broken value never blanks a screen. The code is web-shell/core/idle-display.js.
  • Route: POST /api/idle-display-off with the shell token and exactly the key seconds, beside /api/hot-corners. /api/state reports idleDisplayOff and idleDisplayOffChoices, the list with its labels.
  • Compositor command on the control socket: {"action": "idle_display_off", "seconds": N}, with 0 or 10 to 86400. The compositor starts with no time, reads no file and no gsettings key, and has no default of its own, so with an older core, or before the core connects, nothing turns off. It reports idleDisplay (seconds, null until a core set it; lockedSeconds; off; inhibitors) in its state and capabilities.idleDisplayOff. The core sends the value after each connect and while the compositor reports another one, so also 0 to a compositor that just started. Unlike hot_corners, the command is accepted while locked and the core sends it then: it moves nothing, and a core that restarts behind a lock still gives the lock its 30 seconds. The value stays for the life of the compositor process with no lease: the display must also sleep and wake with the core gone.
  • The range of the compositor is wider than the list of the core only so that a nested QA run can send 10 seconds to its own private socket. The live value comes only from the core.
  • protocol/control.json lists the command and the capability, with its three contract tests.
  • Settings: a section "Tela" in the Janelas tab of vendor/interface/ui-src/host/settings.jsx, one select "Desligar a tela após" with "Nunca" and the times and a line about the 30 seconds of the lock, built from the existing shadcn/ui Select, shown only with the capability. No new component and no new shortcut, so contextual-actions.md does not change.
  • gsettings (org.gnome.desktop.session idle-delay) is neither read nor written, for the reasons the owner accepted for hot corners.

An existing profile has no saved value and gets the default at the first login with the feature.

As for every consent flow, the boundary binds the agent tools and generated HTML. It is advisory against code that already runs as the user: execute_command can write to the private control socket (self-maintenance.md, What a job can still reach).

The GLES removal

The work depends on no GLES code and runs on the wgpu renderer alone (gles-removal-plan.md):

  • Turning off and on acts on Head.surface (GbmBufferedSurface and its DrmSurface), which is the KMS side below both renderers. Nothing in a shader is touched or needed. (Until step 8 of the GLES removal, 2026-11-11, drm.rs had a GLES arm and effect_pipeline.rs existed; both are gone.)
  • The nested side is only in the wgpu backends of wgpu_output.rs. headless.rs (the GLES arm) and winit.rs got nothing, because step 8 deleted them (2026-11-11), so every nested backend now has it.
  • capture.fail is renderer-independent.
  • Step 8 also edits drm.rs. The rules live in idle.rs; drm.rs has the two fields, follow_idle, the two early returns, the retry in render, the hotplug condition and the line of the VT return, away from the lines that step 8 deletes.
  • What is specific to wgpu and proven only on hardware: the wake after reset_buffers() with the in-fence path (plane_in_fence, Head::in_fence, Head::held) on Vulkan and on wgpu's OpenGL backend. The VT return uses the same reset.

Phases

Each phase is one change with its gates. The compositor part takes effect at the next login; the core and host part at the next login or the documented host and core maintenance. Nothing was activated in the session in use by this work.

Phase Content Effect alone
1 Compositor: idle.rs, follow_idle in drm.rs, the nested wgpu backends, the dropped wake event, the deferred hotplug, the lock confirmation while off, the capture error, zwp_idle_inhibit_manager_v1 with its two rules, the command, the state field, the capability None: the compositor starts with no time and no core sends one
2 Core and host: core/idle-display.js, the route, the sync, /api/state, the settings section, the AGENTS.md line and the binding contract here The feature, with the default of 10 minutes
3 The owner's physical login (see Tests). Fixes from it Proof on the real monitors
4 Not built, each on its own decision: ext-idle-notify-v1; a "Desligar tela" control in the quick settings; the D-Bus inhibitor; the slower timer while off

Phases 1 and 2 are safe in either order of activation because of the capability, as for hot corners: an older core sends nothing, and with an older compositor the core sends nothing and hides the section. By decision 10 the core and host are published before the physical test.

Tests

Unit, idle.rs with an injected time: nothing before a core sets the time; the range of the command; off at the time; never; an input moves the deadline; a new time counts from its change; an inhibitor holds and its end starts the time again; the 30 seconds of a lock, also with never; an input while locked; the unlock; the dropped wake event with its release; the grace; a release whose press was delivered; a gesture; the VT return and a failure. Also the transitions of Scanout::step, and Wake: failures for the whole settle time are tries and then off again, a failure at the page flip after a shown frame is a try, and outputs that did not wake are woken by the next input.

Compositor harness (idle_tests.rs): the state and the capability, the command and its refusal; the key that wakes reaches no client and the next one does; a synthetic motion that wakes moves no pointer; a lock while off confirms without a frame and the wake key reaches nothing; a locked session turns off after 30 seconds with never; a lock with no time of the core never turns off; an inhibitor counts on the shown workspace and not minimized, on a hidden workspace or under a lock, and its end starts the time again; an inhibitor of a shell host window does not count. A capture of an output fails with "Display is off", pending or asked for while off, and a window capture stays for the renderer. The command is in the locked allow list test of desktop.rs and in protocol_manifest_tests.rs.

Core and host (web-shell/test): idle-display.test.js and idle-display-http.test.js; see Verification.

Only a physical login proves (phase 3, by the owner, with the time set to 1 minute):

  • Both monitors really go to standby (primary 1920x1080 on card1 and HDMI-A-1) and both come back, on wgpu with Vulkan, and once with the OpenGL backend of wgpu if the owner still uses it.
  • The wake modeset succeeds and its delay is acceptable; the pointer and the windows of the second monitor are where they were.
  • Whether a monitor reports a disconnect in standby, and that the deferred probe then keeps the windows in place and keeps the session.
  • A VT switch while off and back; a suspend and resume while off; a lid, if the machine has one.
  • The real Electron host after a long time off: the chat, the bars, the clock and a turn that ran meanwhile are right after the wake.
  • A video in a real browser and in a real player holds the display on.
  • The lock: Super+L, 30 seconds, wake, unlock with the real password.

Verification

Of 2026-11-11, on the branch, before any publication:

  • Rust gates: cargo fmt --check, Clippy with -D warnings and the tests for --features session (952 passed after the rebase) and for --features session,wgpu-renderer (994 passed), and the check of the wgpu tests.
  • Web shell: the format check, lint, the build check and the tests (1622 passed, 5 skipped). Python suite in a clean environment: 268 passed.
  • Nested QA (nested-qa.md), headless, the wgpu renderer on Vulkan, one output, synthetic data, no provider, two runs:
    • The default of 600 reached the compositor at the connect. The section "Tela" shows in the Janelas tab with "10 minutos", and the choice "1 minuto" changed idleDisplay.seconds to 60.
    • After 63 seconds with no input idleDisplay.off was true, and a capture of the output failed with "Display is off".
    • A key woke the display and did not reach the composer: with "ab" typed before, x as the wake key and then "yz", the composer showed "abyz". A click on "Continuar" as the wake event did not press it and did not move the pointer; the same click again went to step 2.
    • A lock sent to the private socket of the run while the display was off (no input): the state went to locked with panelReady true and the display still off, so the lock confirmed without a frame and the Electron host opened and mapped its lock window with no frame callback.
    • Under the lock the display turned off again after 30 seconds with a setting of 60 seconds, and in the second run with 600; a key woke it, and after it the display was on at 25 seconds and off at 33.
  • Review, round 1 (a code reviewer and a security auditor, both read-only): the security boundary passed with no finding above low. One high finding of the code review was fixed: the deferred hotplug probe ran in the tick of the wake, before the modeset, so a monitor that reports a disconnect in standby would still have read as disconnected, and the probe now waits five seconds. Also fixed: a probe deferred during a stop that the clock took back was never run; the transitions moved into the pure Scanout::step with a unit test; a harness test for the capture error; dead inhibitor surfaces leave the list. The low findings that stay are in Risks and in the rule of the wake event.
  • Review by the coordinating session (2026-11-11, one medium finding, fixed in its own commit): the tries after a wake were three ticks of 16 ms, so a monitor whose link needs longer would have ended the session at the wake, and the page flip path had no try at all. The rule now counts time, as described under Turning on, also for the frames of an extra output.
  • Not run in a nested run:
    • replace_ui with the display off. The run has no provider, and the only callers of the profile CSS validation are MCP tools, whose bearer token exists only inside the core. What stands in for it: the validation of the host (previewProfileStyle in host/host.js) waits on a 250 ms timer and on requests to the core, and the poll that starts it is a 600 ms interval, none of them tied to a frame; and the lock case above shows the host working with no frame callback. A turn that calls replace_ui with the display off needs the user and the provider.
    • "Nunca" with the lock: the choice did not register in the second run (the click missed the select), so the 30 seconds were seen with 60 and 600 seconds only. The unit and harness tests cover "Nunca".
    • An idle inhibitor of a real application: the machine has no client for it (no mpv). The harness tests cover the rules with a real protocol client.
    • Everything of the list "Only a physical login proves".

Rollback

  • In use: set "Nunca". The display then turns off only under a lock.
  • Across versions: the capability keeps an older core or an older compositor inert in both directions. An older core ignores the key idleDisplayOff in state.json, so a code rollback needs no profile change.
  • In code: each phase is one revert. Phase 1 alone has no effect, so a revert of phase 2 is enough to take the feature away.
  • If a wake ever fails on the owner's machine: a VT switch away and back re-activates the device; if that also fails, the existing failure rule returns to the login screen, and the supervisor's recovery is unchanged.

Risks

  • A wake that fails on real hardware leaves a black screen on the desktop in use, with the session alive. Mitigations: the five seconds of tries on every input, the VT switch, phase 3 before the owner relies on it, and "Nunca".
  • A monitor that disconnects in standby. Covered by the deferred probe; proven only in phase 3.
  • An application that the agent opens (open_application) can hold the display on with an inhibitor while its window shows, as any application can. It ends under a lock and when the user closes the window. This is an accepted limit of the boundary, of the same class as execute_command.
  • An application that never releases its inhibitor holds the display on while its window shows. The count in the state makes it visible; naming the application in the settings is a later choice.
  • An application that inhibits only through D-Bus does not hold the display on.
  • The 16 ms timer while off still wakes the CPU 60 times a second. Small, and measured before any change.
  • DrmSurface::clear on the legacy (non-atomic) path only sets the connector DPMS property. The owner's GPU is atomic; the legacy path is not proven by anything here.

Out of scope

Idle lock, lock on suspend, automatic suspend, dimming before the blank, per-output idle, a different time on battery, wlr-output-power-management, and reading or writing GNOME settings.

Decisions

Taken by the owner on 2026-11-11, relayed by the coordinating session with the owner's words in quotes:

  1. Default time and the list: "10 minutos (Recomendado)", with the list Nunca, 1, 2, 5, 10, 15, 30 and 60 minutes.
  2. The input that wakes the display: "Descartar (Recomendado)".
  3. While locked: "30 s após bloquear", not the same time as the setting. After the lock confirms, the display turns off after 30 seconds with no input; an input while locked turns it on and starts the 30 seconds again. With "Nunca" the lock still turns the display off after 30 seconds: the coordinating session recommended it as the owner's explicit choice for the lock, and this work agrees.
  4. The rest: "Aceitar todas (Recomendado)":
    • A response in progress, an approval that waits and an inline video in the chat do not hold the display on, and a new approval does not wake it.
    • An idle inhibitor of an application window that shows holds it on.
    • A "Desligar tela" control and ext-idle-notify-v1 wait for phase 4.
    • The setting is a section "Tela" in the Janelas tab.
    • The core and the host are published before the physical test, with the compositor starting with no time until the setting arrives.

Decisions of this work, for the record:

  • The clock runs on the 30 ms control timer and not on its own calloop timer: a few comparisons per tick, one place for every backend, and a smaller change in drm.rs.
  • The grace after a wake is a fixed 500 ms and not "until the first frame is on screen": the vblank of the modeset comes long before the panel lights, so it says nothing about what the user sees.
  • idle_display_off is accepted while locked, unlike hot_corners, so that a compositor restart behind a lock keeps the 30 seconds.
  • With the display off the offscreen work of the renderer still runs, so an agent tool that needs the renderer (a theme check, a window capture) does not hang while the user is away. Only a capture of an output fails.

Binding contract (from AGENTS.md)

This section binds exactly as AGENTS.md does; AGENTS.md keeps the short invariant and points here. Change both in the same commit.

  • Display off when idle (openspec/specs/idle-display-off/spec.md): only the protected settings set the protected setting idleDisplayOff (seconds from a closed list, 0 for never, 600 by default) through /api/idle-display-off. The core owns the value and the default and sends the compositor command idle_display_off (capabilities.idleDisplayOff), also while locked; the compositor starts with no time, reads no file and no gsettings key for it, and turns nothing off until a core set a time. With a time set, every output turns off after that time with no input of a device, and after 30 seconds once a lock is confirmed, whatever the time. Only input of a device resets the idle clock and wakes the display (in a nested run, its synthetic input); the event that wakes, the events of the 500 ms after it and the end of a press that was dropped are not delivered. An idle inhibitor (zwp_idle_inhibit_manager_v1) holds the display on only while its window shows on an output and the session is unlocked, and an inhibitor of a window of the shell host process never counts, so generated HTML holds nothing. No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the setting, the route or the command, reports activity, turns the display off or on, or holds it on; a response in progress and an approval that waits do neither. An application window that the agent opened counts as any application window does; that is an accepted limit. A capture of an output fails with "Display is off" while off. A failure to turn the outputs off never ends the session; a frame that fails in the five seconds after a wake is tried again, and outputs that showed no frame by then go back to off until the next input, so a wake never ends the session. A hotplug while off waits for the wake and five more seconds.