6

Has anyone got screensharing working under wayland using pipewire?

As far as I can tell, it should be possible to share the screen from Chrome / Chromium after installing the pipewire package and adding your user to the audio and video groups. Except that Chrom(e|ium) is still using libpipewire0.2 and Groovy only ships with libpipewire0.3.

Bonus points if you've made slack work.

"Switch back to Xorg" is not a viable answer here. Various things (notably pen input) don't work correctly (in my configuration, anyway) in Xorg and are not going to any time soon.

3

I should note for those who come after me that this is partly fixed in Ubuntu 21.04, with the following caveats:

  • Enabling WebRTC with pipewire works in Chrome / Chromium
  • Sharing through Slack works if you start Slack with slack --enable-features=WebRTCPipeWireCapturer
  • Sharing through Teams doesn't work (yet - waiting for the Teams team to update the version of Electron they use)
  • Sharing on multiple monitors appears to do weird things. On my laptop, if try to share one of my external screens which has a different resolution, the other end gets a weird interlace-pattern version of my screen. It looks like pipewire is assuming that the resolution of the image it receives matches the resolution of the "first" screen on the system and messes up the video encoding accordingly.
1
  • In summary: opening chrome://flags/#enable-webrtc-pipewire-capturer in chrome and change "WebRTC PipeWire support" to "Enabled" makes screen sharing work in Ubuntu 21.04 for e.g. the MS Teams web app running in Chrome. On my machine. :tm: – Echsecutor Jun 8 at 10:20
1

You can install this package manually but you will have to check for updates manually here.

First, download the deb file (assuming you are using the amd64 version of Ubuntu):

wget 'http://mirrors.kernel.org/ubuntu/pool/universe/p/pipewire/libpipewire-0.2-1_0.2.7-1_amd64.deb'

Then, install the package:

sudo apt install ./libpipewire-0.2-1_0.2.7-1_amd64.deb

Since libpipewire0.3 uses a totally different set of files, there should be no conflict.

Again, you will have to manually check for updates. The current version is 0.2.7-1. When you see a newer version, just click on "amd64" under "Architecture" and then you can either click on one of the mirrors to download the file or copy the link and paste it into the terminal to use the wget command to use the same method as above. Just make sure to use the correct filename with the apt command so that you don't install the wrong file (like an older downloaded version).

Finally, there is some additional information on the Archlinux wiki that you may want to check out where they mention that you might have to install xdg-desktop-portal and enable the chromium flag chrome://flags/#enable-webrtc-pipewire-capturer to get it to work.

4
  • Thanks for the answer, but this doesn't work for me. I've installed libpipewire-0.2-1:amd64 and xdg-desktop-portal was already installed. I've set the chrome flag you mention. But when I go to share a screen, the shared content is just a black screen. – Tom Dec 17 '20 at 10:39
  • Should also add that I have /usr/bin/pipewire and /usr/bin/pipewire-media-session -d bluez5 processes running. – Tom Dec 17 '20 at 10:41
  • I couldn't get this working either. – James Ward Feb 8 at 22:29
  • 1
    Installing pipewire 0.2 is no longer necessary in Ubuntu 21.04. Opening chrome://flags/#enable-webrtc-pipewire-capturer in chrome and changing "WebRTC PipeWire support" to "Enabled" is still necessary at the time of writing. – Echsecutor Jun 8 at 10:22
0

Install libpipewire0.2 and enable WebRTC with Pipewire flag in chromium.

1
  • This is basically the same answer as the first one, and, as mentioned in comments there, doesn't work. – Tom Feb 9 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.