After being forced to work with Windows for a while I finally was able to switch back to Linux. And one of the first things I needed for work was MS Teams. So I updated the already installed version and when I first had to do a screen share I had a flashback, why I switched to use Teams in a VM, rather than the native Linux version: a grey overlay.
It’s nice to have the red frame, so that I know which screen I am sharing, but the grey overlay makes things very hard to read. Especially when you share a dark themed window. But see for yourself. This is what I got:
And this is how it should look like:
Interestingly this only happens on my desktop (GPU: nVidia RTX3080) and not on my laptop (Lenovo X1 Carbon, GPU: not nVidia).
I did some digging in the past and could never figure out what caused it, but this time I was determined to stay with Linux, and to use my desktop. So this time I did a deep dive and I found some few reports of this issue, ranking from grey to a full blown black screen with a red frame.
And, even more important, I finally found what’s causing this issue. It is a little tool called rect-overlay in the slimcore package. On my Ubuntu 20.04 it was found in /usr/share/teams/resources/app.asar.unpacked/node_modules/slimcore/bin. The simple solution is to rename it, or for the brave to delete it. So these steps will do the trick (I am using sudo this time, if you’re already root, then just leave it out):
$ cd /usr/share/teams/resources/app.asar.unpacked/node_modules/slimcore/bin
$ mv rect-overlay rect-overlay.old
I found out the hard way, that you have to restart Teams if it is currently running. Otherwise you will get some “interesting” effects with the UI for some reason.
By renaming this file you will get rid of the greying or blacking out of the screen, but you will also loose the red frame that indicates the currently shared screen. The latter can be a problem, but for me it’s not. I am a happy screen share again.