Skip to content

nixos/pantheon: screen recording does not work #476776

Description

@davidak

Nixpkgs version

  • Stable (25.11)

Describe the bug

Since the Upgrade to NixOS 25.11 the Pantheon Desktop uses Wayland. Now, screen recording does not work with most software.

I have added this configuration, but it does not help:

  xdg = {
    portal = {
      enable = true;
      extraPortals = with pkgs; [
        xdg-desktop-portal-gtk
        xdg-desktop-portal-gnome
      ];
    };
  };

Does it work for you on other desktops?

Steps to reproduce

The easiest way to reproduce:

  1. Run nix run nixpkgs#kooha
  2. Click Record

Expected behaviour

working screen recording

Screenshots

No response

Relevant log output

[davidak@gaming:~]$ nix run nixpkgs#kooha
2026-01-04T03:37:24.502745Z  INFO kooha::application: Kooha (io.github.seadve.Kooha)
2026-01-04T03:37:24.502757Z  INFO kooha::application: Version: 2.3.0 ()
2026-01-04T03:37:24.502759Z  INFO kooha::application: Datadir: /nix/store/pamcs1h11yfay6fkwpmaxzyx5qm7i2qy-kooha-2.3.0/share/kooha
2026-01-04T03:37:26.681632Z ERROR kooha::window: Failed to start recording

Caused by:
    0: Failed to create session
    1: Failed to call `CreateSession` with parameters: Variant { ptr: 0x563888a0b170, type: VariantTy { inner: "(a{sv})" }, value: "({'handle_token': <'kooha_1'>, 'session_handle_token': <'kooha_0'>},)" }
    2: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop

Additional context

@bobby285271 could org.freedesktop.portal.ScreenCast be missing, because you removed xdg-desktop-portal-pantheon in #462896?

The issue is reproducible with other screen recording software that support Wayland:

[davidak@gaming:~]$ nix run nixpkgs#wayfarer
initial matroska
Version Info: v1.3.3 (, , )
Build Info: 2025-12-21T16:37:11Z Linux 6.12.62 x86_64 localhost, gcc version 15.2.0 (GCC)  / GNU ld (GNU Binutils) 2.44 / Vala 0.56.18
:DBG: 0 scale 1.000000
[2026-01-04 02:23:08.958] [MANGOHUD] [info] [blacklist.cpp:83] process '.wayfarer-wrapped' is blacklisted in MangoHud
Session failed [GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop]

One exception that actually work is gpu-screen-recorder!

programs.gpu-screen-recorder.enable = true;
  environment.systemPackages = with pkgs; [
    gpu-screen-recorder-gtk
  ];
[davidak@gaming:~]$ gpu-screen-recorder-gtk 
gsr error: gsr_dbus_call_screencast_method: failed with error: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop
gsr error: gsr_dbus_screencast_create_session: failed to setup ScreenCast session. Make sure you have a desktop portal running with support for the ScreenCast interface and that the desktop portal matches the Wayland compositor you are running.
gsr error: failed to initialize global shortcuts

(com.dec05eba.gpu_screen_recorder:39830): Gtk-CRITICAL **: 04:47:39.555: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
info: running command: gpu-screen-recorder -w DP-3 -c matroska -k auto -ac opus -f 30 -cursor yes -restore-portal-session yes -cr limited -encoder gpu -o /home/davidak/Videos/Video_2026-01-04_04-47-47.mkv -q very_high -a device:default_output -s 1920x1080

(com.dec05eba.gpu_screen_recorder:39830): Gtk-CRITICAL **: 04:47:47.856: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
gsr info: gsr_kms_client_init: gsr-kms-server is not installed in the same directory as gpu-screen-recorder (/nix/store/1nma0hhwjrk4z2hl9cpxfg39dd4mxg3v-gpu-screen-recorder-5.9.0/bin/.wrapped/gsr-kms-server not found), looking for gsr-kms-server in PATH instead
gsr info: gsr_kms_client_init: setting up connection to /run/wrappers/bin/gsr-kms-server
gsr info: gsr_kms_client_init: waiting for server to connect
kms server info: connecting to the client
gsr info: gsr_kms_client_init: server connected
gsr info: replacing file-backed unix domain socket with socketpair
kms server info: connected to the client
gsr info: using socketpair
gsr info: using h264 encoder because a codec was not specified
[h264_nvenc @ 0x56244cb60d00] ignoring invalid SAR: 0/0

(com.dec05eba.gpu_screen_recorder:39830): Gtk-CRITICAL **: 04:47:49.508: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Notification: title: GPU Screen Recorder, body: The recording was saved to /home/davidak/Videos/Video_2026-01-04_04-47-47.mkv

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.63, NixOS, 25.11 (Xantusia), 25.11.3064.64049ca74d63
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.31.2
  • channels(root): "home-manager-25.11.tar.gz, nixos-25.11, nixos-hardware, nixos-unstable"
  • nixpkgs: /nix/store/lxfwbq8lv7jwsfbqmr28fmj6v4b8hqnb-nixos-25.11/nixos

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS6.topic: pantheonThe Pantheon desktop environment9.needs: upstream fixThis PR needs upstream to change something

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions