To be clear about my setup, I was running Ubuntu 20.04 LTS with a dual monitor setup. I had been using Wayland because my XPS built-in screen is 4k and my external is standard HD (1080p).
As luck would have it, Ubuntu 22.04 LTS was recently in my update queue, and I figured it couldn’t get much worse. So I upgraded, but (womp womp) it didn’t help.
Now zoom wouldn’t show a normal screen sharing option, but it had a new “System Capture” selection.
The system capture selection would bring up another new prompt:
But after I clicked “Share” nothing would happen. People on the other end would just see a black screen.
PipeWire Debugging
After some research it seems that the new sharing subsystem for Wayland is called PipeWire. In my quest to debug it end-to-end I found this handy guide for debugging screen sharing in Wayland, the “It doesn’t work” Troubleshooting Checklist.
One of the steps is to check the pipewire service itself:
systemctl --user status pipewire
And mine was up-and-running but was returning this warning in yellow:
Yes it was for a different distro (Slackware) but one of the pieces of advice seemed sound:
Long story short, remove every little file from /etc/pipewire if exists and reboot the system.
I’m not sure why the folder was there with an old config file in it. Likely from when I was on 20.04 and tried upgrading PipeWire to try to fix zoom (which didn’t work).
I deleted that folder (actually moved it to a temporary place first), rebooted and it did the trick. Screen sharing is back on! Good thing because my job depends on it 💪
My company helped me purchase a new Dell 7390 XPS 13 Developer Edition. The biggest hurdle I had when setting it up was getting my external monitor to work correctly. It’s a standard HD monitor (1920×1080), and the laptop screen is 4K (3840×2160) – known as a “HiDPI” monitor because while it’s run at 3840×2160 it’s scaled 200% so actual humans can read the fonts.
This presented a problem because the scaling was affecting the external monitor – it was appearing as if the resolution was half of HD – 960×540. Hello 1990s!
So I turned off the external monitor, but some applications still weren’t scaling right on the 4K (200% scaled) laptop screen. I began to experiment with individual application scaling factors like QT_DEVICE_PIXEL_RATIO=1 for QT applications such as VLC and Zoom, and --force-device-scale-factor=2 for Spotify.
Then I found some chatter about Wayland and its ability to handle scaling automagically.
Wayland: Scaling the Easy Way
First, WTF is Wayland? It’s a next-generation X server that replaces Xorg. It was apparently included as default with Ubuntu 17.10 (which I skipped because I was on LTS). Then because it was deemed to not be ready for LTS prime-time, it was installed on 18.04 but Xorg became the default again.
So how do you switch? Easy, before you log in, just click the gear icon and select “Ubuntu on Wayland.”
After logging in, enable gnome’s “experimental” per-monitor scaling, by runing this command in a terminal:
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
Here’s the conversation on reddit I found regarding these settings:
After logging out and logging back in (or rebooting), you should be able to select the scaling of your external monitor through the normal Settings -> Devices -> Displays configuration. Now the scaling for the external monitor will actually work:
With Wayland you can get rid of the per-application scaling settings because it handles them automatically. I’m relieved to have found a simple solution to this problem, hopefully it helps you too!