Microsoft Teams and Wayland - will screen sharing be fixed in 21.04?

22,562

Solution 1

I hate to say it, but the answer ended up being installing Manjaro instead of Ubuntu… Teams (on Wayland) just worked out of the box, with screen sharing and everything.

Solution 2

The problem does not lie with Ubuntu nor Linux.

Teams is an app built on the electron framework, so basically it is one package consisting of html5 with javascript running on chromium. This makes it possible to use it on any platform that can run chromium.

Problem is, wayland support for chromium is incomplete and buggy. Therefore on wayland it is forced to use xwayland. This further reduces the possibilities of things like screensharing.

In short, for now use Xorg if you have to make full use of electron based apps like Teams.

Wayland will eventually work as soon as chromium has full support of it and all electron apps have been upgraded to use that version of chromium.

Solution 3

As an alternative option, you can run the Teams web app on Chrome or Edge Beta, which allow sharing on Wayland.

Solution 4

The only way I could get Wayland and Teams working with screen sharing was to install the beta version of Edge:

https://www.microsoftedgeinsider.com/en-us/download?platform=linux-deb

Login to teams and install it as a desktop app.

Not the best solution but gives the appearance of a desktop app with the ability to share my screen plus I didn't have to modify any chrome settings.

I am currently running:

Distributor ID: Pop, Description: Pop!_OS 21.04, Release: 21.04, Codename: hirsute

Based on

Ubuntu 21.04

Kernel 5.11.0-7620-generic

Solution 5

I'm on 21.04 with Wayland, and screen sharing works well in the latest version of Google Chrome (v92.0.4515.159).

Here's a trick if you want to have Teams in a separate window and with a desktop shortcut:

  • Navigate to https://teams.microsoft.com/ in Chrome.
  • Open the Chrome menu (top right).
    • More tools.
      • Create shortcut...
        • Rename to what you want
        • Check Open as window
        • Click Create
  • Right click on the new shortcut on your desktop and select Allow Launching
  • Now you'll have a high resolution icon on your desktop which opens Teams using an up to date Chrome (with screen sharing working) in a separate window.

enter image description here

Share:
22,562

Related videos on Youtube

iAmGregorJ
Author by

iAmGregorJ

Updated on September 18, 2022

Comments

  • iAmGregorJ
    iAmGregorJ 3 months

    I've googled until my fingers bled, but unfortunately all I end up finding is either posts by Microsoft saying "Teams works on Linux" and posts in help forums that just end up telling people to use xorg instead of Wayland.

    But Wayland is going default, and screen sharing isn't working atm (Ubuntu 20.10 here, using the "official" Teams package) unless we use xorg. Using Wayland doesn't even show the option to share one's screen in Teams.

    Has there been any news concerning 21.04 and screen sharing?

    Alternative: is there anything I can do in 20.10 using Wayland to get screen sharing to work in Teams?

    I'm sure there's a lot of us that have the same question, now that working from home has become the new norm...

  • Arehandoro
    Arehandoro over 1 year
    Although this is the best answer, compared to the comments, it's slightly wrong: The issue is both with MS and Electron. As it can be seen in the github repo github.com/electron/electron/issues/23063 MS had not build Teams with the flag needed for screen sharing on electron, which by the way the version used by MS is now unsupported, but also Electron only implemented the feature by default in their latest v12 release, so I would expect several issues still.
  • Pascal
    Pascal over 1 year
    Yes the issue is MS, the Teams web app in chromium works perfectly with wayland and screen sharing.
  • Bastian Venthur
    Bastian Venthur about 1 year
    Not sure why this was downvoted, but the answer is correct as of 2021-10.
  • Bruno de Oliveira about 1 year
    The topic is about enabling screen share on Wayland and not "A WAY" of enabling screen share. This just disable wayland,
  • Henning
    Henning about 1 year
    cannot confirm here with UBuntu 20.10 - when trying to share screen, I get the option to chose the entire screen, but it's only black. Or two apps - Chrome or PyCharm, despite I have multiple other windows.
  • runlevel0
    runlevel0 12 months
    Most practical answer! THX. I was going to test XWayland, but using Chrome is an excellent option, specially when the rest of your working environment (except shells) are browser-based.
  • xhudik
    xhudik 12 months
    unfortunately, it doesnt screenshare on Ubuntu 21.10 and Chrome 96.0.46. @Aleksey Rubtsov - what was your setup? (ubuntu, and chrome versions)
  • xhudik
    xhudik 12 months
    @Pascal what version of Chromium works for you?
  • xhudik
    xhudik 12 months
    likely I found the problem: in chrome run: chrome://flags/#enable-webrtc-pipewire-capturer and set enable (kudos: techcommunity.microsoft.com/t5/discussions/… )
  • Pascal
    Pascal 12 months
    I am on Arch Linux and since August every version, currently Chromium 96.0.4664.110 Arch Linux, but you need the xdg-desktop-portal running wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing
  • bluppfisk
    bluppfisk 9 months
    screensharing using Teams on Chrome only works for certain applications (notably, Chrome itself and Codium) but not the whole screen.
  • Krisztián Szegi
    Krisztián Szegi 9 months
    I would downvote it (not enough rep.) because: as @BrunodeOliveira said it is NOT answering the question and "A less drastic solution would be to disable Wayland and use xOrg." is highly opinionated. For me it is the most drastic way, as I need to separately scale my laptop and my external monitor.
  • Admin
    Admin 6 months
    Tried MS Teams web on Ubuntu 22.04 - WORKS.