Files
summit/docs/WAYLAND_REPORT.md
alex 97b423e74d Wayland report (WAYLAND: PASS on the owner's KDE Plasma 6.8 desktop) and README status
Rows moved to Working only for what ran on that desktop: live enhance, launcher Play with Enhance, the clip key,
the display profile and summit doctor on KDE Wayland. Other Wayland desktops, a real native Wayland game and
fractional scaling stay Experimental.
2026-11-24 17:06:14 +00:00

13 KiB

WAYLAND: PASS

Wayland report

Run on 2026-11-24 on the owner's desktop: Arch Linux, KDE Plasma 6.8.2 Wayland (KWin 6.8.2, wayland-1, XWayland :0), NVIDIA GeForce RTX 5080 (driver 615.78.08), three monitors at scale 1 (HDMI-A-1 1920x1080 left, DP-1 1920x1080 @ 240 Hz middle, DP-2 2560x1600 right). Everything ran from ~/summit-test (source, cargo build --release there, engine venv made with uv venv -p 3.12 plus torch 2.11.0+cu128; torch lists sm_120 and ran a CUDA matmul on the 5080). Summit's config, data, cache and clips were pointed into ~/summit-test with the XDG variables. Tests ran on HDMI-A-1 except where noted.

PASS means the whole path below ran on that desktop and was looked at: Voidrunner started with Enhance on Wayland, from the launcher's Play button and from summit run custom:voidrunner --enhance; the engine's picture with the stats line and the watermark sat over the game; the game kept getting keys; Ctrl+Alt+R through the GlobalShortcuts portal saved a clip; killing the game stopped the engine and put the monitor's mode back.

It does not mean every Wayland case works. Most importantly: Voidrunner itself cannot run as a native Wayland program (its GLFW is built without the Wayland backend: X11: The DISPLAY environment variable is missing, then it crashes), so the Voidrunner runs are XWayland runs. The native Wayland capture path (portal + PipeWire) was run with a stand-in test window (engine/devtools/wayland_standin.py), not with a real game.

How it works now

Game's window Capture Picture on top Clip key
XWayland (Proton, Wine, most older native games, Voidrunner) as on X11: Composite + ffmpeg x11grab through XWayland's DISPLAY; no dialog an override-redirect window through XWayland: KWin keeps it above everything (a fullscreen game too), it never gets the keyboard, the pointer goes through GlobalShortcuts portal; without it, an X11 key grab through XWayland (fires while an XWayland window has the keyboard)
Native Wayland (KDE) xdg-desktop-portal ScreenCast (one window, pointer hidden, persist_mode 2) to a PipeWire stream, read by gst-launch-1.0 pipewiresrc piping raw BGR (CPU copy) the same XWayland window, placed from KWin's window list (a one-shot KWin script reports pid, title, place and focus over D-Bus) GlobalShortcuts portal

The engine picks between the two by looking for the game (pid:N, title, class:) every half second among XWayland windows and among KWin's native windows. The share dialog shows once; the restore token is kept in ~/.config/summit/screencast-token (mode 600).

Verified (each was run on the owner's desktop and its output or image looked at)

  1. XWayland windows can be read with x11grab on KWin Wayland + NVIDIA (the engine's old docstring said they could not): a 30-frame grab of Voidrunner's 1280x720 window decoded with the right picture.
  2. Overlay through XWayland: GLFW picked its Wayland backend by default (so the first try was not the X11 path); the engine now asks GLFW for X11 when the overlay is needed on a Wayland session. The override-redirect window covered HDMI-A-1 over the game, _NET_ACTIVE_WINDOW stayed on the game.
  3. Found and fixed (not Wayland-only): --monitor with the fullscreen overlay never matched (GLFW monitor pointers compared by identity), so the picture covered the whole X screen, all three monitors (seen once, about 10 s). Now matched by name: it covers HDMI-A-1 only. The single-monitor X11 test VM never showed this.
  4. Keys reach the game under the picture. Keys were injected with xdotool (XTest, through KWin's input emulation for XWayland: KDE asked the owner to allow it once, he did) and only while the game was the active window (checked before every key; it caught the owner clicking elsewhere several times and sent nothing). The game went from its splash to New Run and the artifact choice and moved the selection with a/d. For the native stand-in, its own log shows key a, key b, key c with the picture on top, and no focus change.
  5. summit run custom:voidrunner --enhance (profile: RIFE, FSR, fullscreen, HDMI-A-1, 1920x1080 @ 60): game and engine started, engine picture over HDMI-A-1 (60 fps game 60 delay 20-28 ms on the stats line), the watermark bottom-left, Ctrl+Alt+R saved Voidrunner ….mp4 (13.4 s, the buffer was 13 s old), killing the game ended summit run in 250-700 ms with no process left.
  6. From the launcher: summit-gui on Voidrunner's page, Enhance on, Play (Return, sent only while KWin said the launcher was the active window): it ran summit run custom:voidrunner --enhance --title=Voidrunner -- …; then as in 5; clip 14.75 s, H.264 1280x720, 884 frames, ffmpeg -f null decodes all of it (one "non monotonically increasing dts" warning, as on X11). Found and fixed: the launcher refused Enhance on any non-X11 session.
  7. Display profile on KDE Wayland, for real: HDMI-A-1 went from mode id 49 (1920x1080 @ 119.98) to 51 (@ 60) during the game and back to 49 after, four times. Found and fixed: the old plan asked by name (1920x1080@120), which this monitor has twice (ids 48 @ 119.88 and 49 @ 119.98), so the restore could pick the wrong one; it also ran output.X.enable on an output that was on, as a separate call. Now: one kscreen-doctor call (as its --help says), the mode by id from kscreen-doctor -j, no enable for an output that is on. Syntax checked against the installed kscreen-doctor 6.8.2 (--help, -j).
  8. Found and fixed: summit profile set --width 0 --height 0 made summit run call kscreen-doctor output.HDMI-A-1.mode.0x0@60. kscreen-doctor refused it and the monitors stayed as they were (checked: DP-2 1, DP-1 17, HDMI-A-1 49, the same as at the start); zeros now mean "not set".
  9. GlobalShortcuts portal: Plasma refuses a host program without an app id (An app id is required). Summit now calls org.freedesktop.host.portal.Registry.Register("summit") first. That needs summit.desktop in an applications folder whose Exec program exists (GLib skips it otherwise: the first try failed until summit-gui was built). With the file there (the owner allowed ~/.local/share/applications/summit.desktop for the test; install.sh installs one), the shortcut was bound in 1.7 s with no dialog, and Ctrl+Alt+R saved clips. The game also sees the Ctrl and Alt presses (KWin swallows only the R).
  10. XWayland key grab fallback: before the app id fix, the portal failed and the engine fell back to an X11 grab through XWayland; Ctrl+Alt+R with the XWayland game focused saved a 15.4 s clip.
  11. Native Wayland window through the portal (stand-in window): the share dialog appeared and the owner picked the window within 9 s. 299 new frames in 6 s (49.7 a second) at 1280x720. The next run, with a new window of the same program, was restored from the token with no dialog (shared after 0.0 s), and so were the three runs after it. Picture over the window (windowed: lined up with the window's frame; KWin's window stream includes the title bar) and over its monitor (fullscreen), stats and watermark drawn, clip saved with the portal key (4.3 s: RIFE's warm-up took most of the short run), stream end noticed 603 ms after the window closed.
  12. Fullscreen games under the picture: Voidrunner in its own fullscreen mode (XWayland) and the stand-in fullscreen on HDMI-A-1 (native): the picture stayed on top in both. With the native one fullscreen and nothing else touched, KWin's active window stayed the stand-in for 16 s while the engine drew (polled every 0.5 s).
  13. A failing engine no longer kills the game: summit run … --enhance --window class:nothing --wait 3: the engine said no window matches 'class:nothing' after 3 s, the game kept running, summit run printed Enhance could not run (exit status: 1; …): the game went on without it, and ended when the game ended.
  14. summit doctor on the desktop: session, XWayland, ScreenCast (window sharing), save key (portal + desktop file), PipeWire + pipewiresrc, KWin, kscreen-doctor, GPU and driver, torch with CUDA: all ok. With the desktop file absent it warns that Ctrl+Alt+R only works while an XWayland game has the keyboard.
  15. install.sh --dry-run on the desktop: detects wayland and adds gstreamer gst-plugins-base gst-plugin-pipewire to the pacman line (all three were already installed there). Not run for real.
  16. Gamescope 3.17.0 (evaluated, not wired in): gamescope -w 1280 -h 720 -W 1920 -H 1080 -F fsr -- ./top_down_shooter runs nested on Plasma Wayland on the 5080 (Vulkan, its Wayland backend) and showed Voidrunner upscaled with its own FSR. It is an upscaler and a nested compositor, no frame generation; its window is a native Wayland window, so Summit's engine could only read it through the portal. Could be offered later as a profile option ("upscale with gamescope"); not a dependency.
  17. Tests: cargo test --workspace (1 + 104 + 19) and the engine's pytest on the desktop's venv (38 passed, 1 skipped) before the commits.

Measured

XWayland game (Voidrunner 1280x720) Native stand-in (PipeWire)
Frames read ~60 grabs a second, 0-1 % unchanged ~50 new frames a second at 1280x720 alone; 744 in about 12 s inside the engine
Engine output 59.2-59.7 frames a second (60 Hz target) 59.5
FSR draw on the GPU 0.06 ms at 1920x1080 0.06 ms at 1860x1080
Frame reaches the engine -> on screen p50 21-38 ms, p95 22-55 ms (five runs) p50 21.8-22.6 ms, p95 24-25 ms
CPU ffmpeg x11grab (not measured here) gst-launch-1.0 18-19 % of one core at 1920x1080; the engine process 69 %

"Reaches the engine -> on screen" is the engine's own measure. The time from the game drawing a frame to the engine receiving it (x11grab polling, KWin's screencast) was not measured. The CPU copy was kept: DMA-BUF import was not tried.

Not verified, or known limits

  • A real native Wayland game (only the stand-in). Voidrunner can't run on Wayland natively.
  • Pressing keys on a real keyboard: all keys were injected (XTest through KWin, allowed by the owner).
  • Other desktops: GNOME, sway, Hyprland were not available. Without KWin the engine can't tell which native window is the game: the dialog lets the user pick it and the picture goes over the --monitor screen (written, untested). GNOME has no monitor tool (summit doctor says so).
  • Fractional scaling: all three monitors were at scale 1. With scaling, XWayland's coordinates and KWin's differ and the picture may not line up. Untested.
  • The restore token across a reboot or for a different game was not tried; the dialog will likely show again for a different program.
  • One unexplained focus change: in one run the native stand-in logged focus out about 5 s after it started, right after an XWayland run on the same monitor had been stopped; a clean repeat (item 12) kept the focus. Not understood.
  • The share dialog's window choice is the user's: if they pick another window, the engine enhances that one.
  • Output at 90/120/240 Hz, VRR, HDR: the engine ran at 60 Hz; DP-1 runs at 240 Hz and was not used for output tests.
  • install.sh for real on the desktop (only --dry-run). The global key through the portal needs the installed summit.desktop; a Summit run from a checkout without it gets the XWayland grab only.
  • The launcher's other keys on Wayland (only Return on Play was pressed); which backend the launcher window used (native Wayland or XWayland) was not checked.
  • DMA-BUF / zero copy (see above). Clip audio. Steam or Proton games on Wayland.

On the owner's machine during and after the run

  • Left: ~/summit-test (8.9 GB: source, target/, the engine venv with torch, uv's cache and Python, the game copy, logs, the two clips). Delete it with rm -rf ~/summit-test when done.
  • Created and removed again: ~/.local/share/applications/summit.desktop (allowed by the owner for the portal test), the [summit] component in ~/.config/kglobalshortcutsrc that the portal created (removed through kglobalaccel's cleanUp), the ScreenCast permission entry for app summit (deleted from the permission store by its token id), ~/.local/share/summit (made by one summit add before I pointed XDG_DATA_HOME away; moved into ~/summit-test), the full-desktop screenshots.
  • Still there, the owner's choice: KDE's permission for legacy X11 programs to send input (the dialog for xdotool); it can be revoked in System Settings. I did not remove anything from the remote-desktop permission table because I could not tell which entry was that one.
  • Mistakes: my first test scripts started the game through a subshell and killed only the subshell, so five Voidrunner windows stayed open on HDMI-A-1 for a few minutes. All five were killed by PID after checking that each one's executable was ~/summit-test/game/top_down_shooter. The overlay covered all three monitors once for about 10 s (the --monitor bug, item 3) and DP-1, the owner's main screen, for about 12 s in one native test. HDMI-A-1's refresh rate was switched to 60 Hz and back four times.
  • Nothing was installed system-wide, no sudo, nothing under ~/Games, ~/Projects or Steam was written; the launcher read the Steam library while it ran.