Skip to content

Implement pull-based inhibition capabilities #223

Description

@Staphylococcus

Parent: #216, within the #89 GNOME/Plasma MVP. Target: v1.8.0. Related regression: #195.

Outcome

Implement pull-based inhibition, starting with PowerDevil's effective screen-inhibition check. Each capability proxies a requested check to its source and returns current Boolean permission, with separate diagnostics. The section combines participating adapters' results.

Scope

  • Query inhibition information only, following Compose independent activity and inhibition capabilities for GNOME and Plasma #216's independent capability contract. Activity queries and idle-monitoring changes are separate activity work.
  • Implement PowerDevil's effective screen-inhibition query, respecting filtering and user overrides. Do not add a second unfiltered logind interpretation of that policy.
  • Keep protocol I/O, connections, owner validation and recovery inside the adapter. Allow asynchronous completion/cancellation. Only observed inhibition blocks; absence and failed or obsolete checks are neutral with diagnostics. Cancelled attempts return no verdict, and delayed results cannot authorize a later attempt.
  • Give each source inhibition fact one acquisition mode and contribution. GNOME is maintained by Implement push-based inhibition capabilities #222; its initialization/refresh queries stay internal there and do not create another contributor here.
  • Combine current Booleans from different pull capabilities, with consistent bounded diagnostics. Results cannot authorize future blank attempts. Preserve distinctions needed internally by Integrate inhibition at the Boolean blanking gate #225 so query completion/recovery is not mistaken for inhibition release.
  • Validate which application inhibition routes reach PowerDevil. Record unsupported routes under Compose independent activity and inhibition capabilities for GNOME and Plasma #216 instead of claiming native Wayland inhibitor coverage from this query alone.

Acceptance

  • PowerDevil returns effective current state without relying on change notifications.
  • Tests cover inhibition before/after monitoring starts, overlapping inhibitors and desktop-suppressed requests.
  • Delayed replies, failures, cancellation and owner replacement cannot apply an obsolete result.
  • Section tests combine independent Booleans and matching diagnostics, including neutral absence and failed applicable checks.
  • GNOME refreshes in Implement push-based inhibition capabilities #222 are not duplicate contributions here.
  • Real Plasma validation identifies and verifies the tested PowerDevil route; native Wayland coverage gaps remain explicit in Compose independent activity and inhibition capabilities for GNOME and Plasma #216.

Boundary

No fresh idle-notify probe is prescribed as an inhibition query. Idle-notify is not an inhibition-state getter; wrapping its callbacks in a pull API does not make it one. #216 retains the native Wayland coverage question for explicit resolution before claiming the full MVP complete.

This slice is testable independently of activity and TV actions. #224 owns preferences; #225 owns release timing, reconciliation and the sole join at can_blank(). Reporter-specific application results remain part of #195 validation.

Completion record — 2026-09-12

Implementation merged into dev in #228. The current runtime suite passes (1,019 unit tests, 151 Cucumber scenarios and runtime integration tests), including activity delivery, private-bus inhibition, cancellation/recovery, preference and gate coverage.

Live Fedora 44 / Plasma 6.7.5 validation on 2026-09-12:

  • ScreenSaver D-Bus and portal idle flag 8 both reached HasInhibition(4) and prevented LG Buddy blanking beyond its 10-second deadline. Two overlapping ScreenSaver clients preserved inhibition until the last exited; the full release delay followed.
  • A logind idle block inhibitor reached PowerDevil. SetInhibitionAllowed changed effective permission for a still-requested inhibition, confirming that desktop suppression is respected.
  • Restarting PowerDevil and acquiring a new ScreenSaver inhibitor recovered automatically while the LG Buddy monitor PID stayed unchanged.
  • Native Wayland gap confirmed: mpv 0.41.0 with --vo=wlshm created a zwp_idle_inhibit_manager_v1 inhibitor, while PowerDevil returned false and LG Buddy blanked after 10 seconds. Native playback is not covered by this adapter. This remains an explicit Compose independent activity and inhibition capabilities for GNOME and Plasma #216/Make desktop integration automatic #89 coverage decision; idle-notify is not an inhibition getter.

The test used the installed CI artifact from run 34664139930 (tree identical to merged dev f777a5f) and a local runtime with the separately tracked #217 startup fix. TV effects were observed through the repository's TLS TV fixture, not a physical TV. Reporter-specific playback and full MVP promotion remain open.

#216 retains native Wayland coverage; #217 retains remaining VM lifecycle validation; #218/#219 retain portable configuration and diagnostics work. No prerelease/main promotion is authorized by closing this implementation slice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions