Enable PipeWire support on Linux builds
See original GitHub issueIs your suggestion related to a problem? Please describe.
Element desktop on linux is currently unable to screen share on wayland in either an officially supported deb or an unofficial flatpak. For both package formats, the functionality could be made to work if element’s linux desktop app is shipped with pipewire support. Wayland is default now in most linux distros which use gnome, which includes ubuntu 21.04, any recent fedora, debian 10, rhel/centos/rocky/alma 8, manjaro, and many others.
Describe the solution you’d like.
Build/ship element desktop linux builds with pipewire enabled, using upstream provided flags. This likely means explictly setting rtc_use_pipewire=true and use_sysroot=true when building element.
Describe alternatives you’ve considered.
A workaround is running element in chrome/chromium with a pipewire flag manually enabled. This works fairly well even when chromium is in a flatpak and a wayland session is used.
Additional context
Considering upstream chromium on wayland can be made to work by enabling one flag (not changing anything in element itself), and that element ships the most recent electron version (v12 as of writing), this hopefully should only be a fairly trivial change. Enabling pipewire support should not regress current screen sharing functionality on linux or elsewhere.
Flags that would need to be enabled in element’s builds to enable pipewire as an option:
Per this comment element builds likely need:
rtc_use_pipewire=true
Per this comment element builds need:
use_sysroot=true
Sidenote, per upstream chromium, it seems rtc_use_pipewire=true should automatically be enabled if use_sysroot=true is enabled on linux. Still, it is probably easiest to just ensure both flags mentioned here are enabled.
Finally, once element is building with pipewire properly enabled (via the above 2 flags set), you can fully activate pipewire in element by starting it with the command line argument:
--enable-features=WebRTCPipeWireCapturer
For flatpak run:
flatpak run im.riot.Riot --enable-features=WebRTCPipeWireCapturer
To compare to another chromium app that is known to work on wayland (and even as a flatpak), try downloading chromium from flathub, enabling enable-webrtc-pipewire-capturer in chrome://flags, restarting chromium, and opening app.element.io in chromium. Then join a room with at least 3 members, and start a video call and then try to screen share from within element’s jitsi widget.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)

Top Related StackOverflow Question
I can confirm screen sharing also doesn’t work on Linux x11, so yes it looks like this whole issue originates from #4880. I somehow remember Jitsi working in Element on x11 but I must have been using Chromium.
On the bright side this means there is likely no upstream Electron bug, so when #4880 is fixed Element Wayland screen sharing should work. However, it is possible that when #4880 is fixed, Wayland screen sharing in Element won’t work, so this issue might be reopened in the future.
Closing since this issue is basically a duplicate for now.
They could actually switch to using a context bridge and then they’d have no security issues.