Additional features, settings, or issues not covered by specific Microsoft Teams categories
Dear @PAKO STOYANOV,
Good day, and I appreciate the clear explanation of your issue. I understand that the screen sharing prompt appears briefly and then closes immediately with a DOMException and port disconnection error. I’m sorry for the inconvenience this has caused, especially when this is affecting your ability to use Microsoft Teams meetings properly.
As a forum moderator, I am not able to access your account or review the backend systems directly to diagnose and resolve this for you. My role here is limited to providing general guidance and suggestions that users can try on their side.
From your description and my research, this behavior may be related to how screen sharing works in Microsoft Teams on the web when using Linux with Wayland, especially in Firefox. Screen sharing on Wayland depends on components such as PipeWire and xdg-desktop-portal to allow screen capture. If these components are missing, not running correctly, or not fully supported by the browser/session, the screen sharing prompt may appear and then close unexpectedly.
Please try the following steps to see if they help:
1.Check the required components
Please make sure the required screen sharing components are installed. For Ubuntu-based distributions, you can try:
sudo apt update
sudo apt install xdg-desktop-portal xdg-desktop-portal-gnome pipewire wireplumber
If you are using another distribution, please adjust the command accordingly, such as using dnf on Fedora.
2.Restart the related services
After installing or confirming the required components, restart the related services:
systemctl --user restart pipewire pipewire-pulse wireplumber xdg-desktop-portal
Then restart your browser and try screen sharing in Teams again.
3.Test basic screen sharing outside Teams
Visit https://mozilla.github.io/webrtc-landing/gum_test.html and test screen sharing. (This link is shared by community members for your convenience. It points to a third-party site that is not managed or verified by Microsoft. We can’t guarantee the quality, safety, or suitability of any content or software found there. Please review carefully and make sure you understand any potential risks before using it).
If screen sharing also fails there, the issue may be related to the Linux desktop environment, browser, or portal configuration rather than Teams only.
4.Switch to X11/Xorg
- Log out of your current desktop session.
- At the login screen, select Ubuntu on Xorg or the equivalent X11/Xorg option for your desktop environment.
- Log back in and test screen sharing in Teams again.
Screen sharing may work more reliably under X11/Xorg in some Linux environments.
5.Consider a third-party Teams wrapper
Consider the community-maintained teams-for-linux app, which sometimes handles Wayland better with specific flags. You can review it here: Unofficial Microsoft Teams for Linux client · GitHub
Note: This is an independent third-party project and is not affiliated with Microsoft. Microsoft cannot guarantee its safety, reliability, or feature support. Please review it carefully and use it at your own discretion.
I hope the above suggestions help narrow down the issue. However, since this appears to be closely related to the Linux desktop environment, browser behavior, and Wayland/X11 screen-sharing components, if the issue continues after trying the steps above, I recommend checking with your Linux distribution’s support forum or a Linux-focused community for more in-depth assistance.
They may be better able to review the PipeWire, xdg-desktop-portal, Wayland/X11, and browser-specific configuration in your environment. When posting there, it may also help to include your Linux distribution, desktop environment, browser version, and whether you are using Wayland or X11/Xorg.
Thank you for your patience and understanding. I truly hope you can get this resolved soon. Wishing you all the best.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.