Teams display's black screen when screen is shared


on Ubuntu 20.04 using Wayland on my Thinkpad T590 laptop I have been using teams-for-linux snap for like more then a year. I have never ever before have had a need to use a screen share, so I don’t know if this is a problem from a start or it is new one. Today using screen share for the first time and I shared a screen or shared a window but in both cases my friends see only black screen.

I have searched the web and some people are suggesting to use Xorg instead of Wayland, but in my case this is not possible, because when using Xorg my Ubuntu is constantly crashing and when reporting a bug on Ubuntu bug tracker the only suggestion I have got was to try Wayland and because there were no OS crashes on Wayland, they suggested to use Wayland and closed the bug report.

Also please don’t say to use official snap Teams from Microsoft, because in this snap my friends can’t hear my talkings.

How to fix this “black screen” problem?


Strictly speaking it isn’t a snap problem. This is the behaviour of any XWayland application. Wayland doesn’t allow arbitrary access to the framebuffer/viewport, so when an XWayland app tries it, they’re restricted to only seeing other windows in the same X11 session, which is usually just themselves and emptyness.

You can try running it with teams-for-linux --enable-features=WebRTCPipeWireCapturer and seeing it it works like this. It would depend upon the bundled Electron version being new enough, which is up to the maintainer.

You’ve said to not mention trying to use the official teams snap, but I’m going to suggest it anyway. Not being able to record audio sounds like you’d just need to run sudo snap connect teams:audio-record once to give it permission to access the microphone. I can’t guarantee it, but it might be the issue.

But even with the official teams snap, you’d probably need to run it with teams --enable-features=WebRTCPipeWireCapturer