GRI-1937: the client keeps the screen on while it runs #154

Merged
vivy merged 2 commits from feature/GRI-1937-client-no-sleep into dev 2026-11-13 14:10:55 +00:00
Owner

The product owner's test desktop (Ubuntu 26.04, GNOME on Wayland) blanks the screen and sleeps while the client plays.

The client now asks the desktop, over the session D-Bus, not to blank the screen or suspend — the same request a video player makes:

  1. org.gnome.SessionManager.Inhibit (flags suspend + idle) — GNOME
  2. org.freedesktop.portal.Inhibit — KDE and other portal desktops
  3. org.freedesktop.ScreenSaver.Inhibit — Xfce, MATE, Cinnamon (screen only)

The first that answers is kept. The desktop drops the request when the process exits, so a crash cannot leave the screen stuck on.

On by default. keep_awake = false in /etc/grimoirix-signage/client.toml or GRIMOIRIX_SIGNAGE_KEEP_AWAKE=0 turns it off (env wins). A failed inhibit is logged and playback continues.

Tested: clippy with and without gtk-renderer; config unit tests; each of the three calls against a mock service on a private bus (dbus-run-session) — received (susu), (sua{sv}), (ss) with the expected values; with no service, the error names all three. Not yet tried on the real desktop.

The product owner's test desktop (Ubuntu 26.04, GNOME on Wayland) blanks the screen and sleeps while the client plays. The client now asks the desktop, over the session D-Bus, not to blank the screen or suspend — the same request a video player makes: 1. `org.gnome.SessionManager.Inhibit` (flags suspend + idle) — GNOME 2. `org.freedesktop.portal.Inhibit` — KDE and other portal desktops 3. `org.freedesktop.ScreenSaver.Inhibit` — Xfce, MATE, Cinnamon (screen only) The first that answers is kept. The desktop drops the request when the process exits, so a crash cannot leave the screen stuck on. On by default. `keep_awake = false` in `/etc/grimoirix-signage/client.toml` or `GRIMOIRIX_SIGNAGE_KEEP_AWAKE=0` turns it off (env wins). A failed inhibit is logged and playback continues. Tested: clippy with and without `gtk-renderer`; config unit tests; each of the three calls against a mock service on a private bus (`dbus-run-session`) — received `(susu)`, `(sua{sv})`, `(ss)` with the expected values; with no service, the error names all three. Not yet tried on the real desktop.
Asks the desktop over the session D-Bus not to blank the screen or suspend:
GNOME session manager, else the XDG portal, else org.freedesktop.ScreenSaver.
On by default; keep_awake = false in client.toml or
GRIMOIRIX_SIGNAGE_KEEP_AWAKE=0 turns it off.
GRI-1937: document keep_awake in the client deployment section
Some checks failed
CI / the pre-push hook (pull_request) Successful in 34s
CI / cargo fmt (pull_request) Successful in 35s
CI / cargo clippy (pull_request) Successful in 1m54s
CI / cargo deny (pull_request) Successful in 1m30s
CI / repository boundary (pull_request) Successful in 33s
CI / cargo deny advisories (pull_request) Failing after 1m42s
CI / frontend-web (pull_request) Successful in 2m19s
CI / cargo test (pull_request) Successful in 7m5s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 14s
56a78995a6
vivy merged commit ab0cae51d5 into dev 2026-11-13 14:10:55 +00:00
vivy deleted branch feature/GRI-1937-client-no-sleep 2026-11-13 14:10:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!154
No description provided.