gpu-screen-recorder-ui: init at 1.10.8#369574
Conversation
pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-notification.nix
Outdated
Show resolved
Hide resolved
pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-ui.nix
Outdated
Show resolved
Hide resolved
|
Please introduce the packages in pkgs/by-name instead EDIT: it will be easier to maintain because of bots |
I want to move |
There was a problem hiding this comment.
Nice work! Here are my overall observations:
- I think the ui module should be consolidated into the existing
gpu-screen-recordermodule instead of being a separate one. For instanceprograms.gpu-screen-recorder.ui.enable = true; The service should be started by default with theui.enableoption set to true, but allow to be disabled.Maybe allow for the notification to be disabled. Not sure why people would do that, but you never know.- Agreed that the package should be moved to
by-name.
|
pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-notification.nix
Show resolved
Hide resolved
I don't see a any dependency on that. You must init this in by-name by the way; it's policy now. |
83c78fe to
09a7171
Compare
keenanweaver
left a comment
There was a problem hiding this comment.
nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 369574
x86_64-linux
✅ 2 packages built:
- gpu-screen-recorder-notification
- gpu-screen-recorder-ui
09a7171 to
d03a644
Compare
❯ getcap /nix/store/knnqxpy6rbakrhhdbg496fv1hpzjhhy3-gpu-screen-recorder-ui-1.6.1/bin/gsr-global-hotkeys
empty
❯ getcap /nix/store/knnqxpy6rbakrhhdbg496fv1hpzjhhy3-gpu-screen-recorder-ui-1.6.1/bin/gsr-ui
empty
❯ pidof gsr-ui
2883
❯ cat /proc/2883/status | grep CapEff
CapEff: 0000000000000000
❯ pidof gpu-screen-recorder
42594
❯ cat /proc/42594/status | grep CapEff
CapEff: 0000000000800000Yea, GPU-screen-recorder have |
|
The issue is here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/gpu-screen-recorder.nix#L37 gpu-screen-recorder package was updated but this wasn't. gpu-screen-recorder needed cap_sys_nice before, but it should no longer have that (it should have been removed when gsr-dbus-server was removed). |
1: Removed Patch
diff --git a/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix b/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix
index 68539fffa99a..cf3a5e9159ef 100644
--- a/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix
+++ b/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix
@@ -21,6 +21,7 @@
wayland-scanner,
wrapperDir ? "/run/wrappers/bin",
gitUpdater,
+ bash,
}:
stdenv.mkDerivation rec {
@@ -62,6 +63,7 @@ stdenv.mkDerivation rec {
libdrm
wayland
wayland-scanner
+ bash
];
mesonFlags = [
`systemctl` output
systemctl --user status gpu-screen-recorder-ui.service
● gpu-screen-recorder-ui.service - GPU Screen Recorder UI Service
Loaded: loaded (/etc/systemd/user/gpu-screen-recorder-ui.service; enabled; preset: ignored)
Drop-In: /nix/store/00b7nwlgr0qxhjia8hv7zdlpsi7p8l5q-user-units/gpu-screen-recorder-ui.service.d
└─overrides.conf
Active: active (running) since Sun 2025-08-17 15:48:08 +03; 5min ago
Invocation: 06d8199bc0d64457ab00ed6730b957cf
Main PID: 231175 (.gsr-ui-wrapped)
Tasks: 11 (limit: 76913)
Memory: 417.8M (peak: 421.3M)
CPU: 44.019s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gpu-screen-recorder-ui.service
├─231175 /nix/store/30x1hg98r3nh8b2ypba8wc02g6m9cqhk-gpu-screen-recorder-ui-1.6.1/bin/gsr-ui launch-daemon
├─231229 /nix/store/30x1hg98r3nh8b2ypba8wc02g6m9cqhk-gpu-screen-recorder-ui-1.6.1/bin/gsr-global-hotkeys --all
└─232447 /nix/store/f8glvxqapbf65rx04pzqbmkxmnbaxvr1-gpu-screen-recorder-5.6.5/bin/.wrapped/gpu-screen-recorder -w portal -c mp4 -ac opus -cursor yes -cr lim>
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: Framerate: 0/1
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: negotiated format:
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: Format: 8 (Spa:Enum:VideoFormat:BGRx)
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: Modifier: 0x300000000606014
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: Size: 2560x1440
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: Framerate: 0/1
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: pipewire: stream 0x1b0d4fe0 previous state: "paused", new state: "streaming" (error: none)
Aug 17 15:48:54 Nix gsr-ui[232447]: gsr info: gsr_capture_portal_start: pipewire negotiation finished
Aug 17 15:48:55 Nix gsr-ui[232447]: gsr info: using h264 encoder because a codec was not specified
Aug 17 15:48:55 Nix gsr-ui[232447]: [h264_nvenc @ 0x1b8900c0] ignoring invalid SAR: 0/0Portals are working, and region selection also appeared. |
|
Thank you for diving into that. I was wondering if it was just me with the portal issue. Everything's working for me again after the above changes. (ignore my own changes) keenanweaver/nix-config@cdced96 |
|
Any chance this gets merged? |
My bad! Missed that when updating gpu-screen-recorder, portal capture should work again with #442391 |
bd189dd to
75c9ed9
Compare
|
praying for this to be merged soon |
| gitUpdater, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { |
There was a problem hiding this comment.
Nitpick (because I don't think this is enforced in any documentation yet), but if necessary this could be a finalAttrs instead of using rec.
There was a problem hiding this comment.
See my rationale in #367552 (comment) and #367552 (comment). finalAttrs vs rec here have their own readability/perf/overriding traps tradeoffs, and I still don't think there is a consensus on what should be used.
| in | ||
| { | ||
| options = { | ||
| programs.gpu-screen-recorder-ui = { |
There was a problem hiding this comment.
+1 on having this be in programs.gpu-screen-recorder.ui or something similar instead of clogging up the namespace.
There was a problem hiding this comment.
My thinking is that gpu-screen-recorder/gpu-screen-recorder-ui are designed in a way to be independent of each other, so it makes sense to treat them as separate projects. The frontend could have very well been made by a different person, in which case it would feel weird to merge the options.
There was a problem hiding this comment.
gpu-screen-recorder-ui assumes that it can call gpu-screen-recorder with very specific options, so that sounds highly dependent to me (and we are even setting programs.gpu-screen-recorder.enabled if programs.gpu-screen-recorder-ui.enabled is given). Further, even if someone makes a compatible third-party backend in the future then the contract would still feasibly be named gpu-screen-recorder, since that is what the compatibility is measured by.
Therefore, it would be reasonable to have everything in programs.gpu-screen-recorder, since there will be programs.gpu-screen-recorder.package to adjust the backend implementation and programs.gpu-screen-recorder.ui.package to adjust the frontend implementation (and the respective enable options, obviously).
That said, according to the derivation, gpu-screen-recorder-ui currently strictly depends on the gpu-screen-recorder derivation with no way of changing that, so any argument about them being any kind of independent is moot anyway.
There was a problem hiding this comment.
Current programs.gpu-screen-recorder/programs.gpu-screen-recorder-ui modules are really only for the setuid wrappers, so an alternative frontend wouldn't have a reason to reuse it. Like in my mind, what you are suggesting would be akin to adding a programs.ffmpeg.{vlc,mpv}.enable.
75c9ed9 to
df7458e
Compare
|
The NIXOS_OZONE_WL variable has some weird interactions with this package, it seems. (running this on kde plasma wayland, GSR 5.8.1, GSR-UI 1.8.0) Video_2025-12-16_18-50-21.mp4I absolutely love this program, thank you for packaging it! |
df7458e to
e2b61c6
Compare
I'm on the same setup and can't reproduce, so not sure what the issue is. Likely an upstream bug though. |
|
@matkijahenkilo As mention in the notification when you first launch gsr ui, it cant work properly on wayland because of wayland limitations (specifically with how it interacts with xwayland applications (games), since they get minimized when you open a fullscreen application when the game is fullscreen). It will never be possible to make it work properly on wayland and it instead has to rely on multiple hacks and undefined behavior in different wayland compositors + xwayland to hopefully work, in every scenario. The fix for your issue would be to add yet another hack that hopefully works. Report the issue you have by email as mentioned here: https://git.dec05eba.com/?p=about and explain exactly how to reproduce it, for example which terminal that is that you have focused. I think in your case the issue is that you have an x11 application in the background (the browser) that is fullscreen while the terminal is a wayland application. If you try to make the browser a window instead of fullscreen and then open the gsr ui again then I dont think you would have that issue of typing text in terminal and gsr ui at the same time. |
|
@dec05eba I'm wondering if it works any better, when I run games under the "Wayland native" with |
|
@VeilSilence The issue could still happen in that case. I believe the issue specifically in this case is having a fullscreen x11 application, even if it's in the background. If you had that and then opened a wayland native game in fullscreen you would still experience the issue. The issue would disappear if you dont have any x11 application running fullscreen or dont have any x11 application running at all. I may be able to workaround that issue, I'll have to look into it. |
|
@matkijahenkilo @VeilSilence I added a workaround for this issue that works now and it will be available in the next update. Although this is off-topic and further discussion should be done by email as mentioned here: https://git.dec05eba.com/?p=about |
|
Any hopes for this to get the last push it needs? |
e2b61c6 to
73728d0
Compare
73728d0 to
927cd45
Compare



https://git.dec05eba.com/gpu-screen-recorder-ui/about/
Fullscreen overlay UI for GPU Screen Recorder in the style of ShadowPlay
Closes #369558
Depends on #367552
Usage
gsr-uisystemctl enable --now --user gpu-screen-recorder-uiQuestion: Should this be a nixos module option?
Alt+Z(key binds are not configurable yet)Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.