Open M1cha opened 9 months ago
does using xdg-desktop-portal-wlr
instead work?
i also had this problem some times ago, i solved using "xdg-desktop-portal-hyprland" and settings this line in my hyprland.conf:
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
Now i can share default laptop screen and external screen..i only have a "very little" problem: if you enable screen sharing and select "monitor 1" but than you want to change it and select "monitor 2", if you select "choose different screen" it show black screen, you need to disable screen sharing and enable it again, and here select the correct monitor you want share..
Hi! I have exactly the same issue: Screensharing with xdg-desktop-portal-hyprland works for the integrated screen, but not for my external screen, which is plugged in HDMI through a USB-c hub.
I tried using the wlr
portal like you suggested @MightyPlaza and it work with no issue.
On the other hand, I tried your fix @fdom-93 and it didn't work for me.
I also tried something I saw elsewhere and enabled bitdepth,10 for each monitor but it didn't change anything.
Hi! I have exactly the same issue: Screensharing with xdg-desktop-portal-hyprland works for the integrated screen, but not for my external screen, which is plugged in HDMI through a USB-c hub.
I tried using the
wlr
portal like you suggested @MightyPlaza and it work with no issue. On the other hand, I tried your fix @fdom-93 and it didn't work for me. I also tried something I saw elsewhere and enabled bitdepth,10 for each monitor but it didn't change anything.
output of systemctl status --user xdg-desktop-portal-hyprland
?
Yo! Sorry, I didn't forget about this issue but I didn't have much time to look into it.
First thing I want to mention is that I got a similar issue with the wlr
portal where the screenshare never start.
But I didn't manage to reproduce it in anyway (and didn't think about grabbing the log...). I thought it was related to suspending the system, or switching screen, but I tried both without any success.
I will test again the hyprland portal and report the logs.
EDIT: As of right now, I wan´t able to reproduce the issue, screensharing is working okay with the hyprland portal :shrug: . If i do get the issue again I will post the full journalctl --user -u xdg-desktop-portal-hyprland
here
I got the issue again, here is the log:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=360ede79d124ffdeebbe8401f1ac4bc0dbec2c91_1713163574 XDPH_WINDOW_SHARING_LIST="4066611856[HC>]Spotify[HT>]Spotify Premium[HE>]4066610960[HC>]firefox[HT>]Meet – aer-qtix-qjf — Mozilla Firefox[HE>]4067237568[HC>]kitty[HT>]api.py (~/manty/vision-back/vision/human_resources/hr_simulation/GVT/free_hypothesis) - NVIM[HE>]4067237680[HC>]kitty[HT>]IfseInformationStep.tsx (~/manty/vision-front/src/routes/H.../PayConstants/components/FreeHypothesis/components) - NVIM[HE>]" hyprland-share-picker 2>&1
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [sc] Selection: /screen:DP-2
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] SHAREDATA returned selection 0
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Start:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_33/webrtc842428378
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_33/webrtc_session1959242895
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | parent_window:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [pw] Building modifiers for dma
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Sharing initialized
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Stream destroyed
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Session destroyed
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [toplevel] (deactivate) locks: 1
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [toplevel] (activate) locks: 2
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] New session:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc_1892527092
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1594200155
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] SelectSources:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc1922021194
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1594200155
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] option persist_mode to 1
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] unused option multiple
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] unused option types
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] restore data invalid / missing, prompting
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=360ede79d124ffdeebbe8401f1ac4bc0dbec2c91_1713163574 XDPH_WINDOW_SHARING_LIST="4067237680[HC>]kitty[HT>]IfseInformationStep.tsx (~/manty/vision-front/src/routes/HumanResourcesModule/Simulation/SimulationSynthesis/GVT/PayConstants/components/FreeHypothesis/components) - NVIM[HE>]4067272848[HC>]kitty[HT>]npm run start [HE>]4067273440[HC>]kitty[HT>]api.py (~/manty/vision-back/vision/human_resources/hr_simulation/GVT/free_hypothesis) - NVIM[HE>]4067272960[HC>]kitty[HT>]start_back_dev[HE>]4066608112[HC>]Spotify[HT>]Spotify Premium[HE>]4067273552[HC>]kitty[HT>]maeln@mn-manty:~/manty/vision-back[HE>]4066999952[HC>]firefox[HT>]gUM Test Page — Mozilla Firefox[HE>]" hyprland-share-picker 2>&1
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [sc] Selection: /screen:DP-2
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] SHAREDATA returned selection 0
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Start:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc128571767
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1594200155
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | parent_window:
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [pw] Building modifiers for dma
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Sharing initialized
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 13:52:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Stream destroyed
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Session destroyed
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [toplevel] (deactivate) locks: 1
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [ERR] [pw] Attempted enqueue on invalid session??
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [toplevel] (activate) locks: 2
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] New session:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc_663579646
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1237808602
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] SelectSources:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc347914403
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1237808602
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] option persist_mode to 1
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] unused option multiple
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] unused option types
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] restore data invalid / missing, prompting
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=360ede79d124ffdeebbe8401f1ac4bc0dbec2c91_1713163574 XDPH_WINDOW_SHARING_LIST="4067237680[HC>]kitty[HT>]IfseInformationStep.tsx (~/manty/vision-front/src/routes/HumanResourcesModule/Simulation/SimulationSynthesis/GVT/PayConstants/components/FreeHypothesis/components) - NVIM[HE>]4067272848[HC>]kitty[HT>]npm run start [HE>]4067273440[HC>]kitty[HT>]api.py (~/manty/vision-back/vision/human_resources/hr_simulation/GVT/free_hypothesis) - NVIM[HE>]4067272960[HC>]kitty[HT>]start_back_dev[HE>]4066608112[HC>]Spotify[HT>]Spotify Premium[HE>]4067273552[HC>]kitty[HT>]maeln@mn-manty:~/manty/vision-back[HE>]4066999952[HC>]firefox[HT>]Meet – sey-ogwk-bpa — Mozilla Firefox[HE>]" hyprland-share-picker 2>&1
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [sc] Selection: /screen:DP-2
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] SHAREDATA returned selection 0
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Start:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc987075844
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session1237808602
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | parent_window:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [pw] Building modifiers for dma
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Sharing initialized
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Stream destroyed
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] Session destroyed
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [toplevel] (deactivate) locks: 1
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [ERR] [pw] Attempted enqueue on invalid session??
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [toplevel] (activate) locks: 2
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] New session:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc_318682465
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session140960394
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] SelectSources:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_104/webrtc1505240847
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_104/webrtc_session140960394
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] | appid:
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] option persist_mode to 1
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] unused option multiple
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] unused option types
Apr 16 14:15:02 mn-manty xdg-desktop-portal-hyprland[1416]: [LOG] [screencopy] restore data invalid / missing, prompting
Same, not working for me if i lounch from gnome lockscreen. [selected Hyprland] but when i switched to default gnome and tried with cli, screen sharing worked, [selected GNOME]
ERROR Log, but screen sharing worked
[10325:10325:0530/200430.453928:ERROR:sharing_service.cc(221)] Device registration failed with fatal error
[10375:10375:0530/200528.327248:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[10375:10375:0530/200538.528685:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[10375:10375:0530/200538.565190:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[10325:10325:0530/200619.956511:ERROR:screencast_portal.cc(367)] Failed to start the screen cast session.
[10325:10325:0530/200619.956611:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 2
'loop->recurse > 0' failed at ../pipewire/src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
^C[2024-05-30 20:08:03.407] [info] Quitting.
Same here, happens with Discord on Flatpak, but Discord on Firefox works fine.
Tried with "allow a restore token" so that stops spamming the screen selection dialog, but that didn't fix it.
for me screen sharing was completely broken,
when I removed
xdg-desktop-portal-hyprland
and installed
xdg-desktop-portal-wlr
it works again
For me it's the opposite, I cannot share the internal monitor.
I noticed this message: 'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
, which only occurs when sharing the internal monitor, but not the external one. Sharing a region always works. Both output this message: error: Cannot create EGLImage: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
. Sometimes it goes through, so maybe it's a race condition similar to #6396? Setting the wrong LIBVA_DRIVER_NAME
makes all sharing buggy. Using an Nvidia eGPU I can only share the internal screen as originally reported here.
Hyprland, built from branch main at commit 66586c38f53f16bcf762f019359a3c9042546a72 (keybinds: refactor dispatchers to be better (7331)).
Date: Sat Aug 24 18:45:53 2024
Tag: v0.42.0-65-g66586c38, commits: 5134
flags: (if any)
and
Compiled with libpipewire 1.2.2
Linked with libpipewire 1.2.2
Hyprland Version
System/Version info
```sh Hyprland, built from branch HEAD at commit 03ebbe18ed8517ee22591eac82cd54322f42cb7d (props: bump ver to 0.34.0). Date: Mon Jan 1 12:03:15 2024 Tag: v0.34.0 flags: (if any) ```Bug or Regression?
Bug
Description
I don't know if this is an issue with hyprland or maybe with another component like wireplumber or pipewire, but I'll start here. Window sharing does work on all screens. Screen sharing does also work with both my virtual(headless) screen, and with my laptops internal screen. But it does not work with my external monitor(thunderbolt > lenovo dock > DisplayPort > DELL P3221D). I don't necessarily think that the issue is with how I connect the monitor, because I've had the exact same issue with my old laptop where I was connecting the same monitor using usb-C directly.
I really don't know what's so special about that monitor, but I've attached some info that might help.
How to reproduce
Crash reports, logs, images, videos
hyprctl monitors
:journalctl
. I see see first log (about the camera) when it's working, too(using the internal screen), so I think that one is unrelated.