YaLTeR / niri

A scrollable-tiling Wayland compositor.
https://matrix.to/#/#niri:matrix.org
GNU General Public License v3.0
2.82k stars 79 forks source link

Can't start stream from Vesktop #511

Open calvinbaart opened 2 days ago

calvinbaart commented 2 days ago

Whenever I try to start streaming in Vesktop I get the gnome-portal selection window but after selecting and pressing share nothing happens. The niri log does show some errors:

Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.644137Z DEBUG niri::dbus::mutter_screen_cast: record_monitor connector="DP-3" properties=RecordMonitorProperties { cursor_mode: Some(Metadata), _is_recording: None }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.644798Z DEBUG niri::dbus::mutter_screen_cast: start
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.644819Z DEBUG niri::niri: StartCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.644850Z DEBUG niri::pw_utils: pw stream: state changed: Unconnected -> Connecting
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.645864Z DEBUG niri::pw_utils: pw stream: state changed: Connecting -> Paused
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.645874Z DEBUG niri::pw_utils: pw stream: sending signal with 130
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688523Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688542Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688546Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688550Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688553Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688556Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688560Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688563Z  WARN niri::pw_utils: error creating GBM buffer object: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688595Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688736Z DEBUG niri::pw_utils: pw stream: state changed: Paused -> Unconnected
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688797Z DEBUG niri::dbus::mutter_screen_cast: stop
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688857Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688861Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688865Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688869Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688874Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688879Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688884Z DEBUG niri::niri: StopCast session_id=0
Jul 03 11:17:00 niri[2068]: 2024-07-03T09:17:00.688926Z DEBUG niri::niri: StopCast session_id=0

System Information

YaLTeR commented 2 days ago

Huh, that's weird. Maybe it negotiates an invalid size or something. Could you run Vesktop with env PIPEWIRE_DEBUG=D and upload the output here?

calvinbaart commented 2 days ago

This is the complete output of vesktop when setting the PIPEWIRE_DEBUG flag:

output.log

YaLTeR commented 2 days ago

Hm, looks reasonable. Does screencasting work in other clients? I.e. Firefox and Chromium with https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/ or OBS

calvinbaart commented 2 days ago

Hmm when trying to screencast from the webrtc site in firefox it also doesn't work but the niri logs are a bit different (no gbm errors):

Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.570171Z  INFO niri: starting version stable 0.1.7
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.573934Z DEBUG niri_config: loaded config from "/home/calvin/.config/niri/config.kdl"
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.684041Z  INFO niri::backend::tty: using as the render node: "/dev/dri/renderD128"
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.705388Z DEBUG niri::backend::tty: device added: 57857 "/dev/dri/card1"
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.795256Z DEBUG niri::backend::tty: this is the primary node
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.795266Z DEBUG niri::backend::tty: this is the primary render node
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.860863Z DEBUG niri::backend::tty: device changed: 57857
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.997671Z DEBUG niri::backend::tty: connecting connector: HDMI-A-1
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.997691Z DEBUG niri::backend::tty: picking mode: Mode { name: "1920x1080", clock: 148500, size: (1920, 1080), hsync: (2008, 2052, 2200), vsyn>
Jul 03 17:57:00 niri[1917]: 2024-07-03T15:57:00.997717Z DEBUG niri::backend::tty: error setting max bpc: couldn't find max bpc property
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.046035Z DEBUG niri::niri: putting output HDMI-A-1 at x=0 y=0
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.046045Z DEBUG niri::backend::tty: connecting connector: DP-3
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.046064Z DEBUG niri::backend::tty: picking mode: Mode { name: "2560x1440", clock: 640000, size: (2560, 1440), hsync: (2570, 2630, 2640), vsyn>
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.046091Z DEBUG niri::backend::tty: error setting max bpc: couldn't find max bpc property
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.051951Z DEBUG niri::niri: putting output DP-3 at x=0 y=0
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.051958Z DEBUG niri::niri: putting output HDMI-A-1 at x=2560 y=0
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.052041Z  INFO niri: listening on Wayland socket: wayland-1
Jul 03 17:57:01 niri[1917]: 2024-07-03T15:57:01.052048Z  INFO niri: IPC listening on: /run/user/1000/niri.wayland-1.1917.sock
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.638496Z DEBUG niri::dbus::mutter_screen_cast: record_monitor connector="DP-3" properties=RecordMonitorProperties { cursor_mode: Some(Metadat>
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.639393Z DEBUG niri::dbus::mutter_screen_cast: start
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.639425Z DEBUG niri::niri: StartCast session_id=0
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.639459Z DEBUG niri::pw_utils: pw stream: state changed: Unconnected -> Connecting
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.640896Z DEBUG niri::pw_utils: pw stream: state changed: Connecting -> Paused
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.640904Z DEBUG niri::pw_utils: pw stream: sending signal with 105
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.658808Z DEBUG niri::pw_utils: pw stream: state changed: Paused -> Error("no more input formats")
Jul 03 17:57:22 niri[1917]: 2024-07-03T15:57:22.658825Z  WARN niri::pw_utils: pw error id=2 seq=10 res=-32 no more input formats
Jul 03 17:57:30 niri[1917]: 2024-07-03T15:57:30.706376Z DEBUG niri::dbus::mutter_screen_cast: stop
Jul 03 17:57:30 niri[1917]: 2024-07-03T15:57:30.709641Z DEBUG niri::niri: StopCast session_id=0
Jul 03 17:57:30 niri[1917]: 2024-07-03T15:57:30.709762Z DEBUG niri::pw_utils: pw stream: state changed: Paused -> Unconnected
calvinbaart commented 2 days ago

This is the output of firefox with the PIPEWIRE_DEBUG flag set: output.log

YaLTeR commented 2 days ago

I guess something is wrong with creating BGRx dmabufs on your system? Maybe NVIDIA related. Really not sure.