-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
gpu-screen-recorder-ui: init at 1.6.1 #369574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Here are my overall observations:
- I think the ui module should be consolidated into the existing
gpu-screen-recorder
module instead of being a separate one. For instanceprograms.gpu-screen-recorder.ui.enable = true;
The service should be started by default with theui.enable
option 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
Outdated
Show resolved
Hide resolved
pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-ui.nix
Outdated
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
09a7171
to
d03a644
Compare
d03a644
to
5c405e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great. Thanks for continuously updating this while we wait for its merging. Only thing right now is you should probably update the PR title to reflect the current version number.
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
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/5256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest updates bump
5c405e5
to
a6ddedd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nixpkgs-review
result
Generated using nixpkgs-review
.
Command: nixpkgs-review pr 369574
x86_64-linux
⏩ 2 packages blacklisted:
- nixos-install-tools
- tests.nixos-functions.nixos-test
✅ 2 packages built:
- gpu-screen-recorder-notification
- gpu-screen-recorder-ui
a6ddedd
to
a2d82bd
Compare
a2d82bd
to
413338d
Compare
413338d
to
125ac0a
Compare
125ac0a
to
bd189dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nixpkgs-review
result
Generated using nixpkgs-review
.
Command: nixpkgs-review pr 369574
x86_64-linux
⏩ 2 packages blacklisted:
- nixos-install-tools
- tests.nixos-functions.nixos-test
✅ 2 packages built:
- gpu-screen-recorder-notification
- gpu-screen-recorder-ui
● 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/szj3sx9y7r5xfbgbyy15yancrpaylb4a-user-units/gpu-screen-recorder-ui.service.d
└─overrides.conf
Active: active (running) since Sun 2025-08-17 14:50:50 +03; 48s ago
Invocation: 192eddeb8f80466aaf8fd3093862b61a
Main PID: 2883 (.gsr-ui-wrapped)
Tasks: 3 (limit: 76913)
Memory: 17.5M (peak: 52.4M)
CPU: 585ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gpu-screen-recorder-ui.service
├─2883 /nix/store/knnqxpy6rbakrhhdbg496fv1hpzjhhy3-gpu-screen-recorder-ui-1.6.1/bin/gsr-ui launch-daemon
└─2905 /nix/store/knnqxpy6rbakrhhdbg496fv1hpzjhhy3-gpu-screen-recorder-ui-1.6.1/bin/gsr-global-hotkeys --all
Aug 17 14:50:50 Nix impurity[2896]: PID 2890 executed /bin/sh
Aug 17 14:50:50 Nix gsr-ui[2894]: /bin/sh: line 1: sh: command not found
Aug 17 14:50:50 Nix gsr-ui[2890]: gsr error: gsr_dbus_call_screencast_method: failed with error: Portal operation not allowed: Unable to open /proc/2890/root
Aug 17 14:50:50 Nix gsr-ui[2890]: gsr error: gsr_dbus_screencast_create_session: failed to setup ScreenCast session. Make sure you have a desktop portal running >
Aug 17 14:50:50 Nix gsr-ui[2883]: Warning: Wayland doesn't support this program properly and XWayland is required. Things may not work as expected. Use X11 if yo>
Aug 17 14:50:50 Nix gsr-ui[2883]: gsr-ui info: running command: gpu-screen-recorder --list-capture-options /dev/dri/card1 nvidia
Aug 17 14:50:50 Nix gsr-ui[2903]: gsr error: gsr_dbus_call_screencast_method: failed with error: Portal operation not allowed: Unable to open /proc/2903/root
Aug 17 14:50:50 Nix gsr-ui[2903]: gsr error: gsr_dbus_screencast_create_session: failed to setup ScreenCast session. Make sure you have a desktop portal running >
Aug 17 14:50:50 Nix gsr-ui[2883]: Info: gsr ui is now ready, waiting for inputs. Press alt+z to show/hide the overlay
Aug 17 14:50:50 Nix gsr-ui[2883]: Warning: Failed to read config file: /home/veilfear/.config/gpu-screen-recorder/config_ui
~ I'm using KDE, and the service fails to use portal. |
@VeilSilence That happens if |
❯ 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: 0000000000800000 Yea, 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/0 Portals 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 |
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-ui
systemctl enable --now --user gpu-screen-recorder-ui
Question: Should this be a nixos module option?
Alt+Z
(key binds are not configurable yet)Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.