How to enable/disable Wayland on Ubuntu 20.04 and higher Desktop

Error: Using MS Teams in Ubuntu, cannot share screen. It shows black screen.


1) Disable Wayland

sudo vi  /etc/gdm3/custom.conf
Uncomment the line to disable and make sure value is false.

# Uncomment the line below to force the login screen to use Xorg

2)Restart GDM3 or reboot your Ubuntu desktop

sudo systemctl restart gdm3

3) Make sure to Login to Ubuntu without Wayland

4) Try to share desktop on Teams . It should work now.

If you like please follow and comment