Photo of me

Hugo Osvaldo Barrera

Software Engineer. Python Lover 🐍

Zoom screen sharing on ArchLinux

Zoom doesn’t support screen sharing on Linux unless you’re using GNOME or X11.

Also, Zoom only runs via XWayland (a compatibility layer for older applications). XWayland doesn’t really support desktop scaling, which is why it looks so blurry:

A screenshot of zoom's error message.
I reported that screen sharing on Linux just shared a white screen some time ago.
A few days later they fixed that.

Whomever added this message clearly never used Linux. “please use GNOME or x11 instead” is bullshit advice; changing one of the lower-level operating system components on which everything else runs is a recipe for disaster.

Downgrading to x11 is a non-trivial matter; the window manager needs to be changed too, then all the desktop settings, and finally, all the desktop applications need to be tweaked. Honestly, I wouldn’t even know where to start.

Even if I did go through that huge undertaking, I’d end up with a system that supports Zoom’s screen sharing, but wouldn’t properly support my hardware (e.g.: HiDPI displays) or many modern applications.

A solution

Fortunately, there’s a workaround; just pipe the current screen into a virtual webcam, and then share you video using that device instead of your real webcam. It’s hack, but a hack is the best option there is when you have to use shit software like Zoom.

If you’re not using sway, you’ll need to find something to record your desktop (e.g.: an alternative to wf-recorder).

# 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:

“Enable HD” does not seem to change anything. Probably because the codec is 420p. Sadly, other codecs don’t seem to work, I’ve no idea why better quality codecs won’t work, I think this is a limitation of ffmpeg, but it might be wf-recorder, or v4l2loopback 🤷🏻.

— § —