Replies: 2 comments
|
thank you for telling me about |
2026-05-08 updateI've filed this issue: Supreeeme/xwayland-satellite#429 for xwayland-satellite. If X11 And I actually had luck with it. If anyone's not minding it, commit bczhc/xwayland-satellite@bac9faf is the AI-made fix for Supreeeme/xwayland-satellite#429. If looking at gsr-ui's code, gsr-ui just doesn't start an OR (override_redirect) window on niri, for some reason I don't know. So the next step is to patch gsr-ui: diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 053020b..a542d96 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -1163,11 +1163,7 @@ namespace gsr {
- const Window x11_focused_window = get_focused_window(display, WindowCaptureType::FOCUSED, false);
- const bool prevent_game_minimizing = gsr_info.system_info.display_server != DisplayServer::WAYLAND
- || (x11_focused_window && is_window_fullscreen_on_monitor(display, x11_focused_window, *focused_monitor))
- || is_wlroots
- || is_hyprland;
+ const bool prevent_game_minimizing = true;
const bool drm_cursor_pos = (!prevent_game_minimizing || is_wlroots || is_hyprland) && cursor_info;
if(drm_cursor_pos)After this, gsr-ui will try to start an OR window instead of a normal window on niri, and xwayland-satellite with that issue fixed will use overlay layer-shell for any OR window. Thus we can get gsr-ui fully work very well on niri. (No 2. and 3. of the "remaining issues" above are solved). For the "remaining issues" no. 1, dec05eba stated:
Maybe more hack is needed for this. But anyway dec05eba said they now have started to play around with wlr-layer-shell a bit and are trying to make gsr-ui work properly on niri. Tl; dr GSR-UI solution for niri as of 2026-05-08
2026-05-08 0358Z update again:Oops I just noticed gsr-ui has this commit just pushed: https://git.dec05eba.com/gpu-screen-recorder-ui/commit/?id=353df088de909cc7926467623f5516a46d4d82d3 So, the gsr-ui patch mentioned above is not required anymore if you're using this. But 2026-05-11 update:dec05eba added native Wayland support for gsr-ui and gsr-notification, using wlr-layer-shell's overlay layer. This is a good new. Xwayland-satellite and all the hacky workarounds above are not needed anymore. After tons of email discussions and tests+bug reports gsr-ui finally did it, and it runs perfectly on niri now! One last thing I want gsr-ui to do is warp the pointer to center+use "none" keyboard interactivity if the pointer is locked. I've added an ipc to niri to query if the pointer is currently locked and later i'll hack gsr-ui to achieve this. 2026-05-11 1313Z update:
If anyone wants this also, there are the patches: niri: gsr-ui: and use an extra new script to do gsr-ui toggle-show: #!/bin/bash
locked="$(niri msg -j has-pointer-constraints | jq '.has_pointer_constraints')"
[ "$locked" = "true" ] && niri msg action set-pointer $((1920/2)) $((1080/2))
gsr-ui-cli toggle-show |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tl;dr: All is not needed anymore. GSR-UI has added native wayland support using wlr-layer-shell's overlay layer now.
Old attempts trying to make gsr-ui work on niri:
gpu-screen-recorder-ui (referred to as
gsr-uibelow), a ShadowPlay like overlay for controlling gpu-screen-recorder. Note the latter one is a cli and is the core part of the screen recorder, and supports both X and Wayland. However the overlay app, is an X app and only supposed/guaranteed to work well on X. And indeed the fact - gsr-ui has several issues on niri.For example gsr-ui will starts as a normal toplevel window on niri, and as a standalone column. Though gsr-ui has some transparency, by the nature of tiling compositors, in this case gsr-ui's background will be black or the background layer (aka. the wallpaper). To make it show the content behind it, gsr-ui should be floating. However the
open-fullscreen falsewindow rule doesn't work for this because somehow gsr-ui spawns its window first and then later, does a postponed fullscreen request. See issue: #3106.Considering gsr-ui is still an X application, I'm able to tweak xwayland-satellite to make gsr-ui work better. Thanks there is an amazing tool: wl-proxy from @mahkoh, xwayland-satellite can be started as a wayland
overlaylayer.Just starting a separate xwayland server (as overlay layer via
wl-paper) and only dedicated to gsr-ui:..will solve the issue, and it makes gsr-ui work perfectly, almost.
Screenshot
Remaining issues are:
Record - Startto start the recording, the gsr notification is displayed normally (the top-right corner, screenshot). However, if starting the recording viagsr-ui-cli toggle-record, the notification is at the top-left. Screenshot.Other notes
In the
wl-paperabove,--margin-top -28is to make the overlay occupy the whole screen otherwise it will only occupy the space below the bar (waybar, DMS bar etc.). Tweak-28to find the proper value, or apply this patch to makewl-paperalways occupy the whole screen:--keyboard-interactivity noneoption is to let the overlay completely ignore key events. Currently seems gsr-ui has no key interactions except Esc (to exit GSR). So I just ignore all keys here, otherwise it may take the focus, causing issue like, some video games (like Minecraft) will show the menu on focus lose.I had detailed talks on this with dec05eba today.
Some quotes from dec05eba
The author's basic idea is it's niri/xwayland-satellite's lack of implementation of specific X protocols (like override redirect windows). And if niri/xwayland-satellite implements it, it should behave the same as Wayland's overlay layer.
And sadly they are not a fan of Wayland.
:(
All reactions