Kooha icon indicating copy to clipboard operation
Kooha copied to clipboard

[BUG]: Nixos+Hyprland cannot record normally, but it works fine when the sound is turned off

Open mochouaaaaa opened this issue 3 months ago • 3 comments

Affected version

  • io.github.seadve.Kooha 2.3.0

  • Flatpak: false

  • Experimental Features: []

  • Language: zh_CN.UTF-8, zh_CN, zh.UTF-8, zh, C

  • CPU:

  • GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6600/6600 XT/6600M] (rev df)

  • Distribution: NixOS 25.11 (Xantusia)

  • Desktop Session:

  • Display Server: wayland

  • GTK 4.18.6

  • Libadwaita 1.7.6

  • GStreamer 1.26.5

  • Pipewire 1.4.8

Bug summary

 WARN kooha::screencast_portal::window_identifier: Failed to export handle: BoolError { message: "Failed to export a handle. The compositor probably doesn't implement the xdg-foreign protocol", filename: "/build/kooha-2.3.0-vendor/gdk4-wayland-0.8.1/src/wayland_toplevel.rs", function: "gdk4_wayland::wayland_toplevel::<impl gdk4_wayland::auto::wayland_toplevel::WaylandToplevel>::export_handle::callback_func", line: 27 }
2025-10-20T02:07:56.086842Z ERROR kooha::window: An error occurred while recording

Caused by:
    0: ../src/gst/gstpipewiresrc.c(748): on_state_changed (): /GstPipeline:pipeline0/GstBin:kooha-pipewiresrc-bin/GstPipeWireSrc:pipewiresrc0
    1: stream error: unhandled format

Steps to reproduce

  1. open kooha
  2. click record
  3. wait 5 seconds

Expected behavior

Record normally

Relevant logs, screenshots, screencasts, etc.

  • kooha log
An error occurred while recording

Caused by:
    0: ../src/gst/gstpipewiresrc.c(748): on_state_changed (): /GstPipeline:pipeline0/GstBin:kooha-pipewiresrc-bin/GstPipeWireSrc:pipewiresrc0
    1: stream error: unhandled format

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
   1: gstreamer::bus::trampoline_watch_local
   2: gst_bus_source_dispatch
   3: g_main_context_dispatch_unlocked
   4: g_main_context_iterate_unlocked.isra.0
   5: g_main_context_iteration
   6: g_application_run
   7: kooha::main
   8: std::sys::backtrace::__rust_begin_short_backtrace
   9: main
  10: __libc_start_call_main
  11: __libc_start_main_alias_1
  12: _start
  • pipewire
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/etc/systemd/user/pipewire.service; linked-runtime; preset: ignored)
    Drop-In: /nix/store/sy9hmrkk31k8959i38hy6s0gz0zygqgw-user-units/pipewire.service.d
             └─overrides.conf
     Active: active (running) since Mon 2025-10-20 09:07:57 CST; 1h 17min ago
 Invocation: 83b3358a30c74af18f091db6e2db29b4
TriggeredBy: ● pipewire.socket
   Main PID: 4332 (pipewire)
      Tasks: 4 (limit: 57464)
     Memory: 8.5M (peak: 12.5M)
        CPU: 278ms
     CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/pipewire.service
             └─4332 /nix/store/vh9gp7pna8x50vpshd9c5m3094qfcp8n-pipewire-1.4.7/bin/pipewire

10月 20 10:07:56 nixos pipewire[4332]: mod.client-node: 0x556098ae47e0: error seq:240 -22 (port_set_param(Spa:Enum:ParamId:Format) failed: Invalid argument)
10月 20 10:22:50 nixos pipewire[4332]: pw.core: 0x5560986e1e30: error -22 for resource 2: unhandled format
10月 20 10:22:50 nixos pipewire[4332]: mod.client-node: 0x556098ae4740: error seq:236 -22 (unhandled format)
10月 20 10:22:50 nixos pipewire[4332]: pw.core: 0x5560986e1e30: error -22 for resource 2: port_set_param(Spa:Enum:ParamId:Format) failed: Invalid argument
10月 20 10:22:50 nixos pipewire[4332]: mod.client-node: 0x556098ae4740: error seq:236 -22 (port_set_param(Spa:Enum:ParamId:Format) failed: Invalid argument)
10月 20 10:22:50 nixos pipewire[4332]: pw.node: (.kooha-wrapped-96) running -> error (error changing node state: Invalid argument)
10月 20 10:22:50 nixos pipewire[4332]: pw.link: 0x556098bbbbe0: one of the nodes is in error out:idle in:error
10月 20 10:22:50 nixos pipewire[4332]: pw.link: (90.0.0 -> 96.0.0) negotiating -> error (Format negotiation failed) (ready-configure)
10月 20 10:22:50 nixos pipewire[4332]: pw.core: 0x5560986e1e30: error -22 for resource 2: port_set_param(Spa:Enum:ParamId:Format) failed: Invalid argument
10月 20 10:22:50 nixos pipewire[4332]: mod.client-node: 0x556098ae4740: error seq:240 -22 (port_set_param(Spa:Enum:ParamId:Format) failed: Invalid argument)

mochouaaaaa avatar Oct 20 '25 02:10 mochouaaaaa

I am also effected by this same issue, however I still get this error even with sound off.

ezratweaver avatar Oct 24 '25 18:10 ezratweaver

+1 here, recording crashes regardless of the sound on/off

r00t3g avatar Oct 27 '25 10:10 r00t3g

+1

MOIS3Y avatar Nov 03 '25 02:11 MOIS3Y