6

I was using Ubuntu 20.04 and everything was working just fine.

I installed Ubuntu 22.04 LTS (deleted everything, a fresh installation) and everything is OK except Google Meet's share screen.

I can join meetings, share my webcam, and send & receive audio & video.

But when I want to share my screen, it shows a black screen.

How can I fix this? Nothing has changed in my laptop hardware.

Melanie Palen
  • 179
  • 1
  • 1
  • 8
Saeed Neamati
  • 1,683
  • 6
  • 23
  • 33

3 Answers3

12

The solution is pretty simple, Step by step guide to fix screen sharing on Ubuntu 22.04.

Step 1: Check the Default Display Feature To check the current Ubuntu display, run the following command.

echo $XDG_SESSION_TYPE

If your system is Ubuntu 22.04, its display session is Wayland. Now you have to disable Wayland and enable “Xorg”(x11)

Step 2: Enable “Xorg” and disable “Wayland” Open gdm3 directory to edit the “custom.conf” file by the following command.

sudo vi /etc/gdm3/custom.conf

Uncomment the following line.

WaylandEnable=false

Step 3: Reboot the system Now reboot or restart your system to apply the changes. After rebooting you can share your screen on zoom, ms team, etc.

You can confirm the changes by running the following command again.

echo $XDG_SESSION_TYPE

If you correctly change the conf file, it will show you display x11.

DarkDiamond
  • 1,875
  • 11
  • 12
  • 19
Sumit Tiwari
  • 121
  • 3
  • You can simply switch to an Xorg session at the login screen. – gronostaj Sep 19 '22 at 17:46
  • 1
    Then my second monitor is black after reboot... – Nicolas Dec 28 '22 at 14:33
  • xorg is playing very badly with the multi-display on ubuntu 21+.. also, enabling wayland doesn't consistently fix the issue, you will get a better share options screen, with the options visible and not black, but the recipient isn't always able to see it. – DevDonkey Jan 12 '23 at 15:40
9

Just type at chrome address bar...

chrome://flags/#enable-webrtc-pipewire-capturer

And enable the first entry

Wayland suits best for most users. So, no Wayland give up is necessary.

Toto
  • 17,001
  • 56
  • 30
  • 41
Yuri Fontoura
  • 91
  • 1
  • 2
1

I was resolved by going to chrome://flags/#enable-webrtc-pipewire-capturer and changing the value from Default to Enabled.

then

Search for the file.conf in /etc/gdm3/ in my case, Ubuntu 22.04, it's custom.conf

sudo nano /etc/gdm3/custom.conf

uncomment the line

#WaylandEnable=false to be WaylandEnable=false

then reboot

"uncommenting that line will use the Xorg display manager instead of Wayland "

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – DarkDiamond Sep 19 '22 at 17:51
  • Just setting chrome://flags/#enable-webrtc-pipewire-capturer to "Enabled" resolved my black screen in Brave browser on Ubuntu 22.04 with a Logitech usb webcam. I did not have to switch back to X11 as the display manager. – Simeon Nov 21 '22 at 04:03