question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable PipeWire support on Linux builds

See original GitHub issue

Is 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:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vchernincommented, May 12, 2021

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.

0reactions
SimonBrandnercommented, May 12, 2021

Jitsi Meet Electron gets around by disabling some security features

They could actually switch to using a context bridge and then they’d have no security issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install PipeWire on Ubuntu Linux - LinuxConfig.org
In this tutorial, we go over the step by step instructions to install PipeWire on Ubuntu Linux and use it as your main...
Read more >
How to enable Pipewire (unofficial) : r/SolusProject - Reddit
Enable the following services (no sudo): systemctl --user enable pipewire systemctl --user enable pipewire-pulse · Disable Pulse: systemctl -- ...
Read more >
PipeWire - Debian Wiki
PipeWire is a server and API for handling multimedia on Linux. Its most common use is for Wayland and Flatpak applications to implement ......
Read more >
Using PipeWire Audio on Ubuntu Linux - pascom
By default, the pascom client on Ubuntu Linux distributions uses the ... mask pulseaudio.service pulseaudio.socket systemctl --user enable ...
Read more >
Installing Pipewire on Debian | Better Audio Control - YouTube
Today we look at how to install and configure Pipewire on Debian and Debian based distros. ... Support Switched to Linux !
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found