Screen share show black screen after upgrade from Ubuntu 20.10 to 21.04

Looks like Ubuntu 21.04 default to Wayland, when I switch to Xorg screenshare works fine.

If anyone wants to try this. These are the steps:

  1. In the login screen, click the setting icon
  2. Choose "Ubuntu On Xorg" instead of "Ubuntu"
  3. Now login

Screenshare should work now.


An alternative solution, from:

  • How to disable Wayland and enable Xorg display server on Ubuntu 18.04 Bionic Beaver Linux
  • How to enable/disable wayland on Ubuntu 20.04 Desktop
sudoedit /etc/gdm3/custom.conf

Uncomment the line

#WaylandEnable=false

and save the change. This will enable the Xorg display manager.

Then either

sudo systemctl restart gdm3

Or just reboot the system