Wayland: screen sharing

I’ve recently managed to make my fedora use wayland with my GPU.
But I have one problem: I’m unable to share my screen via apps like Discord (electron base) or Slack (idk how it works). Screen sharing however works with my browser.

What should I check? I sthere any solution?

here are some logs:

Error occurred in handler for 'DISCORD_DESKTOP_CAPTURER_GET_SOURCES': Failed to get sources.
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()

Seems related to :
https://www.reddit.com/r/archlinux/comments/10u8mte/pipewire_webrtc_screen_sharing_not_working_on/
https://www.reddit.com/r/obs/comments/1bloo9e/obs_captures_a_blank_screen_under_wayland/

Discord does not implement PipeWire-based screensharing yet, you’ll need XWaylandVideoBridge to expose it properly. You can install the xwaylandvideobridge package to use it. It is preloaded in Fedora KDE since Fedora 39, but usable on any Wayland desktop.

This requires StatusNotifierItem (SNI) support in your desktop, which all major desktops support out of the box except GNOME. For GNOME, you will need to do the following:

  1. Install the AppIndicator extension (it supports SNI as well) by installing the gnome-shell-extension-appindicator package.
  2. Enable the extension: gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com

Once this is in place, you can launch XWaylandVideoBridge and it should show up in your status tray area. You can then configure what to expose to an XWayland application for screensharing.

4 Likes

Hi, I’ve tried that but unfortunatly nothing changed.

Here is some more logs:

Apr 03 18:46:53 fedora xdg-desktop-por[3647]: Failed to associate portal window with parent window 
Apr 03 18:46:55 fedora wireplumber[2685]: <WpPortalPermissionStorePlugin:0x564c8ecbf860> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Apr 03 18:46:55 fedora discord.desktop[4161]: 'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
Apr 03 18:46:56 fedora xdg-desktop-por[3647]: Failed to associate portal window with parent window 
Apr 03 18:46:58 fedora wireplumber[2685]: <WpPortalPermissionStorePlugin:0x564c8ecbf860> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Apr 03 18:46:58 fedora discord.desktop[4161]: 'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
1 Like

for reference: here is gnome devs statement about this issue: wayland: screen sharing (#7562) · Issues · GNOME / gnome-shell · GitLab

After I enabled appindicatorsupport@rgcjonas.gmail.com and restarted the OS, I’m now able to share my screen. A “Virtual Monitor” option has shown and solved my sharing problem.