78

I'm trying to share my screen using Google Chrome or Microsoft Teams and I only can share the browser, I can't share my entire screen, it appears black:

Trying to select share full screen but it's black :

enter image description here

I thought the issues was due to having 3 monitors, but I disconnected both and still have the same issue. I'm using the latest version of Ubuntu and Google chrome, I also tried with chromium, and nothing.

I use this laptop for my work and I don't want to switch back to Windows... Programming on Windows is painfull, I need to get this to work.

UPDATE I finally could fix it, seems like the issue is with wayland, switching to X.org fixes it.

This is the post that helped me: https://askubuntu.com/a/968265/1024151

redigaffi
  • 891
  • Why the downvotes? something wrong? something I can improve, please let me know. – redigaffi Dec 12 '19 at 08:28
  • 2
    Pleaese consider writing your own answer by clicking the button below. Then and indicate that your answer is correct by clicking on the gray check mark ✔ next to your answer and turn it green ✅. This will help others. Please do not put the answer inside the question. – user68186 Jul 27 '20 at 20:39
  • Please post your update as an answer and removed it from your question. Q&A mechanism of SE won't work as expected if the question contains the answer. – Greenonline Oct 24 '22 at 21:01

5 Answers5

91

Search for the file.conf in /etc/gdm3/ in my case, Ubuntu 20, 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 "

Works on: Ubuntu 20/21/22

Khyar Ali
  • 1,042
  • 8
  • 7
48

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

After reboot Chrome, now the connection works well. Using the same test tools as before, now Chrome use the system selection window for share the screen or a window. Also Teams works well in Chrome over Wayland, and the black screen + mouse is now solved.

Source: https://github.com/IsmaelMartinez/teams-for-linux/issues/455

  • 3
    Thanks, this also worked for ubuntu 22.04. now i dont need to boot on my windows machine just to share screen on the meeting – Ron Michael Jun 28 '22 at 01:55
  • 1
    That worked for me. I find this Ubuntu 22.04 with Wayland too buggy. If anyone is planning to move to Ubuntu 22.04, I think it is much better to stay in 20.04. I'm planning to move back to 20.04. Every day this 22.04 presents a different error. – Ruben Alves Sep 09 '22 at 12:39
  • Thank you @kave-mcdaniel, this is the perfect solution! – lucius Jan 06 '23 at 10:21
  • I suggest marking this answer as the correct one. It fixes the problem within the Chrome browser, without affecting the whole operating system. The answer currently marked as correct is wrong in fact. – lucius Jan 06 '23 at 10:23
  • better solution than the chosen one – negstek Jan 10 '23 at 14:08
  • This worked for me on Ubuntu 22.04 for sharing in Chrome – Hace Jan 18 '23 at 09:27
  • Also worked for me trying to get printscreen to work with maim, when printscreen chrome – run_the_race Feb 28 '23 at 09:29
2

I also faced the same issue, I resolved it by following below steps:

Just go to the chrome browser search bar and enter: "chrome://flags/#enable-webrtc-pipewire-capturer" -> Now set "WebRTC PipeWire support" flag to Enabled -> Relaunch chrome.

Now screen share will work. source

enter image description here

ratnesh
  • 121
0

That's a Chrome bug, also happens for me in Ubuntu 20.04.

Workaround: While you are in the meeting, join the same meeting from another browser window/tab but this time as presenter. It will allow you to share things as expected: A whole screen, an application, Chrome tab, a specific window.

see below both windows enter image description here Left one as regular invited, right one as presenter, both in the same meeting.

Actually even after any fix, I will keep using it in this way since I can see what I'm sharing to others as others would see it, very convenient ;)

I know the answer is kind of late, but hope it helps to others with the same issue.

tinlyx
  • 3,230
Knache
  • 1
  • Ups, I didn't read well enough and the error it's for Microsoft Team, but something similar happens also for Google Meets, Slack and Jitsi meet, at least for me. So the answer I've sent might help others, but might not. – Knache Jul 27 '20 at 20:34
0

Go to chrome://flags/#enable-webrtc-pipewire-capturer using the address bar of your browser. Change WebRTC PipeWire Support from Default to Enabled on the drop down menu. Click Relaunch