Zoom screen sharing on ArchLinux

2020-06-14 - Hugo Barrera's site

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.

This is a very funny message, and not really something that’s an option for desktop users. Saying “please use a different desktop” is not really realistically applicable advise.

Changing something like the desktop environment on an OS is a great 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 ๐Ÿคท๐Ÿป.

— ยง —