From 0e3431cbdb13a93ecd7bcc0fed06207dce5f3c69 Mon Sep 17 00:00:00 2001 From: kgrizz-git <216068303+kgrizz-git@users.noreply.github.com> Date: Sat, 31 Oct 2026 15:59:59 -0400 Subject: [PATCH 1/6] docs: add temporary Steam Deck in-game overlay investigation prompt Co-Authored-By: Claude Opus 5.5 --- ...steam-deck-ingame-overlay-investigation.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 dev-docs/development/steam-deck-ingame-overlay-investigation.md diff --git a/dev-docs/development/steam-deck-ingame-overlay-investigation.md b/dev-docs/development/steam-deck-ingame-overlay-investigation.md new file mode 100644 index 0000000..28ce8be --- /dev/null +++ b/dev-docs/development/steam-deck-ingame-overlay-investigation.md @@ -0,0 +1,78 @@ +# Steam Deck in-game overlay investigation (temporary) + +Temporary branch: `investigate/gamescope-ingame-overlay`. Delete this file and +the branch once the findings are folded into +[STEAMOS_GAMING_MODE.md](../STEAMOS_GAMING_MODE.md). + +## Problem + +In Gaming Mode with the experimental overlay on, the warning appears over the +Gaming Mode home screen. Over a fullscreen game it mostly does not appear, or +never does. The one debug capture so far (2026-10-20) was a case that worked. +That capture showed our dialog as `predicted_overlay_wid` and every focus display +as `:0`. We need a capture from a failing case. + +## Hypotheses the capture separates + +| ID | Hypothesis | Evidence in the `DEBUG-GAMESCOPE` block | +|----|------------|------------------------------------------| +| H1 | A Steam overlay window wins gamescope's single overlay slot | `predicted_overlay_wid` is not ours. Another wide `STEAM_OVERLAY` child has opacity at least ours | +| H2 | The game is on another Xwayland display | Decoded focus display is `:1` (or not `:0`). Mouse or keyboard display follows the game | +| H3 | Atoms are never applied, or arrive too late | Log has `Could not find X11 window ID for gamescope overlay`, or there is no `Applied gamescope STEAM_OVERLAY` line | +| H4 | Routing never chose gamescope | No `DEBUG-GAMESCOPE` block at all. Display detection logged a non-gamescope type | + +Fix direction if H1 holds: make our dialog the focused app for its lifetime +(`STEAM_GAME` on our window plus `GAMESCOPECTRL_BASELAYER_APPID` on the `:0` +root, restored on close). Do not try raise/lower; see the archived click-through +plan for why that cannot win the tie. + +## Prompt for the agent on the Deck + +```text +Investigate why the sleep-warning popup is not visible above fullscreen games in +SteamOS Gaming Mode. Work on branch investigate/gamescope-ingame-overlay. Read +AGENTS.md, docs/SAFETY.md, dev-docs/STEAMOS_GAMING_MODE.md and +dev-docs/development/steam-deck-ingame-overlay-investigation.md first. Follow the +isolation and bounding rules in dev-docs/development/steam-deck-first-check.md. + +Scope: read-only toward the repo and installed system. Do not edit repo files, +install packages, use sudo, commit, push, edit the installed sleep-warning.conf, +run configure menus, or enable/disable/restart services. The only state you may +create is under a temporary HOME you delete at the end. + +1. Record commit, SteamOS version, gamescope version, and confirm the session is + real Gaming Mode. Run bash scripts/check-steam-deck-gaming-mode.sh and record + its output and exit code. +2. Record gamescope's Xwayland displays (ls /tmp/.X11-unix) and which display + Steam and the running game use (read DISPLAY from /proc//environ for + those PIDs only; print only DISPLAY). Note whether the game is Proton or + native. +3. Build an isolated foreground run of the production sleep-warning.sh exactly + as step 4 of steam-deck-first-check.md describes (temporary HOME, preserved + XAUTHORITY, restriction window covering now, each day <=16 h, + GAMING_MODE_EXPERIMENTAL_ENABLED=true, POPUP_MIN_DISPLAY_TIME=0, + POPUP_AUTO_CLOSE=true). Add GAMESCOPE_OVERLAY_DEBUG=true to the temporary + config and environment. Set POPUP_ABSOLUTE_MAX_SECONDS=20 in the environment. + Bound the process group with timeout --kill-after=2s 40s and bound output. + Verify key names in lib/config-keys.sh before writing the fixture. +4. Run it in three scenes, with a human observer confirming visibility each time: + a. Gaming Mode home screen (control case; expected visible). + b. A fullscreen game that is paused at a safe point. + c. The same game during active play, or a second game (prefer one Proton + and one native title if available). + For each scene, while the dialog is alive, also capture from DISPLAY=:0: + xwininfo -root -children (first 80 lines), and xprop -root | grep -E + 'GAMESCOPE|STEAM' (property names and values only). +5. Copy each run's DEBUG-GAMESCOPE block and the surrounding gamescope log lines + from the temporary HOME's warnings.log. Strip the dialog title/body if present. +6. For each scene, mark H1-H4 from the investigation doc as SUPPORTED, + REFUTED or UNCLEAR, citing the log line. Do not propose code changes beyond + naming the hypothesis and the evidence. +7. Clean up: kill only the children you started, delete the temporary HOME, + and confirm no sleep-warning or zenity/yad process from your runs remains. + +Return: a table per scene (visible yes/no from the observer, tool, our WID, +predicted_overlay_wid, focus displays, competing overlay windows with opacity +and WM_CLASS, H1-H4 verdicts), then the raw DEBUG-GAMESCOPE blocks, then the +commands with exit codes and durations. Keep the report under 400 lines. +``` From 3ec5498a0feedbc73cc1c25337ea5f2c667cab7e Mon Sep 17 00:00:00 2001 From: Kevin Grizzard <216068303+kgrizz-git@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:43:23 -0400 Subject: [PATCH 2/6] docs: record 2026-10-31 Steam Deck in-game overlay findings The in-game visibility failure did not reproduce: yad and zenity warnings showed over a native fullscreen game, including across countdown respawns with the installed settings. H1-H4 are refuted. The detailed capture lives in the temporary investigation doc; STEAMOS_GAMING_MODE.md gets a short, general summary (service PATH decides the auto dialog tool; SSH preflight needs the session variables). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q7gYN6xyTi8W4LMjg9mfaC --- CHANGELOG.md | 1 + dev-docs/STEAMOS_GAMING_MODE.md | 13 +++++++- ...steam-deck-ingame-overlay-investigation.md | 30 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d57606e..0980f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Installed license notice:** Linux and macOS installers copy the root `LICENSE` to `~/.local/lib/sleep-warning/LICENSE` and refuse to install when that file is missing. Installed popup, schedule, and lock behavior is unchanged. - **Public docs:** Desktop Mode is described as supported, and Gaming Mode as experimental and opt-in, with the 2026-10-19 visibility result and the 2026-10-20 click and Enter result. The still-open Deck checks stay listed. Pause durations are 1, 2, 3, 5, 10, or 15 minutes (default 5), then a cooldown of 6, 8, 12, or 24 hours (default 24), measured from the last pause. The graphical schedule picker is documented as quarter-hour steps. Emergency stop text pairs Linux stop with disable, and macOS `bootout` with `disable`, and includes re-enable. Configure lock hours are described as tighten-only, and uninstall is described as available outside uninstall-block hours. macOS docs state that auto-close is forced at runtime and that the per-day cap is 16 hours. Installed names and behavior are unchanged. - **Gamescope overlay hit region:** Experimental Gaming Mode dialogs (warning, countdown respawn, and pause notice) are placed at the top-left of the nested `:0` canvas and are at least two thirds of that canvas tall, still full root width and still capped at the root height. The 2026-10-20 capture showed the cursor confined to roughly the top third while a short centered banner sat outside it. gamescope paints the overlay centered but draws the cursor offset by the window's position, so the window has to sit at 0,0. The zenity move uses `xdotool` under gamescope even when `wmctrl` is installed, since `wmctrl` cannot list windows there. Desktop Mode is unchanged. `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` stay as they are. Patch; the 16 h cap, popup watchdog, and escape hatch are unchanged. **Steam Deck verified 2026-10-20** (cursor reaches chrome; click works; Enter did not fire into Steam). +- **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. No code changed. - **Gaming Mode warning buttons (docs):** Document that button labels follow the dialog tool — zenity `--warning` has no Cancel (OK only, or OK + Pause); yad may show Cancel; kdialog may say Dismiss. A missing Cancel in Gaming Mode with zenity is expected. Prefer `DIALOG_TOOL=yad` for OK/Cancel-style chrome. ### Fixed diff --git a/dev-docs/STEAMOS_GAMING_MODE.md b/dev-docs/STEAMOS_GAMING_MODE.md index f178137..951dfe3 100644 --- a/dev-docs/STEAMOS_GAMING_MODE.md +++ b/dev-docs/STEAMOS_GAMING_MODE.md @@ -42,7 +42,7 @@ experimental tool coverage, not evidence that all three tools were verified. 5. **Safety Guardrails (`GAMESCOPE_FORCE_AUTO_CLOSE=true`)**: - `lib/popup-safety.sh` forces `auto_close="true"` when `env_type == "gamescope"`, ensuring popups always auto-close after `POPUP_MIN_DISPLAY_TIME + POPUP_AUTO_CLOSE_DELAY_SECONDS` in addition to the hard `POPUP_ABSOLUTE_MAX_SECONDS` watchdog. -The percentage tables and “planned changes” sections later in this document are historical planning estimates from before the experimental overlay. They are not measurements. Current behavior is the opt-in path above. Desktop Mode is supported. Gaming Mode remains experimental. A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. Still unchecked: pause-enabled buttons and the pause notice, countdown input, touch, the Quick Access Menu after the popup closes, a forced timeout, and docked versus undocked. +The percentage tables and “planned changes” sections later in this document are historical planning estimates from before the experimental overlay. They are not measurements. Current behavior is the opt-in path above. Desktop Mode is supported. Gaming Mode remains experimental. A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A 2026-10-31 docked check showed yad and zenity visible over a native fullscreen game during active play, including across countdown respawns (see [On-device (2026-10-31)](#on-device-2026-10-31-visibility-over-fullscreen-games)). Still unchecked: pressing Pause and the pause notice, countdown input, touch, the Quick Access Menu after the popup closes, a forced timeout, handheld (undocked) use, and Proton titles. ## Key Challenges @@ -552,6 +552,17 @@ Experimental Gaming Mode overlay support is implemented and **off by default**. **Code (2026-10-20, Stream F):** gamescope warning dialogs, countdown respawns, and the pause notice are forced to **top-left** with a height of at least two thirds of the `:0` root (capped at the root; still full root width). gamescope 3.16.23 paints the overlay centered and fit-scaled, but draws the cursor offset by the window's X11 position, so the window must sit at 0,0. zenity is moved after map with `xdotool windowmove` (preferred over `wmctrl` under gamescope). Desktop Mode unchanged. `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1`, forced auto-close, and the watchdog unchanged. +### On-device (2026-10-31): visibility over fullscreen games + +A docked Steam Deck check (SteamOS 3.8.28, gamescope 3.16.23.6) did not reproduce the report of the warning showing on the home screen but not over a game. yad and zenity warnings were visible over a native fullscreen game, both paused and in active play. They stayed visible across countdown respawns with a 90-second minimum display. Every debug block showed our window as `predicted_overlay_wid`, with atom read-back `overlay=1 focus=1`. Keyboard and mouse focus moved to `:0` while the dialog was up, and an OK press over the running game reached the dialog. + +Two setup details matter when comparing runs: + +- **The dialog tool follows the service PATH.** The user systemd manager's PATH can be just `/usr/local/bin:/usr/bin`. A yad installed elsewhere (for example through Nix) is then invisible to the scheduled service, so `DIALOG_TOOL=auto` picks zenity there, while an interactive shell picks yad. +- **Over SSH, the preflight needs the session variables.** Without `XDG_CURRENT_DESKTOP=gamescope DISPLAY=:0`, `check-steam-deck-gaming-mode.sh` reports routing `wayland` and a false blocker. + +Still unchecked: handheld (undocked) use, Proton titles, the Steam overlay or Quick Access Menu open when the warning spawns, and pressing Pause over a game. The investigation notes are in [steam-deck-ingame-overlay-investigation.md](development/steam-deck-ingame-overlay-investigation.md). + ### Warning buttons (zenity vs Desktop) — Stream G Gaming Mode and Desktop Mode may pick different dialog tools (`DIALOG_TOOL=auto` prefers yad → zenity → kdialog; PATH and which packages are installed still matter). **Button labels follow the tool**, not gamescope: diff --git a/dev-docs/development/steam-deck-ingame-overlay-investigation.md b/dev-docs/development/steam-deck-ingame-overlay-investigation.md index 28ce8be..f981222 100644 --- a/dev-docs/development/steam-deck-ingame-overlay-investigation.md +++ b/dev-docs/development/steam-deck-ingame-overlay-investigation.md @@ -26,6 +26,36 @@ Fix direction if H1 holds: make our dialog the focused app for its lifetime root, restored on close). Do not try raise/lower; see the archived click-through plan for why that cannot win the tie. +## Findings (2026-10-31) + +The failure did not reproduce. H1–H4 are all refuted for the scenes below. + +**Setup:** commit `0e3431c`, SteamOS 3.8.28 (build 20260922.1), gamescope 3.16.23.6. The Deck was docked to an external 2560x1440 display. The game was Tyranny, a native Linux title (Steam Linux Runtime soldier, not Proton). Steam ran on `DISPLAY=:0` and the game on `:1`. Each run used the production `sleep-warning.sh` from the checkout with a temporary HOME, `GAMESCOPE_OVERLAY_DEBUG=true`, a `POPUP_ABSOLUTE_MAX_SECONDS` cap, and `timeout --kill-after=2s`. A human watched each run. + +| Run | Tool | Settings | Visible | predicted_overlay_wid | Focus displays (mouse/kbd/focus) | +|-----|------|----------|---------|-----------------------|----------------------------------| +| Home screen | yad | medium, min 0 | yes | ours | :0 / :0 / :0 | +| Game paused | yad | medium, min 0 | yes; game input returned | ours | :0 / :0 / :1 | +| Active play | yad | medium, min 0 | yes | ours | :0 / :0 / :1 | +| Active play | zenity | medium, min 0 | yes | ours | :0 / :0 / :1 | +| Active play | yad | installed settings: large, min 90 s, pause on, 4 respawns | yes, through every respawn | ours, every block | :0 / :0 / :1 | +| Active play | zenity | installed settings and the service PATH, 4 respawns | yes, through every respawn | ours, every block | :0 / :0 / :1 | + +- **H1** refuted. In every block ours was the only `STEAM_OVERLAY` window in the census. The full-screen `mangoapp overlay window` on `:0` has no `STEAM_OVERLAY` and did not compete. +- **H2** refuted as a cause. The game is on `:1` and the focus display stays `:1`, yet the dialog shows. +- **H3** refuted. Every spawn and respawn logged `readback overlay=1 focus=1`. +- **H4** refuted. Every run logged `Display environment: gamescope`. The installed timer's own log for 2026-10-29 and 2026-10-31 shows the same on all 43 popups. + +Other observations: + +- **Tool choice follows PATH.** yad on this Deck comes from Nix (`~/.nix-profile/bin/yad`). The user manager's PATH is `/usr/local/bin:/usr/bin`, so the scheduled service picks zenity (dark theme) and an SSH shell picks yad (light theme). +- **Focus.** Keyboard and mouse focus move to `:0` while the dialog is up and return to `:1` after it closes. In the last zenity run the observer pressed OK over the running game, and the dialog exited 0 (an auto-close logs 143). The input method was not recorded. +- **Service drop-in.** The installed drop-in was `mode-desktop.conf` (only `DISPLAY=:0`) while in Gaming Mode. Routing still worked, because the user manager supplies `XDG_CURRENT_DESKTOP=gamescope`. +- **Likely explanation for the original report.** A separate personal timer on this Deck quit Steam every 10 minutes starting 15 minutes before the warning windows opened. On 2026-10-31 it quit Steam at 01:20:46 and 01:30:46, and the first warning appeared at 01:30:51. So no game was running when the warnings fired. That timer now starts at the same times as the warning windows. +- **SSH preflight.** It needs `XDG_CURRENT_DESKTOP=gamescope DISPLAY=:0`; without them it reports routing `wayland` (a false blocker). + +Still unchecked: handheld (undocked), a Proton title, the Steam overlay or Quick Access Menu open at spawn time, and pressing Pause over a game. + ## Prompt for the agent on the Deck ```text From bd5998ac474f4188dec60feb3933149da49051dd Mon Sep 17 00:00:00 2001 From: Kevin Grizzard <216068303+kgrizz-git@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:54:38 -0400 Subject: [PATCH 3/6] docs: record Gaming Mode in-game visibility as verified on Steam Deck The 2026-10-31 docked check showed the warning over a native fullscreen game in all six supervised runs (yad and zenity, paused and active play, through countdown respawns). Surface that in the README, USER_GUIDE and CONFIGURATION, and replace "docked versus undocked" in the unchecked lists with handheld use and Proton titles. Keep the investigation doc as a closed record with its reusable agent prompt instead of deleting it. Gaming Mode stays experimental and off by default. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- README.md | 6 +++--- dev-docs/STEAMOS_GAMING_MODE.md | 7 ++++--- .../steam-deck-ingame-overlay-investigation.md | 18 ++++++++++-------- user-docs/CONFIGURATION.md | 2 +- user-docs/USER_GUIDE.md | 4 ++-- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0980f59..932d7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Installed license notice:** Linux and macOS installers copy the root `LICENSE` to `~/.local/lib/sleep-warning/LICENSE` and refuse to install when that file is missing. Installed popup, schedule, and lock behavior is unchanged. - **Public docs:** Desktop Mode is described as supported, and Gaming Mode as experimental and opt-in, with the 2026-10-19 visibility result and the 2026-10-20 click and Enter result. The still-open Deck checks stay listed. Pause durations are 1, 2, 3, 5, 10, or 15 minutes (default 5), then a cooldown of 6, 8, 12, or 24 hours (default 24), measured from the last pause. The graphical schedule picker is documented as quarter-hour steps. Emergency stop text pairs Linux stop with disable, and macOS `bootout` with `disable`, and includes re-enable. Configure lock hours are described as tighten-only, and uninstall is described as available outside uninstall-block hours. macOS docs state that auto-close is forced at runtime and that the per-day cap is 16 hours. Installed names and behavior are unchanged. - **Gamescope overlay hit region:** Experimental Gaming Mode dialogs (warning, countdown respawn, and pause notice) are placed at the top-left of the nested `:0` canvas and are at least two thirds of that canvas tall, still full root width and still capped at the root height. The 2026-10-20 capture showed the cursor confined to roughly the top third while a short centered banner sat outside it. gamescope paints the overlay centered but draws the cursor offset by the window's position, so the window has to sit at 0,0. The zenity move uses `xdotool` under gamescope even when `wmctrl` is installed, since `wmctrl` cannot list windows there. Desktop Mode is unchanged. `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` stay as they are. Patch; the 16 h cap, popup watchdog, and escape hatch are unchanged. **Steam Deck verified 2026-10-20** (cursor reaches chrome; click works; Enter did not fire into Steam). -- **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. No code changed. +- **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. The README, `user-docs/USER_GUIDE.md` and `user-docs/CONFIGURATION.md` list the result, and the still-unchecked items now name handheld (undocked) use and Proton titles in place of "docked versus undocked". The investigation notes stay in `dev-docs/development/steam-deck-ingame-overlay-investigation.md` as a closed record with a reusable agent prompt. Gaming Mode stays experimental and off by default. No code changed. - **Gaming Mode warning buttons (docs):** Document that button labels follow the dialog tool — zenity `--warning` has no Cancel (OK only, or OK + Pause); yad may show Cancel; kdialog may say Dismiss. A missing Cancel in Gaming Mode with zenity is expected. Prefer `DIALOG_TOOL=yad` for OK/Cancel-style chrome. ### Fixed diff --git a/README.md b/README.md index 0ca36a5..aade1e5 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This software is provided "AS IS", without warranty of any kind, express or impl **Compatibility:** - Compatibility cannot be guaranteed for all systems - Some features may not work on all Linux distributions or desktop environments -- SteamOS Desktop Mode is supported. Gaming Mode overlay support is experimental and off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. Still unchecked: pause-enabled buttons, touch, countdown input, the Quick Access Menu after the popup closes, forced timeout, and docked versus undocked. Some fullscreen games can still hide the popup. +- SteamOS Desktop Mode is supported. Gaming Mode overlay support is experimental and off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A docked 2026-10-31 check showed the warning in all six supervised runs over a native fullscreen game, paused and during active play, with yad and zenity, including through countdown respawns with a 90-second minimum display. Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu, forced timeout, handheld (undocked) use, and Proton titles. Only one game has been tested, so other fullscreen games may still hide the popup. - On Wayland/gamescope, always-on-top behavior is best-effort and full-screen games may block popups **Support:** @@ -58,7 +58,7 @@ This software is provided "AS IS", without warranty of any kind, express or impl - 🔔 **Modal warning popups** - Ensures you're aware of late-night usage - 🚀 **Easy installation** - Automated installation script handles everything - 🔄 **Auto-start on boot** - Runs automatically via systemd timer -- 🎮 **Desktop and experimental Gaming Mode** - Desktop Mode is supported. Gaming Mode is experimental, off by default, and partially checked on a Steam Deck (2026-10-19 and 2026-10-20) +- 🎮 **Desktop and experimental Gaming Mode** - Desktop Mode is supported. Gaming Mode is experimental, off by default, and checked on a Steam Deck over a fullscreen game during play (2026-10-19, 2026-10-20 and 2026-10-31) - 🐧 **Cross-distribution** - Works on Linux with systemd, and on macOS with a user LaunchAgent - 🔒 **Minimum display time** - Ensures warnings are visible for a set duration - 📌 **Immovable windows** - Prevents popup from being moved during countdown (optional) @@ -272,7 +272,7 @@ systemctl --user daemon-reload ### Linux Distributions - ✅ Steam OS (Arch-based) - **Desktop Mode**: Supported on SteamOS Desktop Mode (KDE on X11). Popups work with some full-screen games; results vary by game, and exclusive full-screen games may still cover them. - - **Gaming Mode (Experimental)**: Off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). Option 12 in `sleep-warning-configure` routes dialogs through `gamescope`'s Xwayland overlay plane (`:0`) with `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1` and forced auto-close. Deck results: visible on 2026-10-19; click and Enter reached the dialog on 2026-10-20, and Enter did not also fire into Steam. Still unchecked: pause-enabled buttons, touch, countdown input, the Quick Access Menu after close, forced timeout, and docked versus undocked. See [dev-docs/STEAMOS_GAMING_MODE.md](dev-docs/STEAMOS_GAMING_MODE.md). + - **Gaming Mode (Experimental)**: Off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). Option 12 in `sleep-warning-configure` routes dialogs through `gamescope`'s Xwayland overlay plane (`:0`) with `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1` and forced auto-close. Deck results: visible on 2026-10-19; click and Enter reached the dialog on 2026-10-20, and Enter did not also fire into Steam; on 2026-10-31 (docked) visible over a native fullscreen game during active play with yad and zenity, including through countdown respawns. Still unchecked: pressing Pause, touch, countdown input, the Quick Access Menu, forced timeout, handheld (undocked) use, and Proton titles. See [dev-docs/STEAMOS_GAMING_MODE.md](dev-docs/STEAMOS_GAMING_MODE.md). - ✅ Ubuntu (18.04+) - ✅ Debian (8+) - ✅ Fedora diff --git a/dev-docs/STEAMOS_GAMING_MODE.md b/dev-docs/STEAMOS_GAMING_MODE.md index 951dfe3..a6463f4 100644 --- a/dev-docs/STEAMOS_GAMING_MODE.md +++ b/dev-docs/STEAMOS_GAMING_MODE.md @@ -17,10 +17,11 @@ SteamOS Gaming Mode presents unique challenges for systemd-based warning systems **Current Status**: ⚙️ **Experimental Overlay Implemented (Opt-In via `GAMING_MODE_EXPERIMENTAL_ENABLED`)** -The 2026-10-20 hardware click verification covers **zenity**. Yad still needs -equivalent hardware validation. Kdialog's message boxes do not receive the +The 2026-10-20 hardware click verification covers **zenity**. The 2026-10-31 +check showed both **zenity and yad** visible over a fullscreen game; yad clicks +were not separately recorded. Kdialog's message boxes do not receive the full-width size override and can remain non-interactive notifications under -gamescope; use zenity for the verified path. This is a limitation of the +gamescope; use zenity or yad for the verified path. This is a limitation of the experimental tool coverage, not evidence that all three tools were verified. ### How the Experimental `gamescope` Overlay Works diff --git a/dev-docs/development/steam-deck-ingame-overlay-investigation.md b/dev-docs/development/steam-deck-ingame-overlay-investigation.md index f981222..610d76e 100644 --- a/dev-docs/development/steam-deck-ingame-overlay-investigation.md +++ b/dev-docs/development/steam-deck-ingame-overlay-investigation.md @@ -1,16 +1,18 @@ -# Steam Deck in-game overlay investigation (temporary) +# Steam Deck in-game overlay investigation -Temporary branch: `investigate/gamescope-ingame-overlay`. Delete this file and -the branch once the findings are folded into -[STEAMOS_GAMING_MODE.md](../STEAMOS_GAMING_MODE.md). +**Status: closed 2026-10-31. The failure did not reproduce.** The summary is in +[STEAMOS_GAMING_MODE.md](../STEAMOS_GAMING_MODE.md#on-device-2026-10-31-visibility-over-fullscreen-games). +This file keeps the hypotheses, the raw findings, and the agent prompt so the +check can be repeated for the cases still unchecked (handheld, Proton, Steam +overlay or Quick Access Menu open at spawn, pressing Pause over a game). ## Problem In Gaming Mode with the experimental overlay on, the warning appears over the Gaming Mode home screen. Over a fullscreen game it mostly does not appear, or -never does. The one debug capture so far (2026-10-20) was a case that worked. -That capture showed our dialog as `predicted_overlay_wid` and every focus display -as `:0`. We need a capture from a failing case. +never does. Before this investigation, the one debug capture (2026-10-20) was a +case that worked. That capture showed our dialog as `predicted_overlay_wid` and +every focus display as `:0`, so a capture from a failing case was needed. ## Hypotheses the capture separates @@ -60,7 +62,7 @@ Still unchecked: handheld (undocked), a Proton title, the Steam overlay or Quick ```text Investigate why the sleep-warning popup is not visible above fullscreen games in -SteamOS Gaming Mode. Work on branch investigate/gamescope-ingame-overlay. Read +SteamOS Gaming Mode. Read AGENTS.md, docs/SAFETY.md, dev-docs/STEAMOS_GAMING_MODE.md and dev-docs/development/steam-deck-ingame-overlay-investigation.md first. Follow the isolation and bounding rules in dev-docs/development/steam-deck-first-check.md. diff --git a/user-docs/CONFIGURATION.md b/user-docs/CONFIGURATION.md index d3f1e44..1a7dc85 100644 --- a/user-docs/CONFIGURATION.md +++ b/user-docs/CONFIGURATION.md @@ -823,7 +823,7 @@ GAMING_MODE_EXPERIMENTAL_ENABLED=false - Off unless this key is `true`. An older `mode-gaming.conf` drop-in does not turn it on. - Option 12 can turn it on or off during lock hours. It does not change restriction hours. - If no usable display can be found, the warning tries `notify-send` instead of a modal dialog. Gaming Mode may not have a notification daemon. -- When the overlay path is active, zenity/yad warning dialogs request the full gamescope nested (`:0`) width and at least two thirds of that canvas height, placed at the top-left (gamescope 3.16.x treats narrower `STEAM_OVERLAY` windows as non-interactive notifications). Desktop Mode sizes and position are unchanged. Steam Deck verified 2026-10-20 (click + Enter). Still unchecked on device: pause-enabled buttons and the pause notice, countdown input, touch, the Quick Access Menu after close, a forced timeout, and docked versus undocked. +- When the overlay path is active, zenity/yad warning dialogs request the full gamescope nested (`:0`) width and at least two thirds of that canvas height, placed at the top-left (gamescope 3.16.x treats narrower `STEAM_OVERLAY` windows as non-interactive notifications). Desktop Mode sizes and position are unchanged. Steam Deck verified 2026-10-20 (click + Enter) and 2026-10-31 (docked; visible over a native fullscreen game during play, yad and zenity). Still unchecked on device: pressing Pause and the pause notice, countdown input, touch, the Quick Access Menu, a forced timeout, handheld (undocked) use, and Proton titles. - **Button labels follow the tool:** zenity `--warning` has no Cancel (OK only, or OK + Pause). Yad without pause uses OK and Cancel; kdialog may say Dismiss. Gaming Mode often picks zenity, so a missing Cancel is expected. See [../dev-docs/STEAMOS_GAMING_MODE.md](../dev-docs/STEAMOS_GAMING_MODE.md). - Optional `GAMESCOPE_OVERLAY_DEBUG` (default off, not a wizard option) adds log-only diagnostics. Leave it unset unless you are collecting a Gaming Mode log. diff --git a/user-docs/USER_GUIDE.md b/user-docs/USER_GUIDE.md index bc03f9c..38c9d60 100644 --- a/user-docs/USER_GUIDE.md +++ b/user-docs/USER_GUIDE.md @@ -470,7 +470,7 @@ sudo pacman -S wmctrl xdotool **Limitations:** - Some exclusive full-screen games cannot be overlaid by window manager dialogs - This is a limitation of the windowing system, not the sleep warning system -- SteamOS Gaming Mode overlay support is experimental, off unless `GAMING_MODE_EXPERIMENTAL_ENABLED=true` (Deck click path verified 2026-10-20; see SteamOS-specific documentation) +- SteamOS Gaming Mode overlay support is experimental, off unless `GAMING_MODE_EXPERIMENTAL_ENABLED=true` (Deck click path verified 2026-10-20; visibility over a fullscreen game during play verified 2026-10-31; see SteamOS-specific documentation) ### Problem: Timer Not Starting on Boot @@ -673,7 +673,7 @@ Future versions may support custom messages per day or time range. - Requires `xprop` (`xorg-xprop`, pre-installed on SteamOS) for setting `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` - Classic X11 window manager geometry/immovable loops (`wmctrl`/`xdotool`) do not apply under `gamescope` except for the gamescope zenity top-left move (`xdotool`); minimum display time is enforced via countdown respawn and auto-close - **Buttons depend on the dialog tool:** zenity has no Cancel on `--warning` (OK only, or OK + Pause when pause is available). Desktop Mode may show Cancel (yad) or Dismiss (kdialog) if a different tool is selected. Missing Cancel in Gaming Mode with zenity is expected, not a gamescope bug. Prefer `DIALOG_TOOL=yad` if you want OK/Cancel-style chrome. -- **Checked on a Steam Deck:** popup visible and held for min-display (2026-10-19); click and Enter reached the dialog, and Enter did not also fire into Steam (2026-10-20). **Still unchecked:** pause-enabled buttons and the pause notice, countdown input, touch, the Quick Access Menu after the popup closes, a forced timeout, and docked versus undocked. +- **Checked on a Steam Deck:** popup visible and held for min-display (2026-10-19); click and Enter reached the dialog, and Enter did not also fire into Steam (2026-10-20); visible over a native fullscreen game, paused and during active play, with yad and zenity and through countdown respawns, while docked (2026-10-31). **Still unchecked:** pressing Pause and the pause notice, countdown input, touch, the Quick Access Menu, a forced timeout, handheld (undocked) use, and Proton titles. **See [../dev-docs/STEAMOS_GAMING_MODE.md](../dev-docs/STEAMOS_GAMING_MODE.md) for detailed Gaming Mode technical documentation.** From 4e878cf2ffc4f4a889d4ab680e33689a39cb4038 Mon Sep 17 00:00:00 2001 From: Kevin Grizzard <216068303+kgrizz-git@users.noreply.github.com> Date: Sat, 31 Oct 2026 17:06:24 -0400 Subject: [PATCH 4/6] docs: address Sourcery review on Gaming Mode verification wording - Separate the five in-game runs from the home-screen control, and note that paused-game coverage was yad only. - List "Steam overlay or Quick Access Menu already open at spawn" as unchecked in the public docs. - Update GETTING_STARTED.md, which still listed docked use as unchecked. - Replace exact personal Steam-quit timestamps with relative timing. - Have the reusable agent prompt keep raw window captures local and redact window names in reports. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- GETTING_STARTED.md | 2 +- README.md | 4 ++-- dev-docs/STEAMOS_GAMING_MODE.md | 4 ++-- .../steam-deck-ingame-overlay-investigation.md | 11 ++++++++--- user-docs/CONFIGURATION.md | 2 +- user-docs/USER_GUIDE.md | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 932d7a9..57a95e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Installed license notice:** Linux and macOS installers copy the root `LICENSE` to `~/.local/lib/sleep-warning/LICENSE` and refuse to install when that file is missing. Installed popup, schedule, and lock behavior is unchanged. - **Public docs:** Desktop Mode is described as supported, and Gaming Mode as experimental and opt-in, with the 2026-10-19 visibility result and the 2026-10-20 click and Enter result. The still-open Deck checks stay listed. Pause durations are 1, 2, 3, 5, 10, or 15 minutes (default 5), then a cooldown of 6, 8, 12, or 24 hours (default 24), measured from the last pause. The graphical schedule picker is documented as quarter-hour steps. Emergency stop text pairs Linux stop with disable, and macOS `bootout` with `disable`, and includes re-enable. Configure lock hours are described as tighten-only, and uninstall is described as available outside uninstall-block hours. macOS docs state that auto-close is forced at runtime and that the per-day cap is 16 hours. Installed names and behavior are unchanged. - **Gamescope overlay hit region:** Experimental Gaming Mode dialogs (warning, countdown respawn, and pause notice) are placed at the top-left of the nested `:0` canvas and are at least two thirds of that canvas tall, still full root width and still capped at the root height. The 2026-10-20 capture showed the cursor confined to roughly the top third while a short centered banner sat outside it. gamescope paints the overlay centered but draws the cursor offset by the window's position, so the window has to sit at 0,0. The zenity move uses `xdotool` under gamescope even when `wmctrl` is installed, since `wmctrl` cannot list windows there. Desktop Mode is unchanged. `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` stay as they are. Patch; the 16 h cap, popup watchdog, and escape hatch are unchanged. **Steam Deck verified 2026-10-20** (cursor reaches chrome; click works; Enter did not fire into Steam). -- **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. The README, `user-docs/USER_GUIDE.md` and `user-docs/CONFIGURATION.md` list the result, and the still-unchecked items now name handheld (undocked) use and Proton titles in place of "docked versus undocked". The investigation notes stay in `dev-docs/development/steam-deck-ingame-overlay-investigation.md` as a closed record with a reusable agent prompt. Gaming Mode stays experimental and off by default. No code changed. +- **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. The README, `GETTING_STARTED.md`, `user-docs/USER_GUIDE.md` and `user-docs/CONFIGURATION.md` list the result, and the still-unchecked items now name handheld (undocked) use and Proton titles in place of "docked versus undocked", and add the case where the Steam overlay or Quick Access Menu is already open when the warning spawns. The investigation notes stay in `dev-docs/development/steam-deck-ingame-overlay-investigation.md` as a closed record with a reusable agent prompt. Gaming Mode stays experimental and off by default. No code changed. - **Gaming Mode warning buttons (docs):** Document that button labels follow the dialog tool — zenity `--warning` has no Cancel (OK only, or OK + Pause); yad may show Cancel; kdialog may say Dismiss. A missing Cancel in Gaming Mode with zenity is expected. Prefer `DIALOG_TOOL=yad` for OK/Cancel-style chrome. ### Fixed diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 909c048..83d334b 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -15,7 +15,7 @@ The Sleep Warning System displays warning popups when you're using your computer - 🛡️ At most 16 hours per day in each lockout category. The wizard will not save a longer day - 🔒 During lock hours, configuration can only get stricter (tighten-only) -**SteamOS:** Desktop Mode is supported. Gaming Mode is experimental and off until you turn it on. A Deck check on 2026-10-19–20 showed the popup, click, and Enter. Pause-enabled buttons, touch, countdown input, the Quick Access Menu after close, forced timeout, and docked versus undocked are still unchecked. Details are in [user-docs/USER_GUIDE.md](user-docs/USER_GUIDE.md#steamos-gaming-mode-compatibility). +**SteamOS:** Desktop Mode is supported. Gaming Mode is experimental and off until you turn it on. A Deck check on 2026-10-19–20 showed the popup, click, and Enter. A docked check on 2026-10-31 showed the warning over a native fullscreen game while paused (yad) and during active play (yad and zenity). Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. Details are in [user-docs/USER_GUIDE.md](user-docs/USER_GUIDE.md#steamos-gaming-mode-compatibility). ## Before You Begin diff --git a/README.md b/README.md index aade1e5..828fc33 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This software is provided "AS IS", without warranty of any kind, express or impl **Compatibility:** - Compatibility cannot be guaranteed for all systems - Some features may not work on all Linux distributions or desktop environments -- SteamOS Desktop Mode is supported. Gaming Mode overlay support is experimental and off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A docked 2026-10-31 check showed the warning in all six supervised runs over a native fullscreen game, paused and during active play, with yad and zenity, including through countdown respawns with a 90-second minimum display. Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu, forced timeout, handheld (undocked) use, and Proton titles. Only one game has been tested, so other fullscreen games may still hide the popup. +- SteamOS Desktop Mode is supported. Gaming Mode overlay support is experimental and off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A docked 2026-10-31 check showed the warning over a native fullscreen game in all five in-game runs: paused (yad) and during active play (yad and zenity), including through countdown respawns with a 90-second minimum display. A sixth run on the Gaming Mode home screen was the control. Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. Only one game has been tested, so other fullscreen games may still hide the popup. - On Wayland/gamescope, always-on-top behavior is best-effort and full-screen games may block popups **Support:** @@ -272,7 +272,7 @@ systemctl --user daemon-reload ### Linux Distributions - ✅ Steam OS (Arch-based) - **Desktop Mode**: Supported on SteamOS Desktop Mode (KDE on X11). Popups work with some full-screen games; results vary by game, and exclusive full-screen games may still cover them. - - **Gaming Mode (Experimental)**: Off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). Option 12 in `sleep-warning-configure` routes dialogs through `gamescope`'s Xwayland overlay plane (`:0`) with `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1` and forced auto-close. Deck results: visible on 2026-10-19; click and Enter reached the dialog on 2026-10-20, and Enter did not also fire into Steam; on 2026-10-31 (docked) visible over a native fullscreen game during active play with yad and zenity, including through countdown respawns. Still unchecked: pressing Pause, touch, countdown input, the Quick Access Menu, forced timeout, handheld (undocked) use, and Proton titles. See [dev-docs/STEAMOS_GAMING_MODE.md](dev-docs/STEAMOS_GAMING_MODE.md). + - **Gaming Mode (Experimental)**: Off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). Option 12 in `sleep-warning-configure` routes dialogs through `gamescope`'s Xwayland overlay plane (`:0`) with `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1` and forced auto-close. Deck results: visible on 2026-10-19; click and Enter reached the dialog on 2026-10-20, and Enter did not also fire into Steam; on 2026-10-31 (docked) visible over a native fullscreen game while paused (yad) and during active play (yad and zenity), including through countdown respawns. Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. See [dev-docs/STEAMOS_GAMING_MODE.md](dev-docs/STEAMOS_GAMING_MODE.md). - ✅ Ubuntu (18.04+) - ✅ Debian (8+) - ✅ Fedora diff --git a/dev-docs/STEAMOS_GAMING_MODE.md b/dev-docs/STEAMOS_GAMING_MODE.md index a6463f4..55bd9aa 100644 --- a/dev-docs/STEAMOS_GAMING_MODE.md +++ b/dev-docs/STEAMOS_GAMING_MODE.md @@ -43,7 +43,7 @@ experimental tool coverage, not evidence that all three tools were verified. 5. **Safety Guardrails (`GAMESCOPE_FORCE_AUTO_CLOSE=true`)**: - `lib/popup-safety.sh` forces `auto_close="true"` when `env_type == "gamescope"`, ensuring popups always auto-close after `POPUP_MIN_DISPLAY_TIME + POPUP_AUTO_CLOSE_DELAY_SECONDS` in addition to the hard `POPUP_ABSOLUTE_MAX_SECONDS` watchdog. -The percentage tables and “planned changes” sections later in this document are historical planning estimates from before the experimental overlay. They are not measurements. Current behavior is the opt-in path above. Desktop Mode is supported. Gaming Mode remains experimental. A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A 2026-10-31 docked check showed yad and zenity visible over a native fullscreen game during active play, including across countdown respawns (see [On-device (2026-10-31)](#on-device-2026-10-31-visibility-over-fullscreen-games)). Still unchecked: pressing Pause and the pause notice, countdown input, touch, the Quick Access Menu after the popup closes, a forced timeout, handheld (undocked) use, and Proton titles. +The percentage tables and “planned changes” sections later in this document are historical planning estimates from before the experimental overlay. They are not measurements. Current behavior is the opt-in path above. Desktop Mode is supported. Gaming Mode remains experimental. A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A 2026-10-31 docked check showed the warning over a native fullscreen game while paused (yad) and during active play (yad and zenity), including across countdown respawns (see [On-device (2026-10-31)](#on-device-2026-10-31-visibility-over-fullscreen-games)). Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. ## Key Challenges @@ -555,7 +555,7 @@ Experimental Gaming Mode overlay support is implemented and **off by default**. ### On-device (2026-10-31): visibility over fullscreen games -A docked Steam Deck check (SteamOS 3.8.28, gamescope 3.16.23.6) did not reproduce the report of the warning showing on the home screen but not over a game. yad and zenity warnings were visible over a native fullscreen game, both paused and in active play. They stayed visible across countdown respawns with a 90-second minimum display. Every debug block showed our window as `predicted_overlay_wid`, with atom read-back `overlay=1 focus=1`. Keyboard and mouse focus moved to `:0` while the dialog was up, and an OK press over the running game reached the dialog. +A docked Steam Deck check (SteamOS 3.8.28, gamescope 3.16.23.6) did not reproduce the report of the warning showing on the home screen but not over a game. Warnings were visible over a native fullscreen game while paused (yad) and in active play (yad and zenity). They stayed visible across countdown respawns with a 90-second minimum display. Every debug block showed our window as `predicted_overlay_wid`, with atom read-back `overlay=1 focus=1`. Keyboard and mouse focus moved to `:0` while the dialog was up, and an OK press over the running game reached the dialog. Two setup details matter when comparing runs: diff --git a/dev-docs/development/steam-deck-ingame-overlay-investigation.md b/dev-docs/development/steam-deck-ingame-overlay-investigation.md index 610d76e..277e5fa 100644 --- a/dev-docs/development/steam-deck-ingame-overlay-investigation.md +++ b/dev-docs/development/steam-deck-ingame-overlay-investigation.md @@ -53,7 +53,7 @@ Other observations: - **Tool choice follows PATH.** yad on this Deck comes from Nix (`~/.nix-profile/bin/yad`). The user manager's PATH is `/usr/local/bin:/usr/bin`, so the scheduled service picks zenity (dark theme) and an SSH shell picks yad (light theme). - **Focus.** Keyboard and mouse focus move to `:0` while the dialog is up and return to `:1` after it closes. In the last zenity run the observer pressed OK over the running game, and the dialog exited 0 (an auto-close logs 143). The input method was not recorded. - **Service drop-in.** The installed drop-in was `mode-desktop.conf` (only `DISPLAY=:0`) while in Gaming Mode. Routing still worked, because the user manager supplies `XDG_CURRENT_DESKTOP=gamescope`. -- **Likely explanation for the original report.** A separate personal timer on this Deck quit Steam every 10 minutes starting 15 minutes before the warning windows opened. On 2026-10-31 it quit Steam at 01:20:46 and 01:30:46, and the first warning appeared at 01:30:51. So no game was running when the warnings fired. That timer now starts at the same times as the warning windows. +- **Likely explanation for the original report.** A separate personal timer on this Deck quit Steam every 10 minutes, starting 15 minutes before the warning windows opened. In the timer logs, the first warning of a window appeared about five seconds after one of those Steam quits. So no game was running when the warnings fired. That timer now starts at the same times as the warning windows. - **SSH preflight.** It needs `XDG_CURRENT_DESKTOP=gamescope DISPLAY=:0`; without them it reports routing `wayland` (a false blocker). Still unchecked: handheld (undocked), a Proton title, the Steam overlay or Quick Access Menu open at spawn time, and pressing Pause over a game. @@ -94,9 +94,14 @@ create is under a temporary HOME you delete at the end. and one native title if available). For each scene, while the dialog is alive, also capture from DISPLAY=:0: xwininfo -root -children (first 80 lines), and xprop -root | grep -E - 'GAMESCOPE|STEAM' (property names and values only). + 'GAMESCOPE|STEAM' (property names and values only). Keep these captures + local. In the report, list only our window and windows that carry + STEAM_OVERLAY or cover the full root, with WID, geometry, opacity and + WM_CLASS. Write [redacted] for every window name, ours included (ours is + the dialog title); identify our window by WID. 5. Copy each run's DEBUG-GAMESCOPE block and the surrounding gamescope log lines - from the temporary HOME's warnings.log. Strip the dialog title/body if present. + from the temporary HOME's warnings.log. Strip the dialog title/body, and + redact window names the same way as in step 4. 6. For each scene, mark H1-H4 from the investigation doc as SUPPORTED, REFUTED or UNCLEAR, citing the log line. Do not propose code changes beyond naming the hypothesis and the evidence. diff --git a/user-docs/CONFIGURATION.md b/user-docs/CONFIGURATION.md index 1a7dc85..d33a135 100644 --- a/user-docs/CONFIGURATION.md +++ b/user-docs/CONFIGURATION.md @@ -823,7 +823,7 @@ GAMING_MODE_EXPERIMENTAL_ENABLED=false - Off unless this key is `true`. An older `mode-gaming.conf` drop-in does not turn it on. - Option 12 can turn it on or off during lock hours. It does not change restriction hours. - If no usable display can be found, the warning tries `notify-send` instead of a modal dialog. Gaming Mode may not have a notification daemon. -- When the overlay path is active, zenity/yad warning dialogs request the full gamescope nested (`:0`) width and at least two thirds of that canvas height, placed at the top-left (gamescope 3.16.x treats narrower `STEAM_OVERLAY` windows as non-interactive notifications). Desktop Mode sizes and position are unchanged. Steam Deck verified 2026-10-20 (click + Enter) and 2026-10-31 (docked; visible over a native fullscreen game during play, yad and zenity). Still unchecked on device: pressing Pause and the pause notice, countdown input, touch, the Quick Access Menu, a forced timeout, handheld (undocked) use, and Proton titles. +- When the overlay path is active, zenity/yad warning dialogs request the full gamescope nested (`:0`) width and at least two thirds of that canvas height, placed at the top-left (gamescope 3.16.x treats narrower `STEAM_OVERLAY` windows as non-interactive notifications). Desktop Mode sizes and position are unchanged. Steam Deck verified 2026-10-20 (click + Enter) and 2026-10-31 (docked; visible over a native fullscreen game while paused with yad and during play with yad and zenity). Still unchecked on device: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. - **Button labels follow the tool:** zenity `--warning` has no Cancel (OK only, or OK + Pause). Yad without pause uses OK and Cancel; kdialog may say Dismiss. Gaming Mode often picks zenity, so a missing Cancel is expected. See [../dev-docs/STEAMOS_GAMING_MODE.md](../dev-docs/STEAMOS_GAMING_MODE.md). - Optional `GAMESCOPE_OVERLAY_DEBUG` (default off, not a wizard option) adds log-only diagnostics. Leave it unset unless you are collecting a Gaming Mode log. diff --git a/user-docs/USER_GUIDE.md b/user-docs/USER_GUIDE.md index 38c9d60..427d17e 100644 --- a/user-docs/USER_GUIDE.md +++ b/user-docs/USER_GUIDE.md @@ -673,7 +673,7 @@ Future versions may support custom messages per day or time range. - Requires `xprop` (`xorg-xprop`, pre-installed on SteamOS) for setting `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` - Classic X11 window manager geometry/immovable loops (`wmctrl`/`xdotool`) do not apply under `gamescope` except for the gamescope zenity top-left move (`xdotool`); minimum display time is enforced via countdown respawn and auto-close - **Buttons depend on the dialog tool:** zenity has no Cancel on `--warning` (OK only, or OK + Pause when pause is available). Desktop Mode may show Cancel (yad) or Dismiss (kdialog) if a different tool is selected. Missing Cancel in Gaming Mode with zenity is expected, not a gamescope bug. Prefer `DIALOG_TOOL=yad` if you want OK/Cancel-style chrome. -- **Checked on a Steam Deck:** popup visible and held for min-display (2026-10-19); click and Enter reached the dialog, and Enter did not also fire into Steam (2026-10-20); visible over a native fullscreen game, paused and during active play, with yad and zenity and through countdown respawns, while docked (2026-10-31). **Still unchecked:** pressing Pause and the pause notice, countdown input, touch, the Quick Access Menu, a forced timeout, handheld (undocked) use, and Proton titles. +- **Checked on a Steam Deck:** popup visible and held for min-display (2026-10-19); click and Enter reached the dialog, and Enter did not also fire into Steam (2026-10-20); visible over a native fullscreen game while docked, paused (yad) and during active play (yad and zenity), through countdown respawns (2026-10-31). **Still unchecked:** pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. **See [../dev-docs/STEAMOS_GAMING_MODE.md](../dev-docs/STEAMOS_GAMING_MODE.md) for detailed Gaming Mode technical documentation.** From b38361b07c944f2ebfeaf6caedc75655f7ae53d8 Mon Sep 17 00:00:00 2001 From: Kevin Grizzard <216068303+kgrizz-git@users.noreply.github.com> Date: Sat, 31 Oct 2026 17:39:07 -0400 Subject: [PATCH 5/6] docs: record Desktop Mode fullscreen check and Plasma Wayland immovable gap A 2026-10-31 Desktop Mode check on the Deck showed yad and zenity warnings above fullscreen Tyranny, with zenity on top through countdown respawns and game input returning after OK. SteamOS 3.8 Desktop Mode is Plasma on Wayland, not X11. Detection reports x11 because Xwayland :0 is reachable, but GTK dialogs open as native Wayland windows, so wmctrl/xdotool cannot see them and POPUP_IMMOVABLE does not apply. Correct the X11 claims in STEAMOS_GAMING_MODE.md, note the gap in README and CONFIGURATION, and add a low-priority TO_DO item covering a forced-X11 test run and a misleading auto-close log line. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + README.md | 2 +- dev-docs/STEAMOS_GAMING_MODE.md | 40 +++++++++++++++++++++++---------- dev-docs/TO_DO.md | 4 ++++ user-docs/CONFIGURATION.md | 2 +- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57a95e2..557fd20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Public docs:** Desktop Mode is described as supported, and Gaming Mode as experimental and opt-in, with the 2026-10-19 visibility result and the 2026-10-20 click and Enter result. The still-open Deck checks stay listed. Pause durations are 1, 2, 3, 5, 10, or 15 minutes (default 5), then a cooldown of 6, 8, 12, or 24 hours (default 24), measured from the last pause. The graphical schedule picker is documented as quarter-hour steps. Emergency stop text pairs Linux stop with disable, and macOS `bootout` with `disable`, and includes re-enable. Configure lock hours are described as tighten-only, and uninstall is described as available outside uninstall-block hours. macOS docs state that auto-close is forced at runtime and that the per-day cap is 16 hours. Installed names and behavior are unchanged. - **Gamescope overlay hit region:** Experimental Gaming Mode dialogs (warning, countdown respawn, and pause notice) are placed at the top-left of the nested `:0` canvas and are at least two thirds of that canvas tall, still full root width and still capped at the root height. The 2026-10-20 capture showed the cursor confined to roughly the top third while a short centered banner sat outside it. gamescope paints the overlay centered but draws the cursor offset by the window's position, so the window has to sit at 0,0. The zenity move uses `xdotool` under gamescope even when `wmctrl` is installed, since `wmctrl` cannot list windows there. Desktop Mode is unchanged. `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` stay as they are. Patch; the 16 h cap, popup watchdog, and escape hatch are unchanged. **Steam Deck verified 2026-10-20** (cursor reaches chrome; click works; Enter did not fire into Steam). - **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. The README, `GETTING_STARTED.md`, `user-docs/USER_GUIDE.md` and `user-docs/CONFIGURATION.md` list the result, and the still-unchecked items now name handheld (undocked) use and Proton titles in place of "docked versus undocked", and add the case where the Steam overlay or Quick Access Menu is already open when the warning spawns. The investigation notes stay in `dev-docs/development/steam-deck-ingame-overlay-investigation.md` as a closed record with a reusable agent prompt. Gaming Mode stays experimental and off by default. No code changed. +- **Desktop Mode fullscreen check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records a 2026-10-31 Desktop Mode check on the same Deck. yad and zenity warnings appeared above fullscreen Tyranny, and zenity stayed on top through countdown respawns. The game kept fullscreen and got input back after OK (tested with zenity). The doc no longer says Desktop Mode uses X11: SteamOS 3.8 runs Plasma on Wayland, and the dialogs open as native Wayland windows, so `POPUP_IMMOVABLE` does not apply there. The README and `user-docs/CONFIGURATION.md` say so. The immovable gap, a forced-X11 test, and a misleading auto-close log line are in `dev-docs/TO_DO.md`. No code changed. - **Gaming Mode warning buttons (docs):** Document that button labels follow the dialog tool — zenity `--warning` has no Cancel (OK only, or OK + Pause); yad may show Cancel; kdialog may say Dismiss. A missing Cancel in Gaming Mode with zenity is expected. Prefer `DIALOG_TOOL=yad` for OK/Cancel-style chrome. ### Fixed diff --git a/README.md b/README.md index 828fc33..ce2af95 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ This software is provided "AS IS", without warranty of any kind, express or impl - Compatibility cannot be guaranteed for all systems - Some features may not work on all Linux distributions or desktop environments - SteamOS Desktop Mode is supported. Gaming Mode overlay support is experimental and off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). A Steam Deck check on 2026-10-19 showed the popup over a fullscreen game, and a 2026-10-20 check showed click and Enter reaching the dialog without Enter also firing into Steam. A docked 2026-10-31 check showed the warning over a native fullscreen game in all five in-game runs: paused (yad) and during active play (yad and zenity), including through countdown respawns with a 90-second minimum display. A sixth run on the Gaming Mode home screen was the control. Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. Only one game has been tested, so other fullscreen games may still hide the popup. -- On Wayland/gamescope, always-on-top behavior is best-effort and full-screen games may block popups +- On Wayland/gamescope, always-on-top behavior is best-effort and full-screen games may block popups. On KDE Plasma Wayland (the SteamOS Desktop Mode default), popups are native Wayland windows, so `POPUP_IMMOVABLE` does not apply. A 2026-10-31 Desktop Mode check still showed them on top of a native fullscreen game. **Support:** - Provided on a best-effort basis with no guarantees diff --git a/dev-docs/STEAMOS_GAMING_MODE.md b/dev-docs/STEAMOS_GAMING_MODE.md index 55bd9aa..19f8180 100644 --- a/dev-docs/STEAMOS_GAMING_MODE.md +++ b/dev-docs/STEAMOS_GAMING_MODE.md @@ -50,7 +50,7 @@ The percentage tables and “planned changes” sections later in this document ### 1. Display Environment Detection **SteamOS Display Protocol Distinction**: -- **Desktop Mode**: Uses **X11** (KDE Plasma desktop environment runs on X11). Window manager tools (`wmctrl`/`xdotool`) work in Desktop Mode, enabling full window control features like making windows immovable, preventing closing, etc. +- **Desktop Mode**: KDE Plasma. On SteamOS 3.8 this is a **Wayland** session (`kwin_wayland`, with Xwayland on `:0` for X11 apps such as Steam). A Plasma X11 session is installed as an alternative but is not the default. Because `DISPLAY=:0` is reachable, `detect_display_environment()` reports `x11`, but GTK dialogs (yad, zenity) open as native Wayland windows when `WAYLAND_DISPLAY` is set. `wmctrl`/`xdotool` cannot see those windows, so the X11 window-control features (immovable, X11 keep-above and positioning) do not apply. See [On-device (2026-10-31): Desktop Mode](#on-device-2026-10-31-desktop-mode-over-a-fullscreen-game). - **Gaming Mode**: Uses **gamescope** (embedded Wayland compositor with Xwayland `:0` and `:1`). Standard Wayland or untagged X11 windows are hidden behind the running game; windows must connect to Xwayland `:0` and carry `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1`. **Gaming Mode Specific Challenges**: @@ -180,20 +180,20 @@ For testing requirements, see [plan-phase-4-testing.md](plans/phases/plan-phase- ##### 3. No Game Running / Desktop Mode - **Expected Effectiveness**: ~95% -- **Why**: Works identically to Desktop Mode (X11 environment) -- **Implementation**: Full dialog functionality available, window manager tools work (X11) -- **Reliability**: Same as Desktop Mode experience with full window control capabilities -- **Status**: Should work perfectly +- **Why**: Works identically to Desktop Mode +- **Implementation**: Dialogs display and respond. On a Plasma Wayland session the X11 window-management features (immovable, X11 positioning) do not apply (see [Display Environment Detection](#1-display-environment-detection)) +- **Reliability**: Same as Desktop Mode +- **Status**: Works, without X11 window control on Plasma Wayland ##### 3a. Full-Screen Games in Desktop Mode - **Expected Effectiveness**: Variable (game-dependent) -- **Why**: Desktop Mode uses X11, enabling window manager tools and better dialog visibility +- **Why**: In Desktop Mode, KWin stacks a new dialog above a fullscreen game without the gamescope overlay atoms - **Implementation**: - - Window manager tools (`wmctrl`/`xdotool`) work in Desktop Mode (X11) + - Dialogs are native Wayland windows on a Plasma Wayland session; `wmctrl`/`xdotool` cannot manage them - Dialog tools can appear over full-screen applications more reliably than in Gaming Mode - Some full-screen games may still block dialogs depending on their implementation - **Reliability**: Moderate to high, highly game-dependent -- **Status**: ⚠️ Limited testing indicates popups work with some full-screen games in Desktop Mode, but results vary by game. Exclusive full-screen games may still block popups. No guarantees can be made for all games. +- **Status**: ⚠️ Verified on 2026-10-31 over one native fullscreen game (see [On-device (2026-10-31): Desktop Mode](#on-device-2026-10-31-desktop-mode-over-a-fullscreen-game)). Other games, Proton titles, and exclusive full-screen modes are untested and may still block popups. ##### 4. Windowed Games - **Expected Effectiveness**: ~85-90% @@ -298,11 +298,10 @@ For testing requirements, see [plan-phase-4-testing.md](plans/phases/plan-phase- - Most windowed games: ~85-90% success - Borderless windowed: ~70-80% success -5. **Desktop Mode**: Full functionality +5. **Desktop Mode**: Supported (no X11 window control on Plasma Wayland) - Works identically to standard desktop environments - - Uses X11, so window manager tools (`wmctrl`/`xdotool`) work - - Full window control features available (immovable windows, prevent closing, etc.) - - **Full-Screen Games**: Limited testing indicates popups work with some full-screen games in Desktop Mode, but results vary by game. Exclusive full-screen games may still block popups. No guarantees can be made for all games. + - On a Plasma Wayland session (the SteamOS 3.8 default), dialogs are native Wayland windows, so the `wmctrl`/`xdotool` features (immovable, X11 keep-above) do not apply + - **Full-Screen Games**: Verified 2026-10-31 over one native fullscreen game. Other games, Proton titles, and exclusive full-screen modes are untested. #### ⚠️ Partial Success Areas @@ -564,6 +563,23 @@ Two setup details matter when comparing runs: Still unchecked: handheld (undocked) use, Proton titles, the Steam overlay or Quick Access Menu open when the warning spawns, and pressing Pause over a game. The investigation notes are in [steam-deck-ingame-overlay-investigation.md](development/steam-deck-ingame-overlay-investigation.md). +### On-device (2026-10-31): Desktop Mode over a fullscreen game + +Same docked Deck, in Desktop Mode (KDE Plasma on Wayland, SteamOS 3.8.28). Tyranny (native) ran fullscreen. Each run used the production `sleep-warning.sh` from the checkout with a temporary HOME, a `POPUP_ABSOLUTE_MAX_SECONDS` cap, and `timeout --kill-after=2s`. A human watched each run. The log reported `Display environment: x11` and `Window state: fullscreen, Window title: Tyranny` every time. + +| Run | Tool | Settings | On top of the game | Game stays fullscreen | Input back after OK | Window type | +|-----|------|----------|--------------------|-----------------------|---------------------|-------------| +| 1 | yad | medium, min 0 | yes | yes | not tested (auto-closed) | not captured | +| 2 | zenity | medium, min 0 | yes | yes | yes | native Wayland | +| 3 | zenity | large, immovable, pause on, min 45 s, service-like environment | yes, through 5 respawns | yes | yes | native Wayland, every respawn | + +- **Visibility works.** KWin stacks each new dialog, including each countdown respawn, above the fullscreen game. +- **Immovable does not work here.** The dialog could be dragged. It is a native Wayland window, so the `wmctrl`/`xdotool` position monitor never finds it. Only the next countdown respawn put it back in the center. This happens with the scheduled service too: its environment has `WAYLAND_DISPLAY=wayland-0`, and GTK then picks Wayland on its own. Tracked in [TO_DO.md](TO_DO.md#features-and-safety). +- **Theme.** zenity used Plasma's light GTK theme here; the dark zenity seen in Gaming Mode comes from that session. +- **Log wording.** After auto-close kills the dialog (exit 143), the log also says `User closed popup manually`. That line is wrong but harmless. + +Still unchecked in Desktop Mode: Proton titles, other games, handheld use, pressing Pause, and whether forcing the dialog onto Xwayland (`GDK_BACKEND=x11`) restores immovable without losing the on-top behavior. + ### Warning buttons (zenity vs Desktop) — Stream G Gaming Mode and Desktop Mode may pick different dialog tools (`DIALOG_TOOL=auto` prefers yad → zenity → kdialog; PATH and which packages are installed still matter). **Button labels follow the tool**, not gamescope: diff --git a/dev-docs/TO_DO.md b/dev-docs/TO_DO.md index e0d6dce..f5c6ea5 100644 --- a/dev-docs/TO_DO.md +++ b/dev-docs/TO_DO.md @@ -27,6 +27,10 @@ Doc convention: **`docs/`** = end-users; **`dev-docs/`** = developers and agents - [ ] Add `tests/test-popup-safety-linux-integration.sh` — wedge dialog, assert hard kill within cap (recommended) - [ ] Manual: `POPUP_AUTO_CLOSE=false` + stuck dialog → must terminate within `POPUP_ABSOLUTE_MAX_SECONDS` - Plan: [plans/plan-safety-scan-fixes-2026-05-30.md](plans/plan-safety-scan-fixes-2026-05-30.md) · Analysis: [safety-linux-macos-analysis.md](safety-linux-macos-analysis.md) §5.1 +- [ ] **Immovable popup on KDE Plasma Wayland (SteamOS Desktop Mode)** — Found 2026-10-31 ([STEAMOS_GAMING_MODE.md](STEAMOS_GAMING_MODE.md#on-device-2026-10-31-desktop-mode-over-a-fullscreen-game)). `detect_display_environment()` reports `x11` because Xwayland `:0` is reachable, but yad/zenity open as native Wayland windows (GTK picks Wayland when `WAYLAND_DISPLAY` is set, including in the service), so the `wmctrl`/`xdotool` position monitor never finds them and the popup can be dragged. Visibility over a fullscreen game is fine. Low priority. + - [ ] Run 4 on the Deck: same fullscreen-game run with the dialog forced onto Xwayland (`env -u WAYLAND_DISPLAY GDK_BACKEND=x11`, as the gamescope path does). Check whether immovable works and whether the dialog still appears above the fullscreen game. + - [ ] If it does, decide whether to force X11 dialogs on Plasma Wayland, or detect the session as `wayland` and skip the monitor with a log line. Either way, log when the window lookup fails instead of failing silently. + - [ ] Log wording: after auto-close kills the dialog (exit 143), the log also says `User closed popup manually`. Make it say the dialog was closed by auto-close. - [ ] **Additional hours on unrestricted days** — Lock/uninstall hours should not apply when a day has no restrictions (opt-in override) → [plan](plans/plan-additional-hours-no-restrictions.md) - [ ] **Popup frequency early tolerance** — Allow last-popup-time gate to fire up to `min(5% of POPUP_DISPLAY_FREQUENCY, 5 min)` early so 10-min settings do not slip to ~15 min on the 5-min timer grid; clamp early so earliest gap stays above popup on-screen time (`+60s` and `≤90%` cushions). **Plan needs human review — do not implement yet.** → [plan](plans/plan-popup-frequency-early-tolerance-2026-10-19.md) - [ ] **#29** — kdialog window size via `--textbox` + `--geometry` → [enhancement-29](enhancements/enhancement-29-kdialog-window-size-control.md) diff --git a/user-docs/CONFIGURATION.md b/user-docs/CONFIGURATION.md index d33a135..84a055f 100644 --- a/user-docs/CONFIGURATION.md +++ b/user-docs/CONFIGURATION.md @@ -364,7 +364,7 @@ POPUP_IMMOVABLE=false # Allow window movement **Note**: - Requires `wmctrl` or `xdotool` for functionality (X11 only). -- On Wayland, this feature is not available due to security restrictions. +- On Wayland, this feature is not available due to security restrictions. This includes KDE Plasma on Wayland, the SteamOS Desktop Mode default: the log reports `x11` there, but yad and zenity open as native Wayland windows, so the popup can be dragged. The next countdown respawn reopens it centered (checked with `POPUP_POSITION=center`). - The popup window will also stay on top of other windows automatically. - Setting this to `false` allows users to move the popup window, which may be useful if it blocks important content. From 7dd191d169a3b468986175ff6b83ff7cc2195b53 Mon Sep 17 00:00:00 2001 From: Kevin Grizzard <216068303+kgrizz-git@users.noreply.github.com> Date: Sat, 31 Oct 2026 23:57:49 -0400 Subject: [PATCH 6/6] docs: address CodeRabbit on Desktop Mode wording and duplicate TODO The README's SteamOS Desktop Mode entry still said "KDE on X11" with the old "results vary" text. Describe Plasma on Wayland, note that wmctrl/xdotool cannot manage the native Wayland dialogs, and cite the 2026-10-31 check. Add the same X11-only caveat to the window-tools list. Drop the auto-close log-wording sub-item added under the immovable TODO; the existing item under SteamOS Gaming Mode already tracks it and now notes the Desktop Mode sighting. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- README.md | 4 +++- dev-docs/TO_DO.md | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 557fd20..c75e3ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Public docs:** Desktop Mode is described as supported, and Gaming Mode as experimental and opt-in, with the 2026-10-19 visibility result and the 2026-10-20 click and Enter result. The still-open Deck checks stay listed. Pause durations are 1, 2, 3, 5, 10, or 15 minutes (default 5), then a cooldown of 6, 8, 12, or 24 hours (default 24), measured from the last pause. The graphical schedule picker is documented as quarter-hour steps. Emergency stop text pairs Linux stop with disable, and macOS `bootout` with `disable`, and includes re-enable. Configure lock hours are described as tighten-only, and uninstall is described as available outside uninstall-block hours. macOS docs state that auto-close is forced at runtime and that the per-day cap is 16 hours. Installed names and behavior are unchanged. - **Gamescope overlay hit region:** Experimental Gaming Mode dialogs (warning, countdown respawn, and pause notice) are placed at the top-left of the nested `:0` canvas and are at least two thirds of that canvas tall, still full root width and still capped at the root height. The 2026-10-20 capture showed the cursor confined to roughly the top third while a short centered banner sat outside it. gamescope paints the overlay centered but draws the cursor offset by the window's position, so the window has to sit at 0,0. The zenity move uses `xdotool` under gamescope even when `wmctrl` is installed, since `wmctrl` cannot list windows there. Desktop Mode is unchanged. `STEAM_OVERLAY=1` and `STEAM_INPUT_FOCUS=1` stay as they are. Patch; the 16 h cap, popup watchdog, and escape hatch are unchanged. **Steam Deck verified 2026-10-20** (cursor reaches chrome; click works; Enter did not fire into Steam). - **Gaming Mode visibility check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records the 2026-10-31 docked Steam Deck check. yad and zenity warnings were visible over a native fullscreen game during play, including through countdown respawns. The doc also explains that the scheduled service's PATH decides which dialog tool `auto` picks. The README, `GETTING_STARTED.md`, `user-docs/USER_GUIDE.md` and `user-docs/CONFIGURATION.md` list the result, and the still-unchecked items now name handheld (undocked) use and Proton titles in place of "docked versus undocked", and add the case where the Steam overlay or Quick Access Menu is already open when the warning spawns. The investigation notes stay in `dev-docs/development/steam-deck-ingame-overlay-investigation.md` as a closed record with a reusable agent prompt. Gaming Mode stays experimental and off by default. No code changed. -- **Desktop Mode fullscreen check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records a 2026-10-31 Desktop Mode check on the same Deck. yad and zenity warnings appeared above fullscreen Tyranny, and zenity stayed on top through countdown respawns. The game kept fullscreen and got input back after OK (tested with zenity). The doc no longer says Desktop Mode uses X11: SteamOS 3.8 runs Plasma on Wayland, and the dialogs open as native Wayland windows, so `POPUP_IMMOVABLE` does not apply there. The README and `user-docs/CONFIGURATION.md` say so. The immovable gap, a forced-X11 test, and a misleading auto-close log line are in `dev-docs/TO_DO.md`. No code changed. +- **Desktop Mode fullscreen check (docs):** `dev-docs/STEAMOS_GAMING_MODE.md` records a 2026-10-31 Desktop Mode check on the same Deck. yad and zenity warnings appeared above fullscreen Tyranny, and zenity stayed on top through countdown respawns. The game kept fullscreen and got input back after OK (tested with zenity). The doc no longer says Desktop Mode uses X11: SteamOS 3.8 runs Plasma on Wayland, and the dialogs open as native Wayland windows, so `POPUP_IMMOVABLE` does not apply there. The README and `user-docs/CONFIGURATION.md` say so. The immovable gap and a forced-X11 test are in `dev-docs/TO_DO.md`, and the existing auto-close log-wording item notes that it also happens in Desktop Mode. No code changed. - **Gaming Mode warning buttons (docs):** Document that button labels follow the dialog tool — zenity `--warning` has no Cancel (OK only, or OK + Pause); yad may show Cancel; kdialog may say Dismiss. A missing Cancel in Gaming Mode with zenity is expected. Prefer `DIALOG_TOOL=yad` for OK/Cancel-style chrome. ### Fixed diff --git a/README.md b/README.md index ce2af95..5a8a0a0 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ systemctl --user daemon-reload ### Linux Distributions - ✅ Steam OS (Arch-based) - - **Desktop Mode**: Supported on SteamOS Desktop Mode (KDE on X11). Popups work with some full-screen games; results vary by game, and exclusive full-screen games may still cover them. + - **Desktop Mode**: Supported on SteamOS Desktop Mode (KDE Plasma on Wayland, with Xwayland for X11 apps). yad and zenity open as native Wayland windows there, which `wmctrl` and `xdotool` cannot manage, so `POPUP_IMMOVABLE` and the X11 keep-above and positioning features do not apply. A 2026-10-31 Deck check showed the popup above a native fullscreen game, including through countdown respawns. Other games, Proton titles, and exclusive full-screen modes are untested and may still cover it. See [dev-docs/STEAMOS_GAMING_MODE.md](dev-docs/STEAMOS_GAMING_MODE.md#on-device-2026-10-31-desktop-mode-over-a-fullscreen-game). - **Gaming Mode (Experimental)**: Off by default (`GAMING_MODE_EXPERIMENTAL_ENABLED=false`). Option 12 in `sleep-warning-configure` routes dialogs through `gamescope`'s Xwayland overlay plane (`:0`) with `STEAM_OVERLAY=1` / `STEAM_INPUT_FOCUS=1` and forced auto-close. Deck results: visible on 2026-10-19; click and Enter reached the dialog on 2026-10-20, and Enter did not also fire into Steam; on 2026-10-31 (docked) visible over a native fullscreen game while paused (yad) and during active play (yad and zenity), including through countdown respawns. Still unchecked: pressing Pause and the pause notice, touch, countdown input, the Quick Access Menu after the popup closes, the Steam overlay or Quick Access Menu already open when the warning spawns, forced timeout, handheld (undocked) use, and Proton titles. See [dev-docs/STEAMOS_GAMING_MODE.md](dev-docs/STEAMOS_GAMING_MODE.md). - ✅ Ubuntu (18.04+) - ✅ Debian (8+) @@ -327,6 +327,8 @@ The system automatically detects which dialog tool is available and uses them in - Immovable popup windows during minimum display time - Better window state detection +These tools only manage X11 windows. On a Wayland session (including SteamOS Desktop Mode), native Wayland dialogs are outside their reach. + Without these tools, popups will still appear but may not stay on top of other windows or support position control. ## Troubleshooting diff --git a/dev-docs/TO_DO.md b/dev-docs/TO_DO.md index f5c6ea5..73caa8d 100644 --- a/dev-docs/TO_DO.md +++ b/dev-docs/TO_DO.md @@ -30,7 +30,6 @@ Doc convention: **`docs/`** = end-users; **`dev-docs/`** = developers and agents - [ ] **Immovable popup on KDE Plasma Wayland (SteamOS Desktop Mode)** — Found 2026-10-31 ([STEAMOS_GAMING_MODE.md](STEAMOS_GAMING_MODE.md#on-device-2026-10-31-desktop-mode-over-a-fullscreen-game)). `detect_display_environment()` reports `x11` because Xwayland `:0` is reachable, but yad/zenity open as native Wayland windows (GTK picks Wayland when `WAYLAND_DISPLAY` is set, including in the service), so the `wmctrl`/`xdotool` position monitor never finds them and the popup can be dragged. Visibility over a fullscreen game is fine. Low priority. - [ ] Run 4 on the Deck: same fullscreen-game run with the dialog forced onto Xwayland (`env -u WAYLAND_DISPLAY GDK_BACKEND=x11`, as the gamescope path does). Check whether immovable works and whether the dialog still appears above the fullscreen game. - [ ] If it does, decide whether to force X11 dialogs on Plasma Wayland, or detect the session as `wayland` and skip the monitor with a log line. Either way, log when the window lookup fails instead of failing silently. - - [ ] Log wording: after auto-close kills the dialog (exit 143), the log also says `User closed popup manually`. Make it say the dialog was closed by auto-close. - [ ] **Additional hours on unrestricted days** — Lock/uninstall hours should not apply when a day has no restrictions (opt-in override) → [plan](plans/plan-additional-hours-no-restrictions.md) - [ ] **Popup frequency early tolerance** — Allow last-popup-time gate to fire up to `min(5% of POPUP_DISPLAY_FREQUENCY, 5 min)` early so 10-min settings do not slip to ~15 min on the 5-min timer grid; clamp early so earliest gap stays above popup on-screen time (`+60s` and `≤90%` cushions). **Plan needs human review — do not implement yet.** → [plan](plans/plan-popup-frequency-early-tolerance-2026-10-19.md) - [ ] **#29** — kdialog window size via `--textbox` + `--geometry` → [enhancement-29](enhancements/enhancement-29-kdialog-window-size-control.md) @@ -47,7 +46,7 @@ Doc convention: **`docs/`** = end-users; **`dev-docs/`** = developers and agents - [x] **Click-through + magnification (Phase 1 code):** full `:0` root-width gamescope dialogs + atom/geometry logging → [plan](completed-plans/plan-gamescope-overlay-click-through-2026-10-19.md) - [x] **Click-through Phase 2 Streams E+F:** debug capture + top-left / ≥⅔-root height; on-device click retest passed 2026-10-20 → [plan](completed-plans/plan-gamescope-overlay-click-through-2026-10-19.md) - [x] **Click-through Phase 2 Stream G (docs):** zenity OK-only vs yad Cancel / kdialog Dismiss documented 2026-10-20 → [plan](completed-plans/plan-gamescope-overlay-click-through-2026-10-19.md) - - [ ] **Minor log bug (separate):** after auto-close SIGTERM, log may say `User closed popup manually` then exit 143 — fix classification when convenient + - [ ] **Minor log bug (separate):** after auto-close SIGTERM, log may say `User closed popup manually` then exit 143 — fix classification when convenient. Also seen in Desktop Mode on 2026-10-31. - [ ] **Desktop Mode, no external display** — Run test suite on Steam Deck internal display only - [ ] **Multi-distribution install** — Debian/Ubuntu, Fedora/RHEL, Arch/SteamOS, openSUSE, Alpine → [phase 3 plan](plans/phases/plan-phase-3-installation.md)