emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots
MIT License
598 stars 61 forks source link

Screencast not working with Chromium or Firefox #271

Open WhyNotHugo opened 1 year ago

WhyNotHugo commented 1 year ago

I'm running xdg-desktop-portal. It only yields a bunch of unrelated output:

```console > XDG_CURRENT_DESKTOP=sway /usr/libexec/xdg-desktop-portal --verbose XDP: load portals from /usr/share/xdg-desktop-portal/portals XDP: loading /usr/share/xdg-desktop-portal/portals/gtk.portal XDP: portal implementation for gnome XDP: portal implementation supports org.freedesktop.impl.portal.FileChooser XDP: portal implementation supports org.freedesktop.impl.portal.AppChooser XDP: portal implementation supports org.freedesktop.impl.portal.Print XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot XDP: portal implementation supports org.freedesktop.impl.portal.Notification XDP: portal implementation supports org.freedesktop.impl.portal.Inhibit XDP: portal implementation supports org.freedesktop.impl.portal.Access XDP: portal implementation supports org.freedesktop.impl.portal.Account XDP: portal implementation supports org.freedesktop.impl.portal.Email XDP: portal implementation supports org.freedesktop.impl.portal.DynamicLauncher XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast XDP: portal implementation supports org.freedesktop.impl.portal.RemoteDesktop XDP: portal implementation supports org.freedesktop.impl.portal.Lockdown XDP: portal implementation supports org.freedesktop.impl.portal.Background XDP: portal implementation supports org.freedesktop.impl.portal.Settings XDP: portal implementation supports org.freedesktop.impl.portal.Wallpaper XDP: loading /usr/share/xdg-desktop-portal/portals/wlr.portal XDP: portal implementation for wlroots, sway, Wayfire, river, phosh, Hyprland XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast XDP: loading /usr/share/xdg-desktop-portal/portals/darkman.portal XDP: portal implementation for sway XDP: portal implementation supports org.freedesktop.impl.portal.Settings XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Lockdown XDP: providing portal org.freedesktop.portal.MemoryMonitor XDP: providing portal org.freedesktop.portal.PowerProfileMonitor XDP: providing portal org.freedesktop.portal.NetworkMonitor XDP: providing portal org.freedesktop.portal.ProxyResolver XDP: providing portal org.freedesktop.portal.Trash XDP: providing portal org.freedesktop.portal.GameMode (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.577: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.577: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.577: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files XDP: providing portal org.freedesktop.portal.Realtime XDP: Using darkman.portal for org.freedesktop.impl.portal.Settings XDP: Using gtk.portal for org.freedesktop.impl.portal.Settings (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.584: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 XDP: providing portal org.freedesktop.portal.Settings XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.FileChooser (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.590: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.590: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.AppChooser (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.595: Failed to create app chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.595: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Print (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.602: Failed to create print proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.602: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Notification (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.607: Failed to create notification proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.607: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Inhibit (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.613: Failed to create inhibit proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.613: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Access XDP: Using wlr.portal for org.freedesktop.impl.portal.Screenshot in sway (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.614: Failed to create screenshot proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.wlr: Process org.freedesktop.impl.portal.desktop.wlr exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.614: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Background (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.620: Failed to create access proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.620: No skeleton to export (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.626: Failed to create access proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.626: No skeleton to export XDP: providing portal org.freedesktop.portal.Camera (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.633: Failed to create access proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.633: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Wallpaper (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.638: Failed to create wallpaper proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.638: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Account (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.644: Failed to create account proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.644: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.Email (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.649: Failed to create email proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.649: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.DynamicLauncher (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.655: Failed to create dynamic_launcher proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.655: No skeleton to export XDP: Using wlr.portal for org.freedesktop.impl.portal.ScreenCast in sway (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.656: Failed to create screen cast proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.wlr: Process org.freedesktop.impl.portal.desktop.wlr exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.656: No skeleton to export XDP: Falling back to gtk.portal for org.freedesktop.impl.portal.RemoteDesktop (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.662: Failed to create remote desktop proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.gtk: Process org.freedesktop.impl.portal.desktop.gtk exited with status 1 (/usr/libexec/xdg-desktop-portal:22985): xdg-desktop-portal-WARNING **: 00:31:06.662: No skeleton to export XDP: org.freedesktop.portal.Desktop acquired ```

Another terminal is running usr/libexec/xdg-desktop-portal-wlr, which also provides no useful output:

```console > XDG_CURRENT_DESKTOP=sway /usr/libexec/xdg-desktop-portal-wlr --loglevel=DEBUG 2023/05/14 00:31:32 [DEBUG] - config: outputname: (null) 2023/05/14 00:31:32 [DEBUG] - config: max_fps: 0.000000 2023/05/14 00:31:32 [DEBUG] - config: exec_before: (null) 2023/05/14 00:31:32 [DEBUG] - config: exec_after: (null) 2023/05/14 00:31:32 [DEBUG] - config: chooser_cmd: (null) 2023/05/14 00:31:32 [DEBUG] - config: chooser_type: default 2023/05/14 00:31:32 [DEBUG] - config: force_mod_linear: 0 2023/05/14 00:31:32 [DEBUG] - dbus: connected 2023/05/14 00:31:32 [DEBUG] - wlroots: wl_display connected 2023/05/14 00:31:32 [DEBUG] - pipewire: pw_loop created 2023/05/14 00:31:32 [DEBUG] - pipewire: establishing connection to core 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_shm (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: |-- registered to interface wl_shm (Version 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_drm (Version: 2) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_linux_dmabuf_v1 (Version: 4) 2023/05/14 00:31:32 [DEBUG] - wlroots: |-- registered to interface zwp_linux_dmabuf_v1 (Version 4) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_compositor (Version: 5) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_subcompositor (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_data_device_manager (Version: 3) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_gamma_control_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zxdg_output_manager_v1 (Version: 3) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register org_kde_kwin_idle (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register ext_idle_notifier_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_idle_inhibit_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_layer_shell_v1 (Version: 4) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register xdg_wm_base (Version: 2) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_tablet_manager_v2 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register org_kde_kwin_server_decoration_manager (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zxdg_decoration_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_relative_pointer_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_pointer_constraints_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wp_presentation (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_output_manager_v1 (Version: 4) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_output_power_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_input_method_manager_v2 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_text_input_manager_v3 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_foreign_toplevel_manager_v1 (Version: 3) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register ext_session_lock_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wp_drm_lease_device_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_export_dmabuf_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_screencopy_manager_v1 (Version: 3) 2023/05/14 00:31:32 [DEBUG] - wlroots: |-- registered to interface zwlr_screencopy_manager_v1 (Version 3) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_data_control_manager_v1 (Version: 2) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_primary_selection_device_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wp_viewporter (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wp_single_pixel_buffer_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zxdg_exporter_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zxdg_importer_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zxdg_exporter_v2 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zxdg_importer_v2 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register xdg_activation_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_virtual_keyboard_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_virtual_pointer_manager_v1 (Version: 2) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwlr_input_inhibit_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_keyboard_shortcuts_inhibit_manager_v1 (Version: 1) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_seat (Version: 8) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register zwp_pointer_gestures_v1 (Version: 3) 2023/05/14 00:31:32 [DEBUG] - wlroots: interface to register wl_output (Version: 4) 2023/05/14 00:31:32 [DEBUG] - wlroots: |-- registered to interface wl_output (Version 4) 2023/05/14 00:31:32 [DEBUG] - wayland: registry listeners run 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_handle_main_device called 2023/05/14 00:31:32 [INFO] - xdpw: Using render node /dev/dri/renderD128 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_format_table called 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_target_devices called 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_flags called 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_formats called 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_done called 2023/05/14 00:31:32 [DEBUG] - wlroots: linux_dmabuf_feedback_handle_done called 2023/05/14 00:31:32 [DEBUG] - wayland: dmabuf_feedback listeners run ```

On chrome, when I try to screencast at https://mozilla.github.io/webrtc-landing/gum_test.html, if I pick "Entire Screen" it logs:

[5285:5285:0514/004517.495144:ERROR:shared_screencast_stream.cc(459)] Failed to connect PipeWire context
[5285:5285:0514/004517.495152:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 1
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
[5285:5285:0514/004519.302593:ERROR:shared_screencast_stream.cc(459)] Failed to connect PipeWire context
[5285:5285:0514/004519.302600:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 1
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:417 pw_thread_loop_wait()

But the screencast area is just solid black with "FPS now: NaN , entire capture: NaN".

Firefox logs nothing, and shows nothing (e.g.: not even a black region).

When I screencast from chromium, xdp-wlr logs:

``` 2023/05/14 00:45:59 [INFO] - dbus: create session method invoked 2023/05/14 00:45:59 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_241/webrtc_533934588 2023/05/14 00:45:59 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_241/webrtc_session1369358799 2023/05/14 00:45:59 [INFO] - dbus: app_id: 2023/05/14 00:45:59 [INFO] - dbus: select sources method invoked 2023/05/14 00:45:59 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_241/webrtc1947782303 2023/05/14 00:45:59 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_241/webrtc_session1369358799 2023/05/14 00:45:59 [INFO] - dbus: app_id: 2023/05/14 00:45:59 [DEBUG] - dbus: select sources: found matching session /org/freedesktop/portal/desktop/session/1_241/webrtc_session1369358799 2023/05/14 00:45:59 [INFO] - dbus: option types:1 2023/05/14 00:45:59 [INFO] - dbus: option multiple: 0 2023/05/14 00:45:59 [INFO] - dbus: option persist_mode:1 2023/05/14 00:45:59 [INFO] - wlroots: capturable output: Ancor Communications Inc model: ROG PG348Q: id: 44 name: DP-1 2023/05/14 00:45:59 [DEBUG] - wlroots: output chooser called 2023/05/14 00:45:59 [DEBUG] - wlroots: output chooser called 2023/05/14 00:45:59 [DEBUG] - wlroots: output chooser selects DP-1 2023/05/14 00:45:59 [INFO] - xdpw: screencast instance 0x7f6e166f6bc0 has 1 references 2023/05/14 00:45:59 [INFO] - xdpw: 1 active screencast instances 2023/05/14 00:45:59 [INFO] - wlroots: output: DP-1 2023/05/14 00:45:59 [INFO] - dbus: start method invoked 2023/05/14 00:45:59 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_241/webrtc1311346438 2023/05/14 00:45:59 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_241/webrtc_session1369358799 2023/05/14 00:45:59 [INFO] - dbus: app_id: 2023/05/14 00:45:59 [INFO] - dbus: parent_window: 2023/05/14 00:45:59 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_241/webrtc_session1369358799 2023/05/14 00:45:59 [INFO] - wlroots: num_modififiers 11 2023/05/14 00:45:59 [INFO] - pipewire: stream state changed to "connecting" 2023/05/14 00:45:59 [INFO] - pipewire: node id is -1 2023/05/14 00:45:59 [INFO] - pipewire: stream state changed to "paused" 2023/05/14 00:45:59 [INFO] - pipewire: node id is 133 2023/05/14 00:45:59 [DEBUG] - dbus: start: returning node 133 2023/05/14 00:46:00 [INFO] - dbus: session closed 2023/05/14 00:46:00 [DEBUG] - dbus: destroying session 0x7f6e160dca70 2023/05/14 00:46:00 [DEBUG] - xdpw: screencast instance 0x7f6e166f6bc0 now has 0 references 2023/05/14 00:46:00 [DEBUG] - xdpw: destroying cast instance 2023/05/14 00:46:00 [DEBUG] - pipewire: destroying stream 2023/05/14 00:46:00 [INFO] - pipewire: stream state changed to "unconnected" 2023/05/14 00:46:00 [INFO] - pipewire: node id is -1 2023/05/14 00:46:00 [INFO] - dbus: create session method invoked 2023/05/14 00:46:00 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_241/webrtc_109522688 2023/05/14 00:46:00 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_241/webrtc_session392111061 2023/05/14 00:46:00 [INFO] - dbus: app_id: 2023/05/14 00:46:00 [INFO] - dbus: select sources method invoked 2023/05/14 00:46:00 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_241/webrtc1912632661 2023/05/14 00:46:00 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_241/webrtc_session392111061 2023/05/14 00:46:00 [INFO] - dbus: app_id: 2023/05/14 00:46:00 [DEBUG] - dbus: select sources: found matching session /org/freedesktop/portal/desktop/session/1_241/webrtc_session392111061 2023/05/14 00:46:00 [INFO] - dbus: option types:1 2023/05/14 00:46:00 [INFO] - dbus: option multiple: 0 2023/05/14 00:46:00 [INFO] - dbus: option persist_mode:1 2023/05/14 00:46:00 [INFO] - wlroots: capturable output: Ancor Communications Inc model: ROG PG348Q: id: 44 name: DP-1 2023/05/14 00:46:00 [DEBUG] - wlroots: output chooser called 2023/05/14 00:46:00 [DEBUG] - wlroots: output chooser called 2023/05/14 00:46:01 [DEBUG] - wlroots: output chooser selects DP-1 2023/05/14 00:46:01 [INFO] - xdpw: screencast instance 0x7f6e166f6bb0 has 1 references 2023/05/14 00:46:01 [INFO] - xdpw: 1 active screencast instances 2023/05/14 00:46:01 [INFO] - wlroots: output: DP-1 2023/05/14 00:46:01 [INFO] - dbus: start method invoked 2023/05/14 00:46:01 [INFO] - dbus: request_handle: /org/freedesktop/portal/desktop/request/1_241/webrtc364738177 2023/05/14 00:46:01 [INFO] - dbus: session_handle: /org/freedesktop/portal/desktop/session/1_241/webrtc_session392111061 2023/05/14 00:46:01 [INFO] - dbus: app_id: 2023/05/14 00:46:01 [INFO] - dbus: parent_window: 2023/05/14 00:46:01 [DEBUG] - dbus: start: found matching session /org/freedesktop/portal/desktop/session/1_241/webrtc_session392111061 2023/05/14 00:46:01 [INFO] - wlroots: num_modififiers 11 2023/05/14 00:46:01 [INFO] - pipewire: stream state changed to "connecting" 2023/05/14 00:46:01 [INFO] - pipewire: node id is -1 2023/05/14 00:46:01 [INFO] - pipewire: stream state changed to "paused" 2023/05/14 00:46:01 [INFO] - pipewire: node id is 133 2023/05/14 00:46:01 [DEBUG] - dbus: start: returning node 133 2023/05/14 00:46:01 [INFO] - dbus: session closed 2023/05/14 00:46:01 [DEBUG] - dbus: destroying session 0x7f6e160dcb30 2023/05/14 00:46:01 [DEBUG] - xdpw: screencast instance 0x7f6e166f6bb0 now has 0 references 2023/05/14 00:46:01 [DEBUG] - xdpw: destroying cast instance 2023/05/14 00:46:01 [DEBUG] - pipewire: destroying stream 2023/05/14 00:46:01 [INFO] - pipewire: stream state changed to "unconnected" 2023/05/14 00:46:01 [INFO] - pipewire: node id is -1 ```

Versions of related components:

chromium-113.0.5672.92-r0 x86_64 {chromium} (BSD-3-Clause) [installed]

xdg-desktop-portal-1.16.0-r0 x86_64 {xdg-desktop-portal} (LGPL-2.1-or-later) [installed]
xdg-desktop-portal-gtk-1.14.1-r2 x86_64 {xdg-desktop-portal-gtk} (LGPL-2.1-or-later) [installed]
xdg-desktop-portal-wlr-0.7.0-r0 x86_64 {xdg-desktop-portal-wlr} (MIT) [installed]

firefox-113.0.1-r0 x86_64 {firefox} (GPL-3.0-only AND LGPL-2.1-only AND LGPL-3.0-only AND MPL-2.0) [installed]

sway-1.8.1-r1 x86_64 {sway} (MIT) [installed]
wlroots-0.16.2-r4 x86_64 {wlroots} (MIT) [installed]

wireplumber, pipewire and pipewire-pulse are all running. Also:

> cat "/proc/$(pidof xdg-desktop-portal)/environ" | tr '\0' '\n' | grep DISPL
WAYLAND_DISPLAY=wayland-1
DISPLAY=:0

> cat "/proc/$(pidof xdg-desktop-portal-wlr)/environ" | tr '\0' '\n' | grep DISPL  
WAYLAND_DISPLAY=wayland-1
DISPLAY=:0

Running this test script:

{
  "id": 130,
  "type": "PipeWire:Interface:Node",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "max-input-ports": 0,
    "max-output-ports": 1,
    "change-mask": [
      "input-ports",
      "output-ports",
      "state",
      "props",
      "params"
    ],
    "n-input-ports": 0,
    "n-output-ports": 1,
    "state": "suspended",
    "error": null,
    "props": {
      "client.id": 69,
      "media.class": "Video/Source",
      "media.name": "xdpw-stream-KngMfa",
      "node.driver": true,
      "node.name": "xdg-desktop-portal-wlr",
      "node.want-driver": true,
      "object.id": 130,
      "object.serial": 1464,
      "stream.is-live": true
    },
    "params": {
      "PropInfo": [],
      "Props": [],
      "EnumFormat": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "BGRx",
          "modifier": {
            "default": 72057594037927940,
            "alt1": 72057594037927940,
            "alt2": 144115188757872400,
            "alt3": 144115188757856000,
            "alt4": 144115188757659400,
            "alt5": 144115188757438200,
            "alt6": 144115188757871360,
            "alt7": 144115188757854980,
            "alt8": 144115188757658370,
            "alt9": 144115188757437200,
            "alt10": 144115188075858430,
            "alt11": 0
          },
          "size": {
            "width": 3440,
            "height": 1440
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "default": {
              "num": 59,
              "denom": 1
            },
            "min": {
              "num": 1,
              "denom": 1
            },
            "max": {
              "num": 59,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "width": 3440,
            "height": 1440
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "default": {
              "num": 59,
              "denom": 1
            },
            "min": {
              "num": 1,
              "denom": 1
            },
            "max": {
              "num": 59,
              "denom": 1
            }
          }
        }
      ],
      "Format": []
    }
  }
}
{
  "id": 122,
  "type": "PipeWire:Interface:Port",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "direction": "output",
    "change-mask": [
      "props",
      "params"
    ],
    "props": {
      "node.id": 130,
      "object.id": 122,
      "object.path": "xdg-desktop-portal-wlr:capture_0",
      "object.serial": 1465,
      "port.alias": "xdg-desktop-portal-wlr:capture_1",
      "port.direction": "out",
      "port.id": 0,
      "port.name": "capture_1"
    },
    "params": {
      "EnumFormat": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "BGRx",
          "modifier": {
            "default": 72057594037927940,
            "alt1": 72057594037927940,
            "alt2": 144115188757872400,
            "alt3": 144115188757856000,
            "alt4": 144115188757659400,
            "alt5": 144115188757438200,
            "alt6": 144115188757871360,
            "alt7": 144115188757854980,
            "alt8": 144115188757658370,
            "alt9": 144115188757437200,
            "alt10": 144115188075858430,
            "alt11": 0
          },
          "size": {
            "width": 3440,
            "height": 1440
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "default": {
              "num": 59,
              "denom": 1
            },
            "min": {
              "num": 1,
              "denom": 1
            },
            "max": {
              "num": 59,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "width": 3440,
            "height": 1440
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "default": {
              "num": 59,
              "denom": 1
            },
            "min": {
              "num": 1,
              "denom": 1
            },
            "max": {
              "num": 59,
              "denom": 1
            }
          }
        }
      ],
      "Meta": [
        {
          "type": "Busy",
          "size": 8
        }
      ],
      "IO": [
        {
          "id": "Buffers",
          "size": 8
        }
      ],
      "Format": [],
      "Buffers": [],
      "Latency": []
    }
WhyNotHugo commented 1 year ago

I also tried this test script (after having installed gst-plugin-pipewire):

> python xdp-screen-cast.py
session /org/freedesktop/portal/desktop/session/1_261/u1 created
sources selected
streams:
stream 126
X connection to :0 broken (explicit kill or server shutdown).
columbarius commented 1 year ago

Can you try the flatpak versions of Firefox and Chromium, please?

mvdan commented 1 year ago

@columbarius Chromium on Arch fails like @WhyNotHugo described for me, and the version from flatpak fails the same:

$ chromium 
[186751:186751:0521/213240.845282:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
$ flatpak run org.chromium.Chromium
[2:2:0521/213359.505879:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:417 pw_thread_loop_wait()
[2:2:0521/213407.177372:ERROR:browser_main_loop.cc(274)] GLib: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
[0521/213407.177470:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
$ chromium --version
Chromium 113.0.5672.126 Arch Linux
$ flatpak run org.chromium.Chromium --version
Chromium 113.0.5672.126 

In fact it's actually slightly worse - the flatpak version shows the same pw_thread_loop_wait and then seems to crash.

LorenzISR commented 1 year ago

i have the same error when trying to share my screen with chromium:

[10211:10211:0523/135802.744033:ERROR:shared_screencast_stream.cc(459)] Failed to connect PipeWire context
[10211:10211:0523/135802.744046:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 1
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:417 pw_thread_loop_wait()

however, screen sharing works with firefox. is there any fix for this yet? i have followed all of the troubleshooting guides but couldn't fix it yet. i am on alpine linux edge.

WhyNotHugo commented 1 year ago

Firefox on Flatpak also does not work:

image

Also on Alpine Edge here.

WhyNotHugo commented 1 year ago

Odd, xdp-screencast.py seems to work, but xdg-desktop-portal-wlr continuously spams:

2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers
2023/05/23 15:09:35 [WARN] - wlroots: no current buffer
2023/05/23 15:09:35 [WARN] - pipewire: out of buffers

(full log here)

xdg-desktop-portal outputs:

XDP: org.freedesktop.portal.Desktop acquired

XDP: screen cast session owned by ':1.63' created
XDP: Replacing restore data received from portal impl with a token

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_new_string: assertion 'string != NULL' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_new_variant: assertion 'value != NULL' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_get_type: assertion 'value != NULL' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_builder_end: assertion 'GVSB(builder)->offset >= GVSB(builder)->min_items' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_get_type: assertion 'value != NULL' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed

(/usr/libexec/xdg-desktop-portal:13132): GLib-CRITICAL **: 15:09:28.138: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
XDP: screen cast session owned by ':1.63' started
XDP: screen cast session owned by ':1.63' closed
romanstingler commented 1 year ago

I encountered the same issue. For me it works when I uninstall xdg-desktop-portal-gnome

I think the next release of xdg-desktop-portal will fix this.

https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74 https://github.com/flatpak/xdg-desktop-portal/pull/985 https://github.com/flatpak/xdg-desktop-portal/pull/1018

for the time being I have just following packages installed

❯ yay -Q | grep xdg-desktop-portal
xdg-desktop-portal 1.16.0-2
xdg-desktop-portal-gtk 1.14.1-1
xdg-desktop-portal-wlr 0.7.0-1
mvdan commented 1 year ago

I only have xdg-desktop-portal, xdg-desktop-portal-gtk, and xdg-desktop-portal-wlr installed, so @romanstingler's workaround isn't fixing it for me, FYI.

nekopsykose commented 1 year ago

afaict this is caused by the now-infamous webrtc bug (https://bugs.chromium.org/p/webrtc/issues/detail?id=15174), because applying the webrtc fix in question to firefox fixes it for me (will test chromium after it builds)

mvdan commented 1 year ago

What is the easiest way to apply the fix? Or, do we know if any firefox or chromium pre-release include the fix? It doesn't look like chromium has decided whether or not to include the fix in the upcoming v114, for example.

romanstingler commented 1 year ago

that is interesting. I am on Arch (testing) and use firefox-nightly 115.0a1+20230509.1+hfaf51404785d-1 and it works for me also with chromium 113.0.5672.126-1

nekopsykose commented 1 year ago

What is the easiest way to apply the fix?

you would have to apply the patch to the webrtc in the tarball of chromium or firefox and build it yourself (or get your distro to do it), and yes, that won't fix flatpak and similar..

an example for firefox and chromium

a noted hacky other workaround is PIPEWIRE_DEBUG=4 (yes, really), but that didn't fix it for me

It doesn't look like chromium has decided whether or not to include the fix in the upcoming v114, for example.

yes, seemingly that will be all the way in 115.. for firefox, it's in 114b, so also will be in 114 https://bugzilla.mozilla.org/show_bug.cgi?id=1832770

that said, it's not guaranteed this would fix it, you might also have other issues

mvdan commented 1 year ago

Thank you @nekopsykose, that's very helpful. I can confirm that Firefox 114.0b8 can screenshare for me, when 113.0.2 could not :)

nekopsykose commented 1 year ago

glad it was that simple then :D

nekopsykose commented 1 year ago

(will test chromium after it builds)

yep, fixed there too

@WhyNotHugo should work for you as well now

LorenzISR commented 1 year ago

just updated chromium to 113.0.5672.126-r2, works :) (alpine edge)

mvdan commented 1 year ago

Chromium 114 on Arch, which presumably hasn't been patched by the distro for this, still doesn't work. So I imagine upstream might include the webrtc fix in the 115 beta. For now, back to Firefox for video calls :)

apprehensions commented 1 year ago

on firefox 114.0b9, i am facing this issue:

[E][18353.396080] pw.context   | [       context.c:  595 pw_context_debug_port_params()] params Spa:Enum:ParamId:EnumFormat: 0:0 Invalid argument (input format (no more input formats))

they are right, atleast it tries to screenshare, but i get this error.

edit: i had render_bit_depth 10 set in my sway, now works with 114.0b9.

Kagukara commented 1 year ago

Oh is screen capture with 10-bit an xdg-desktop-portal-wlr issue or a pipewire issue? As the errors I get when I have render_bit_depth 10 in my sway config, are talking about pipewire.

Trying to capture the 4k monitor (10-bit) in obs-studio-tytan652 29.1.3-2:

info: PipeWire initialized
info: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
info: [pipewire] desktop selected, setting up screencast
info: [pipewire] Server version: 0.3.76
info: [pipewire] Library version: 0.3.76
info: [pipewire] Header version: 0.3.74
info: [pipewire] Created stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "paused" (error: none)
info: [pipewire] Stream 0x55970f8a5d10 state: "error" (error: no more input formats)
error: [pipewire] Error id:2 seq:8 res:-32 (Unknown error -32): no more input formatsinfo: [pipewire] Screencast session created
info: [pipewire] Asking for desktop
info: [pipewire] desktop selected, setting up screencast
info: [pipewire] Server version: 0.3.76
info: [pipewire] Library version: 0.3.76
info: [pipewire] Header version: 0.3.74
info: [pipewire] Created stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x55970f8a5d10
info: [pipewire] Stream 0x55970f8a5d10 state: "paused" (error: none)
info: [pipewire] Stream 0x55970f8a5d10 state: "error" (error: no more input formats)
error: [pipewire] Error id:2 seq:8 res:-32 (Unknown error -32): no more input formats

Trying to capture the 4k monitor (10-bit) in webcord 4.3.0-1

[9111:0730/123511.697290:ERROR:shared_screencast_stream.cc(241)] PipeWire stream state error: no more input formats
[9111:0730/123511.697302:ERROR:shared_screencast_stream.cc(204)] PipeWire remote error: no more input formats

Ending Screenshare:

'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()

I can capture games in obs with obs-vkcapture and the screen with wlrobs when set to render_bit_depth 10. But cannot capture the screen with browser/webcord, although capturing a browser tab is possible.

nekopsykose commented 1 year ago

i had it working for a while with the same sway 10-bit depth (in browser etc), so it's probably something else

Vladimir-csp commented 11 months ago

Hi. I have this problem on Debian testing. Black screen with frozen mouse cursor.

But It seems that Chromium, Chrome and Firefox do not even attempt to connect to portals or pipewire.

pw-dump does not list any of them when attempting screen sharng.

If laucnhed without DISPLAY, eliminating Xwayland, screen sharing becomes totally disabled (Chrom* show only Tab, Firefox refuses to share outright).

All browsers run wayland-native, ozone and webrtc flags in Crhom* are applied.

Other wayland apps, like screenshots and screen recorders are working.

I have a feeling that I'm missing something trivial.

$ env | grep -Ei 'wayland|wlr'
CLUTTER_BACKEND=wayland
XDG_CURRENT_DESKTOP=sway:wlroots
WAYLAND_DISPLAY=wayland-1
WINIT_UNIX_BACKEND=wayland
QT_QPA_PLATFORM=wayland-egl
SDL_VIDEODRIVER=wayland
GDK_BACKEND=wayland

$ systemctl --user list-units xdg-desktop-portal* pipewire* wireplumber* -q
  pipewire-pulse.service         loaded active running PipeWire PulseAudio
  pipewire.service               loaded active running PipeWire Multimedia Service
  wireplumber.service            loaded active running Multimedia Service Session Manager
  xdg-desktop-portal-gtk.service loaded active running Portal service (GTK/GNOME implementation)
  xdg-desktop-portal-wlr.service loaded active running Portal service (wlroots implementation)
  xdg-desktop-portal.service     loaded active running Portal service
  pipewire-pulse.socket          loaded active running PipeWire PulseAudio
  pipewire.socket                loaded active running PipeWire Multimedia System Sockets

$ apt list --installed *chrom* *firefox* xdg-desktop-portal* *pipewire* *wireplumber* *webrtc*
Listing... Done
chromium-common/testing,unstable,now 119.0.6045.199-1 amd64 [installed,automatic]
chromium/testing,unstable,now 119.0.6045.199-1 amd64 [installed]
firefox-esr/testing,unstable,now 115.5.0esr-1 amd64 [installed]
google-chrome-stable/stable,now 120.0.6099.62-1 amd64 [installed]
gstreamer1.0-pipewire/testing,unstable,now 1.0.0-1 amd64 [installed]
libchromaprint1/testing,unstable,now 1.5.1-4 amd64 [installed,automatic]
libpipewire-0.3-0/testing,unstable,now 1.0.0-1 amd64 [installed,automatic]
libpipewire-0.3-common/testing,unstable,now 1.0.0-1 all [installed]
libpipewire-0.3-modules/testing,unstable,now 1.0.0-1 amd64 [installed,automatic]
libwebrtc-audio-processing1/testing,unstable,now 0.3-1+b1 amd64 [installed,automatic]
libwireplumber-0.4-0/testing,now 0.4.16-1 amd64 [installed,automatic]
pipewire-alsa/testing,unstable,now 1.0.0-1 amd64 [installed]
pipewire-audio/testing,unstable,now 1.0.0-1 all [installed]
pipewire-bin/testing,unstable,now 1.0.0-1 amd64 [installed,automatic]
pipewire-pulse/testing,unstable,now 1.0.0-1 amd64 [installed]
pipewire-v4l2/testing,unstable,now 1.0.0-1 amd64 [installed]
pipewire/testing,unstable,now 1.0.0-1 amd64 [installed]
wireplumber/testing,now 0.4.16-1 amd64 [installed]
xdg-desktop-portal-gtk/testing,unstable,now 1.15.1-1 amd64 [installed]
xdg-desktop-portal-wlr/testing,unstable,now 0.7.0-1 amd64 [installed]
xdg-desktop-portal/testing,unstable,now 1.18.2-1 amd64 [installed,automatic]
WhyNotHugo commented 11 months ago

Can you provide logs for the xdg-desktop-portal?

Recent versions require explicitly configuring the backend implementation that should be used (eg: wlr). Have you done this?

Have you checked the troubleshooting instruction in the wiki?

Vladimir-csp commented 11 months ago

Sorry, false alarm. $XDG_SESSION_TYPE was missing. A bug in uwsm.

k-jell commented 9 months ago

This issue still exists for me, when using chromium/obs/slack/zoom. In firefox however screen sharing works fine. Package versions: xdg-desktop-portal 1.18.2-1 xdg-desktop-portal-wlr 0.7.0-2 firefox 122.0.1-1 chromium 121.0.6167.160-1

xdg_desktop_portal output ``` XDP: Looking for portals configuration in '/home/kjell/.config/xdg-desktop-portal/sway-portals.conf' XDP: Looking for portals configuration in '/home/kjell/.config/xdg-desktop-portal/portals.conf' XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/sway-portals.conf' XDP: Looking for portals configuration in '/etc/xdg/xdg-desktop-portal/portals.conf' XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/sway-portals.conf' XDP: Looking for portals configuration in '/etc/xdg-desktop-portal/portals.conf' XDP: Looking for portals configuration in '/home/kjell/.local/share/xdg-desktop-portal/sway-portals.conf' XDP: Looking for portals configuration in '/home/kjell/.local/share/xdg-desktop-portal/portals.conf' XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/sway-portals.conf' XDP: Looking for portals configuration in '/usr/local/share/xdg-desktop-portal/portals.conf' XDP: Looking for portals configuration in '/usr/share/xdg-desktop-portal/sway-portals.conf' XDP: Preferred portals for interface 'default': gtk XDP: Preferred portals for interface 'org.freedesktop.impl.portal.ScreenCast': wlr XDP: Preferred portals for interface 'org.freedesktop.impl.portal.Screenshot': wlr XDP: Using portal configuration file '/usr/share/xdg-desktop-portal/sway-portals.conf' for desktop 'sway' XDP: load portals from /usr/share/xdg-desktop-portal/portals XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal XDP: portal implementation supports org.freedesktop.impl.portal.Secret XDP: loading /usr/share/xdg-desktop-portal/portals/wlr.portal XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast XDP: providing portal org.freedesktop.portal.MemoryMonitor XDP: providing portal org.freedesktop.portal.PowerProfileMonitor XDP: providing portal org.freedesktop.portal.NetworkMonitor XDP: providing portal org.freedesktop.portal.ProxyResolver XDP: providing portal org.freedesktop.portal.Trash XDP: providing portal org.freedesktop.portal.GameMode XDP: providing portal org.freedesktop.portal.Realtime (/usr/lib/xdg-desktop-portal:199540): xdg-desktop-portal-WARNING **: 12:36:49.827: No skeleton to export XDP: Found 'wlr' in configuration for org.freedesktop.impl.portal.ScreenCast XDP: Using wlr.portal for org.freedesktop.impl.portal.ScreenCast (config) XDP: providing portal org.freedesktop.portal.ScreenCast XDP: org.freedesktop.portal.Desktop acquired XDP: screen cast session owned by ':1.417' created XDP: Replacing restore data received from portal impl with a token XDP: screen cast session owned by ':1.417' started XDP: screen cast session owned by ':1.417' closed XDP: screen cast session owned by ':1.417' created XDP: Replacing 'restore_token' with portal-specific data XDP: Replacing restore data received from portal impl with a token XDP: screen cast session owned by ':1.417' started ```
xdg-desktop-portal-wlr output ``` 2024/02/13 12:37:44 [INFO] - config: no config file found, using the default config 2024/02/13 12:37:44 [DEBUG] - config: outputname: (null) 2024/02/13 12:37:44 [DEBUG] - config: max_fps: 0.000000 2024/02/13 12:37:44 [DEBUG] - config: exec_before: (null) 2024/02/13 12:37:44 [DEBUG] - config: exec_after: (null) 2024/02/13 12:37:44 [DEBUG] - config: chooser_cmd: (null) 2024/02/13 12:37:44 [DEBUG] - config: chooser_type: default 2024/02/13 12:37:44 [DEBUG] - config: force_mod_linear: 0 2024/02/13 12:37:44 [DEBUG] - dbus: connected 2024/02/13 12:37:44 [DEBUG] - wlroots: wl_display connected 2024/02/13 12:37:44 [DEBUG] - pipewire: pw_loop created 2024/02/13 12:37:44 [DEBUG] - pipewire: establishing connection to core 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_shm (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: |-- registered to interface wl_shm (Version 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_drm (Version: 2) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_linux_dmabuf_v1 (Version: 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: |-- registered to interface zwp_linux_dmabuf_v1 (Version 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_compositor (Version: 5) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_subcompositor (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_data_device_manager (Version: 3) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_gamma_control_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zxdg_output_manager_v1 (Version: 3) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register org_kde_kwin_idle (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register ext_idle_notifier_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_idle_inhibit_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_layer_shell_v1 (Version: 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register xdg_wm_base (Version: 2) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_tablet_manager_v2 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register org_kde_kwin_server_decoration_manager (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zxdg_decoration_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_relative_pointer_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_pointer_constraints_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wp_presentation (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_output_manager_v1 (Version: 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_output_power_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_input_method_manager_v2 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_text_input_manager_v3 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_foreign_toplevel_manager_v1 (Version: 3) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register ext_session_lock_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wp_drm_lease_device_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wp_drm_lease_device_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_export_dmabuf_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_screencopy_manager_v1 (Version: 3) 2024/02/13 12:37:44 [DEBUG] - wlroots: |-- registered to interface zwlr_screencopy_manager_v1 (Version 3) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_data_control_manager_v1 (Version: 2) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_primary_selection_device_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wp_viewporter (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wp_single_pixel_buffer_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zxdg_exporter_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zxdg_importer_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zxdg_exporter_v2 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zxdg_importer_v2 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register xdg_activation_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_virtual_keyboard_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_virtual_pointer_manager_v1 (Version: 2) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwlr_input_inhibit_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_keyboard_shortcuts_inhibit_manager_v1 (Version: 1) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_seat (Version: 8) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register zwp_pointer_gestures_v1 (Version: 3) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_output (Version: 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: |-- registered to interface wl_output (Version 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: interface to register wl_output (Version: 4) 2024/02/13 12:37:44 [DEBUG] - wlroots: |-- registered to interface wl_output (Version 4) 2024/02/13 12:37:44 [DEBUG] - wayland: registry listeners run 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_handle_main_device called 2024/02/13 12:37:44 [INFO] - xdpw: Using render node /dev/dri/renderD128 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_format_table called 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_target_devices called 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_flags called 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_formats called 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_tranche_done called 2024/02/13 12:37:44 [DEBUG] - wlroots: linux_dmabuf_feedback_handle_done called 2024/02/13 12:37:44 [DEBUG] - wayland: dmabuf_feedback listeners run 2024/02/13 12:37:44 [ERROR] - dbus: failed to acquire service name: File exists 'impl->enter_count > 0' failed at ../pipewire/spa/plugins/support/loop.c:362 loop_leave() ```

chromium logs this error:

'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()

Steps to reproduce:

romanstingler commented 9 months ago

for me in chromium it works intermittently on my notebook with external monitor. Sharing a tab or an area works. Sharing a display doesn't works every time.

I tried sharing my external one, was black. Then I tried sharing my internal display that worked and then sharing the external worked. Sometimes I have to try more often.

but I have only these installed

xdg-desktop-portal 1.18.2-1.1
xdg-desktop-portal-hyprland 1.3.1-3.1