emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screensharing does not work on Firefox

beatreichenbach opened this issue · comments

Hello

I'm unable to get screen sharing to work at all on firefox it works on google-chrome-stable however.

Configuration
Current packages:

xdg-desktop-portal 1.18.0-2
xdg-desktop-portal-wlr-git v0.7.0.r4.g84a9cf4-1
pipewire 1:0.3.83-1
wireplumber 0.4.15-1
firefox 119.0-1

It seems like pipewire just crashes before I'm able to select a window to stream with slurp. To make things easier, I even specified the output in .config/xdg-desktop-portal-wlr/config. This means it's not the chooser.

[screencast]
output_name=DP-2
chooser_type=none

I double checked that I am not using output * render_bit_depth 10 in my sway config.

Firefox is running as a native Wayland app.

Log Outputs
Here's the end of /usr/lib/xdg-desktop-portal-wlr -r --loglevel=DEBUG:

2023/11/02 18:29:08 [INFO] - dbus: start method invoked
2023/11/02 18:29:08 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_49/webrtc1927770806
2023/11/02 18:29:08 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_49/webrtc_session725334771
2023/11/02 18:29:08 [INFO] - dbus: app_id:
2023/11/02 18:29:08 [INFO] - dbus: parent_window:
2023/11/02 18:29:08 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_49/webrtc_session725334771
2023/11/02 18:29:08 [INFO] - wlroots: num_modififiers 14
2023/11/02 18:29:08 [INFO] - pipewire: stream state changed to "connecting"
2023/11/02 18:29:08 [INFO] - pipewire: node id is -1
2023/11/02 18:29:08 [INFO] - pipewire: stream state changed to "paused"
2023/11/02 18:29:08 [INFO] - pipewire: node id is 31
2023/11/02 18:29:08 [DEBUG] - dbus: start: returning node 31
2023/11/02 18:29:08 [INFO] - pipewire: stream state changed to "error"
2023/11/02 18:29:08 [INFO] - pipewire: node id is 31
2023/11/02 18:29:08 [ERROR] - pipewire: fatal error event from core

In google-chrome-stable on the other hand, I get this instead of the crash:

2023/11/02 18:41:13 [DEBUG] - pipewire: Format negotiated:
2023/11/02 18:41:13 [DEBUG] - pipewire: buffer_type: 1 (8)
2023/11/02 18:41:13 [DEBUG] - pipewire: format: 8
2023/11/02 18:41:13 [DEBUG] - pipewire: modifier: 216172782127263764
2023/11/02 18:41:13 [DEBUG] - pipewire: size: (2560, 1440)
2023/11/02 18:41:13 [DEBUG] - pipewire: max_framerate: (30 / 1)
2023/11/02 18:41:13 [DEBUG] - pipewire: add buffer event handle

This makes me believe that this is where pipewire is crashing?

As for pipewire, I do see a ton of outputs in journalctl --user but it's never really at the same time as the crash happens.
Here's a small output of that:

Nov 02 18:33:16 enox pipewire[969]: pw.context: params Spa:Enum:ParamId:EnumFormat: 0:0 Invalid argument (input format (no more input formats))
Nov 02 18:33:16 enox pipewire[969]: pw.context: Object: size 248, type Spa:Pod:Object:Param:Format (262147), id Spa:Enum:ParamId:EnumFormat (3)
Nov 02 18:33:16 enox pipewire[969]: pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaType (1), flags 00000000
Nov 02 18:33:16 enox pipewire[969]: pw.context:     Id 2        (Spa:Enum:MediaType:video)
Nov 02 18:33:16 enox pipewire[969]: pw.context:   Prop: key Spa:Pod:Object:Param:Format:mediaSubtype (2), flags 00000000
Nov 02 18:33:16 enox pipewire[969]: pw.context:     Id 1        (Spa:Enum:MediaSubtype:raw)
Nov 02 18:33:16 enox pipewire[969]: pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:format (131073), flags 00000000
Nov 02 18:33:16 enox pipewire[969]: pw.context:     Id 12       (Spa:Enum:VideoFormat:BGRA)
Nov 02 18:33:16 enox pipewire[969]: pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:size (131075), flags 00000000
Nov 02 18:33:16 enox pipewire[969]: pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
Nov 02 18:33:16 enox pipewire[969]: pw.context:       Rectangle 1x1
Nov 02 18:33:16 enox pipewire[969]: pw.context:       Rectangle 1x1
Nov 02 18:33:16 enox pipewire[969]: pw.context:       Rectangle -1x-1
Nov 02 18:33:16 enox pipewire[969]: pw.context:   Prop: key Spa:Pod:Object:Param:Format:Video:framerate (131076), flags 00000000
Nov 02 18:33:16 enox pipewire[969]: pw.context:     Choice: type Spa:Enum:Choice:Range, flags 00000000 40 8
Nov 02 18:33:16 enox pipewire[969]: pw.context:       Fraction 60/1
Nov 02 18:33:16 enox pipewire[969]: pw.context:       Fraction 0/1
Nov 02 18:33:16 enox pipewire[969]: pw.context:       Fraction 60/1

Related
hyprwm/xdg-desktop-portal-hyprland#52

What steps could I take to troubleshoot the pipewire crash more?

Thank you!
Beat

I updated these packages and the problem is gone:

xdg-desktop-portal 1.18.0-2 > 1.18.1-1
pipewire 1:0.3.83-1 > 1:0.3.85-1
firefox 119.0-1> 119.0.1-1