hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
305 stars 48 forks source link

Very weird screenshare issue? #152

Closed sofiedotcafe closed 10 months ago

sofiedotcafe commented 10 months ago

Hey!

For some time, I had an issue with screensharing, it just does not work sometimes on Firefox Discord?

Sometimes it does not and sometimes it works? First time you screenshare on Discord, it send's one frame, you get an second popup; click again, it's a 50% change it does not work? Some stuff, e.g. if obs open seem to affect this?

How can I even diagnose this?

*This seems to work on as an example the gUM Test Page always but not Discord?

This is the log from starting the libexec/xdg-desktop-portal-hyprland:

[LOG] Initializing xdph...
[LOG] XDG_CURRENT_DESKTOP set to Hyprland
[LOG] Gathering exported interfaces
[LOG]  | Got interface: wl_shm (ver 1)
[LOG]  | Got interface: wl_drm (ver 2)
[LOG]  | Got interface: zwp_linux_dmabuf_v1 (ver 4)
[LOG]  | Got interface: wl_compositor (ver 6)
[LOG]  | Got interface: wl_subcompositor (ver 1)
[LOG]  | Got interface: wl_data_device_manager (ver 3)
[LOG]  | Got interface: zwlr_export_dmabuf_manager_v1 (ver 1)
[LOG]  | Got interface: zwlr_data_control_manager_v1 (ver 2)
[LOG]  | Got interface: zwp_primary_selection_device_manager_v1 (ver 1)
[LOG]  | Got interface: wp_viewporter (ver 1)
[LOG]  | Got interface: zwlr_gamma_control_manager_v1 (ver 1)
[LOG]  | Got interface: zwlr_output_power_manager_v1 (ver 1)
[LOG]  | Got interface: xdg_wm_base (ver 5)
[LOG]  | Got interface: wl_seat (ver 8)
[LOG]  | Got interface: wp_presentation (ver 1)
[LOG]  | Got interface: ext_idle_notifier_v1 (ver 1)
[LOG]  | Got interface: zwlr_layer_shell_v1 (ver 4)
[LOG]  | Got interface: org_kde_kwin_server_decoration_manager (ver 1)
[LOG]  | Got interface: zxdg_decoration_manager_v1 (ver 1)
[LOG]  | Got interface: zwlr_output_manager_v1 (ver 4)
[LOG]  | Got interface: zwp_keyboard_shortcuts_inhibit_manager_v1 (ver 1)
[LOG]  | Got interface: zwp_pointer_constraints_v1 (ver 1)
[LOG]  | Got interface: zwp_relative_pointer_manager_v1 (ver 1)
[LOG]  | Got interface: zwp_virtual_keyboard_manager_v1 (ver 1)
[LOG]  | Got interface: zwlr_virtual_pointer_manager_v1 (ver 2)
[LOG]  | Got interface: zwlr_foreign_toplevel_manager_v1 (ver 3)
[LOG]  | Got interface: wp_drm_lease_device_v1 (ver 1)
[LOG]  | Got interface: wp_drm_lease_device_v1 (ver 1)
[LOG]  | Got interface: zwp_tablet_manager_v2 (ver 1)
[LOG]  | Got interface: zwp_idle_inhibit_manager_v1 (ver 1)
[LOG]  | Got interface: zxdg_exporter_v1 (ver 1)
[LOG]  | Got interface: zxdg_importer_v1 (ver 1)
[LOG]  | Got interface: zxdg_exporter_v2 (ver 1)
[LOG]  | Got interface: zxdg_importer_v2 (ver 1)
[LOG]  | Got interface: zwp_pointer_gestures_v1 (ver 3)
[LOG]  | Got interface: zwp_text_input_manager_v3 (ver 1)
[LOG]  | Got interface: zwp_input_method_manager_v2 (ver 1)
[LOG]  | Got interface: xdg_activation_v1 (ver 1)
[LOG]  | Got interface: ext_session_lock_manager_v1 (ver 1)
[LOG]  | Got interface: wp_cursor_shape_manager_v1 (ver 1)
[LOG]  | Got interface: wp_tearing_control_manager_v1 (ver 1)
[LOG]  | Got interface: wp_single_pixel_buffer_manager_v1 (ver 1)
[LOG]  | Got interface: xwayland_shell_v1 (ver 1)
[LOG]  | Got interface: hyprland_toplevel_export_manager_v1 (ver 2)
[LOG]  | Got interface: wp_fractional_scale_manager_v1 (ver 1)
[LOG]  | Got interface: zwp_text_input_manager_v1 (ver 1)
[LOG]  | Got interface: hyprland_global_shortcuts_manager_v1 (ver 1)
[LOG] [globalshortcuts] registered
[LOG]  | Got interface: zwlr_screencopy_manager_v1 (ver 3)
[LOG] [pipewire] connected
[LOG] [screencopy] init successful
[LOG]  | Got interface: zxdg_output_manager_v1 (ver 3)
[LOG]  | Got interface: wl_output (ver 4)
[LOG] [screencopy] Registered for toplevel export
[WARN] grim not found. Screenshots will not work.
[LOG] [core] dmabufFeedbackMainDevice
[LOG] Found output name DP-2
[LOG] [toplevel] (activate) locks: 1
[LOG] [toplevel] Activated, bound to 871f70, toplevels: 2
[LOG] [screencopy] New session:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_104/webrtc_1159939391
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1284394254
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] SelectSources:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_104/webrtc1012636039
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1284394254
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] option persist_mode to 1
[LOG] [screencopy] unused option multiple
[LOG] [screencopy] unused option types
[LOG] [screencopy] restore data invalid / missing, prompting
[LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=32 HYPRLAND_INSTANCE_SIGNATURE=v0.33.1_1704313736 XDPH_WINDOW_SHARING_LIST="10324752[HC>]firefox[HT>](11) Discord | #yleinen | screencapture test — Mozilla Firefox[HE>]10325104[HC>]kitty[HT>]/nix/store/2nw5d89wa4md32k8flsiw9s2y8sachnn-xdg-desktop-portal-hyprland-1.2.6/libexec/xdg-desktop-portal-hyprland[HE>]" hyprland-share-picker 2>&1
[LOG] [sc] Selection: /window:10324752
<
# Here; the selection is made
# It like just starts again?
>
[LOG] [screencopy] SHAREDATA returned selection 1
[LOG] [screencopy] Start:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_104/webrtc738389499
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1284394254
[LOG] [screencopy]  | appid: 
[LOG] [screencopy]  | parent_window: 
[LOG] [pw] Building modifiers for dma
[LOG] [screencopy] Sharing initialized
[LOG] [pw] Building modifiers for dma
[LOG] [pw] Building modifiers for dma
[LOG] [pw] Building modifiers for dma
[LOG] [pw] Building modifiers for dma
[LOG] [screencopy] Stream destroyed
[LOG] [screencopy] Session destroyed
[LOG] [toplevel] (deactivate) locks: 0
[LOG] [toplevel] unbound manager
[LOG] [toplevel] (activate) locks: 1
[LOG] [toplevel] Activated, bound to 9e1410, toplevels: 2
[LOG] [screencopy] New session:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_104/webrtc_1653795886
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1946329978
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] SelectSources:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_104/webrtc593424741
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1946329978
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] option persist_mode to 1
[LOG] [screencopy] unused option multiple
[LOG] [screencopy] unused option types
[LOG] [screencopy] restore data invalid / missing, prompting
[LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=32 HYPRLAND_INSTANCE_SIGNATURE=v0.33.1_1704313736 XDPH_WINDOW_SHARING_LIST="8855408[HC>]firefox[HT>](11) Discord | #yleinen | screencapture test — Mozilla Firefox[HE>]10270496[HC>]kitty[HT>]/nix/store/2nw5d89wa4md32k8flsiw9s2y8sachnn-xdg-desktop-portal-hyprland-1.2.6/libexec/xdg-desktop-portal-hyprland[HE>]" hyprland-share-picker 2>&1
<
# After this; An force kill and restart is required 
>