Black Screen during Screen Share in Ubuntu 18.04

I don't know where to ask, so I am asking here. While having an online meeting, whenever I share my screen it always shows as a black screen with my cursor to other people in the meeting. It doesn't matter which platform I am using be it Skype, Google Meet, Zoom, or any other. In windows, there is no problem like this.
OS - UBUNTU 18.04
Graphics Card - NVIDIA GeForce GTX 1050 Ti
Please, Help me to resolve this problem.


Solution 1:

The default Ubuntu 18.04 Bionic Beaver installation comes with Wayland enabled. The objective is to disable Wayland and enable Xorg display server instead.

You might need to update GDM3 custom configuration file

/etc/gdm3/custom.conf

Uncommenting this will force the login screen to use Xorg.

#WaylandEnable=false

After making the changes, reboot the system and voila, it worked for me!

Solution 2:

Fix #1:

  1. Install xcompmgr using your Linux distro's package manager.
sudo apt install xcompmgr
  1. After installing, open the terminal and run this command:
xcompmgr -c -l0 -t0 -r0 -o.00
  1. Open compton.conf
gedit ~/.config/compton.conf
  1. Edit the following line:
shadow-exclude = [ "name = 'cpt_frame_window' " ];

Fix #2: Run Ubuntu on Xorg instead of Wayland.