34

I am using wayland with Fedora 25.

Pretty much no screensharing tools work 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 '17 at 10:56
  • 2
    yeah that is what I do but I'd rather use wayland and have screensharing working if that is possible – Derek Ekins Jun 27 '17 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 '17 at 16:18
  • Screen sharing individual windows in Sococo works under Wayland. Zoom now tells you to use X11 instead of Wayland. :( – mart Nov 7 '17 at 8:59
11

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-capture, set it as enabled and restart chrome. You'll be able to share entire screen.

I hope it helps

EDIT:

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

1
9

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.

3
  • How it's a missing feature when I can share my entire desktop using Firefox (78)? – MAChitgarha Jul 13 '20 at 15:42
  • 1
    It's missing important feature in business world. As people work in remote teams, screensharing is very important tool. – kravemir Oct 28 '20 at 14:34
  • 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 '20 at 16:26
7

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.

4
  • no I am having problems sharing anything except chrome. I've actually not tried sharing a fullscreen window before. – Derek Ekins Jul 4 '17 at 8:03
  • Chrome has its own method. – harrymc Jul 4 '17 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 '17 at 14:28
  • Does anyone know if there are any plans for Zoom to support single Window sharing on Wayland? – Kevin Wittek Jan 26 '18 at 12:22
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")

2

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.

1

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.

1

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 '20 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 '20 at 12:26
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.