54

I am using Wayland with Fedora 25.

Pretty much no screensharing tool works correctly. From Chrome, I can share a Chrome window, but nothing else.

I also have to use zoom.us and when I share a window from that the other side just gets a blank screen.

Is there something that needs to be configured for this to work?

4
  • Screen sharing in Wayland is broken. Try logging into an X11 session instead of Wayland - use the cog next to your username on the login screen to switch.
    – harrymc
    Jun 27, 2017 at 10:56
  • 2
    yeah that is what I do but I'd rather use wayland and have screensharing working if that is possible Jun 27, 2017 at 14:06
  • 1
    I think it's mostly the full-screen sharing that is a problem. Sharing individual windows might work.
    – harrymc
    Jun 27, 2017 at 16:18
  • 1
    Screen sharing individual windows in Sococo works under Wayland. Zoom now tells you to use X11 instead of Wayland. :(
    – mart
    Nov 7, 2017 at 8:59

8 Answers 8

38

Although this is an old question, I've found a solution by using the PipeWire technology with Gnome DE (in my case 3.32) and Chrome (at present version 77).

Check this out: https://wiki.archlinux.org/index.php/PipeWire#WebRTC_screen_sharing

Just open chrome://flags/#enable-webrtc-pipewire-capturer set it as enabled and restart chrome. You'll be able to share your entire screen or any single window.

I hope it helps

EDIT July 2020:

As of 20 July 2020, since Chrome(ium) is currently using pipewire 0.2 whereas Arch Linux ships pipewire 0.3, you also need to install libpipewire02 for screen sharing to work.

EDIT June 2021:

Concerning debian: The required package libpipewire-0.3-0 is available from debian bullseye onwards.

5
  • 2
    Thanks! it helped chrome//flags/#enable-webrtc-pipewire-capture
    – kumar
    May 31, 2020 at 20:58
  • google-chrome-unstable ("dev" channel Chrome) now works with libpipewire-0.3. Mar 11, 2021 at 14:29
  • 2
    by installing libpipewire02 helped for OS: Manjaro 21.0.5 Ornara Arch based one DE: GNOME 3.38.5
    – Ankanna
    May 28, 2021 at 19:20
  • Thanks! On Fedora 34 with this flag enabled I can share windows and screens without problems
    – Jacopofar
    Jun 15, 2021 at 7:55
  • 1
    Don't forget to close ALL instances of Google Chrome, even the apps installed locally like YT Music and other stuff, you could simple do "killall chrome" as all. Worked like a charm on Manjaro 21.1 Nov 13, 2021 at 7:00
13

The ability to do traditional full screen sharing under Wayland is a missing feature, not a bug.

Realistically our only option is to switch back to Xorg. Ubuntu is actually doing this: https://www.theregister.co.uk/2018/01/30/ubuntu_reverting_to_xorg_in_bionic_beaver/

There are projects coming (e.g. Pipewire) but it seems like a good year or so before they land in Firefox or Slack.

4
  • How it's a missing feature when I can share my entire desktop using Firefox (78)? Jul 13, 2020 at 15:42
  • 4
    It's missing important feature in business world. As people work in remote teams, screensharing is very important tool.
    – kravemir
    Oct 28, 2020 at 14:34
  • 1
    While the OP has Fedora, this applies to all OSes running Wayland. In my case that is Purism which is largely debian.
    – nmgeek
    Dec 21, 2020 at 16:26
  • 1
    Ubuntu uses Wayland by default on 21.04 and newer, and screen sharing is working (at least on Firefox). Sep 1, 2021 at 13:40
9

Screen sharing in Wayland is known to be broken. You say that sharing works perfectly well in an X11 session, but you prefer to use Wayland.

I am not a Wayland developer (nor a user) and cannot fix the bug.

I have seen comments saying that the problem is mostly with full-screen sharing, so I suggest that you try sharing only individual windows until the bug is fixed.

Otherwise, your only option is to badger the Wayland developers to fix the bug, while still using X11 whenever you need to do screen sharing.

5
  • no I am having problems sharing anything except chrome. I've actually not tried sharing a fullscreen window before. Jul 4, 2017 at 8:03
  • Chrome has its own method.
    – harrymc
    Jul 4, 2017 at 9:00
  • 1
    With google hangouts, you can share inside wayland (Ubuntu 17.10) individual windows (like firefox and google itself). Not full screen though.
    – morhook
    Nov 8, 2017 at 14:28
  • Does anyone know if there are any plans for Zoom to support single Window sharing on Wayland? Jan 26, 2018 at 12:22
  • 2
    2021, This bug still exists. May 6, 2021 at 8:18
8

Pipewire changed everything. Screen sharing through Wayland is working well on Fedora 32 Workstation, out of the box. At least on Firefox. I haven't tested other browsers yet.

First, Firefox will request your permission to share your screen, then GNOME will ask whether you want to share one window or the full screen, and which monitor. That's it. Firefox will pop up a tiny window with a few quick controls for screen sharing.

While you're sharing the screen, an orange icon will be visible at the top-right corner of the screen, among other system icons. Through that menu you can quickly turn off screen sharing too.

UPDATE 2021-08-26:

Screen sharing through Pipewire on Wayland is working out of the box on both Ubuntu 21.04+ and recent Fedora releases, at least on Firefox.

3
  • Can Skype also use pipewire for screen sharing? I am on Debian 11 and I installed pipewire which works very well as a replacement for pulseaudio, alsa and jack. Official instructions worked out of the box. How do I now enable pipewire for screen sharing... The official instructions only point out, how to do audio.
    – 71GA
    Aug 26, 2021 at 18:20
  • From a quick search it seems Skype doesn't work with Pipewire yet, which doesn't come as a surprise... being a proprietary application. I regularly do screen sharing via Google Meet on Firefox (Pipewire + Wayland). The only limitation here is that Teamviewer doesn't work on Wayland, so I'm trying to convince my boss to use Remmina instead. With Ubuntu now defaulting to Wayland, we can hope that these apps will have more incentive to adopt it. Aug 26, 2021 at 19:57
  • I am getting a lot of dead Screen Share windows from my Gnome Shell I cannot cancel or close within Slack. There seems to be a bug that slack's own Share Screen window conflicts with the one of the Gnome Shell.
    – k0pernikus
    Jan 11 at 15:34
3

I am using wayland on Ubuntu 17.10.

  • zoom says wayland doesn't have a protocol to share (and recommends using X11)
  • google hangouts shows a black screen on the share full screen, and it is showing on my machine some windows (notably: google chrome and firefox, but not the gnome-terminal).
  • appear.in shows a black screen with a pixel randomly moving

There are few issues reported on this matter https://bugzilla.redhat.com/show_bug.cgi?id=1369218 (in Ubuntu it hasn't been reported yet), on gnome-shell https://bugzilla.gnome.org/show_bug.cgi?id=786565

My fix for Ubuntu 17.10 is to use X11 (you can choose when starting your session in "Ubuntu on Xorg")

3

You can pipe your screen output into a dummy webcam device, and set Zoom to use that webcam, which results in the other party seeing your desktop.

It's a hack, but basically results in screen sharing.

If you're using swaywm, you can use wf-recorder to do this. On other desktops, find something that can do screen recording, and pipe it into /dev/video2 similar as below:

# Install the v4l2 loopback driver
sudo pacman -S v4l2loopback-dkms
# Load the kernel module
sudo modprobe v4l2loopback

# Finally, pipe the screen output into the virtual webcam:
wf-recorder --muxer=v4l2 --codec=rawvideo --pixel-format=yuv420p --file=/dev/video2

Now jump back to zoom, and change the video output to the "Dummy video device".

Extra tips:

  • Remember to turn off video mirroring, or everything will be mirrored, which you generally don't want when sharing the screen.
  • In zoom, if you set the camera to Original Ratio, your full screen will be shared, but the quality will be really crap (it's unlikely the other party will be able to read anything).
  • If you set it to 16:9, the sides of your screen will be cropped, but the quality should be readable. Your pick. 😞
  • Remember to kill wf-recorder once you're done or your screen will be shared next time you join a call!

Original article

2
  • This works. But unfortunately services like Slack and Teams do some compression on webcam streams, so screensharing through this method is blurry.
    – beanaroo
    Aug 9, 2020 at 0:25
  • Yes, you get two sources of blurryness, one due to the screen capture / downsizing, and a second due to the compression the service applies.
    – WhyNotHugo
    Aug 9, 2020 at 12:26
2

Also found a solution which I've outlined here at GitHUB.

In principle steps:

  1. Put all your "communicators", all software that requires screen sharing (slack, google meet) into some seperate, micro run time that rendering with help of some X server on your host. I'd suggest X11Docker as it's super light weight and convenient. Also put a remote desktop client software of your choice into that run time entitiy.

  2. Spin up some remote desktop serving agent on your host, my choice was WayVNC (requires sway 1.4 though!)

  3. Connect from your runtime via VNC (or whatever protocol of your choice) to your host running sway.

  4. Now you can share screen in your micro runtime the screen showing the host VNC session

Effort is light and more stable than some hack until wayland native screen sharing matures.

0

Screen sharing isn't part of Wayland, but GNOME's, KDE's compositors will implement obs-xdg-portal extension.

We are currently waiting for firefox / other apps to implement that extension.

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.