From 39094ee02641fd48006372fe1408df5c437b95ad Mon Sep 17 00:00:00 2001 From: nevaforget Date: Fri, 24 Apr 2026 14:40:30 +0200 Subject: [PATCH] fix(stasis): flip ignore_remote_media so browser video inhibits idle Browsers only raise org.freedesktop.ScreenSaver.Inhibit during fullscreen playback; a windowed YouTube tab sent no inhibit, so stasis ran the full idle plan to suspend despite active video. Letting browser MPRIS count as a media player closes the gap without the wake-lock hacks. See DECISIONS.md (2026-04-24). --- DECISIONS.md | 6 ++++++ defaults/xdg/stasis/stasis.rune | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DECISIONS.md b/DECISIONS.md index 775af44..f86d8c3 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -1,5 +1,11 @@ # Decisions +## 2026-04-24 – Stasis: flip `ignore_remote_media` to false for browser video +- **Who**: Dominik, ClaudeCode +- **Why**: Idle was firing on a second machine even while a video was playing in the browser. Original config carried the comment "browser uses D-Bus inhibit" and set `ignore_remote_media true`, deliberately excluding browser MPRIS on the assumption that Firefox/Chromium would keep the session alive via `org.freedesktop.ScreenSaver.Inhibit`. Verified against browser behavior: both browsers only raise that inhibit during **fullscreen** video playback (Firefox also requires `dom.screenwakelock.enabled`, default off on Linux). Windowed playback — the common case, YouTube in a tab — sends no inhibit, so stasis saw zero inhibitors and zero media players and ran the full idle plan to suspend. Upstream example config lists `r"firefox.*"` in `inhibit_apps` for exactly this reason; Moonarch removed it without a working substitute. +- **Tradeoffs**: Three options. (A) Put `firefox`/`chromium` back into `inhibit_apps` — works but inhibits whenever the browser *process* is running, even with zero tabs playing; wrong shape. (B) Tell users to flip `dom.screenwakelock.enabled` per browser — pushes per-user config, fragile across browsers. (C) Let browser MPRIS count as a media player by setting `ignore_remote_media false` — stasis already tracks playback state, so it only inhibits during actual playback. Picked C. Cost: any MPRIS source stasis classifies as "remote" (e.g. a Chromecast bridge) now also inhibits; acceptable — that is usually what a user wants anyway, and the inhibit releases the moment playback stops. +- **How**: `defaults/xdg/stasis/stasis.rune` — `ignore_remote_media true` → `false`, comment rewritten to document the fullscreen-only D-Bus behavior. PKGBUILD deploys to `/etc/xdg/stasis/stasis.rune`; existing users still need the 2026-04-22 seed mechanism (or a manual merge) to pick it up in `~/.config/stasis/stasis.rune`. + ## 2026-04-22 – moonarch-doctor housekeeping: drop stale check, add missing services - **Who**: Dominik, ClaudeCode - **Why**: Noticed while running `moondoc` on a healthy system that it reported `Paru [moonarch-pkgbuilds] repo missing from /etc/paru.conf` — a false failure. The paru PKGBUILD-repo mechanism was retired on 2026-04-20 in favor of the registry-only flow, and the `moonarch-git` install hook strips the legacy paru.conf section on upgrade; the doctor script was not updated in lockstep. Audit of the rest of the script surfaced two related gaps: the user-services loop skipped `walker.service` and `nautilus.service`, even though the PKGBUILD ships both in `/etc/systemd/user/` and enables them via `graphical-session.target.wants` symlinks. A silently missing walker or nautilus would not show up in diagnostics. diff --git a/defaults/xdg/stasis/stasis.rune b/defaults/xdg/stasis/stasis.rune index 4ea4730..7dc35ac 100644 --- a/defaults/xdg/stasis/stasis.rune +++ b/defaults/xdg/stasis/stasis.rune @@ -5,9 +5,11 @@ @description "Idle management for Moonarch (Niri + moonlock)" default: - # Media playback inhibits idle (non-browser only, browser uses D-Bus inhibit) + # Media playback inhibits idle. Browsers expose MPRIS during video playback + # and only send D-Bus idle-inhibit in fullscreen, so we include remote media + # to catch windowed browser videos. monitor_media true - ignore_remote_media true + ignore_remote_media false # App/process inhibit patterns (apps that don't use D-Bus idle-inhibit) inhibit_apps [