hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
273 stars 47 forks source link

Screensharing not working with Teams #232

Closed goldyfruit closed 2 months ago

goldyfruit commented 2 months ago

Share works with OBS and Google Meet but for some reason it doesn't work with Teams (web or app). I'm running as well on openSUSE Tumbleweed.

xdg-desktop-portal-1.18.4-1.1.x86_64
xdg-desktop-portal-gtk-1.15.1-1.3.x86_64
xdg-desktop-portal-hyprland-1.3.1-48.16.x86_64

Monitor configuration:

monitor=,preferred,auto,1,bitdepth,10

The bitdepth,10 allows me to share the entire screen with Meet (if not set I can only share a tab) but this as no effect on Teams.

hyprctl version
Hyprland, built from branch openSUSE at commit 0000000000000000000000000000000000000000  (Built for x86_64-suse-linux).
Date: Thu Jan 01 00:00:00 1970
Tag: 0.41.2, commits: -1

flags: (if any)
hyprctl monitors all 
Monitor eDP-1 (ID 0):
    1920x1080@60.04900 at 0x0
    description: AU Optronics 0x226D
    make: AU Optronics
    model: 0x226D
    serial: 
    active workspace: 1 (1)
    special workspace: 0 ()
    reserved: 0 29 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB2101010
    availableModes: 1920x1080@60.05Hz
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_165/webrtc_session1577598040
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | appid:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | parent_window:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [pw] Building modifiers for dma
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Sharing initialized
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Sent restore token to /org/freedesktop/portal/desktop/session/1_165/webrtc_session1577598040
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Stream destroyed
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Session destroyed
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [toplevel] (deactivate) locks: 1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [toplevel] (activate) locks: 2
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] New session:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_298/obs1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_298/obs1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | appid:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] SelectSources:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_298/obs2
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_298/obs1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | appid:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] option cursor_mode to 2
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] option persist_mode to 2
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] unused option multiple
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] unused option types
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] restore data invalid / missing, prompting
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=0000000000000000000000000000000000000000_1719939560_1399861075 XDPH_WINDOW_SHARING_LIST="1539871408[HC>]main-dropterm[HT>]goldyfruit@x270:~[HE>]1540485472[HC>]chromium-browser[HT>]Screenshare not working on openSUSE Tubleweed · Issue #229 · hyprwm/xdg-desktop-portal-hyprland - Chromium[HE>]1540494912[HC>]kitty[HT>]~[HE>]" hyprland-share-picker 2>&1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [sc] Selection: r/screen:eDP-1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] SHAREDATA returned selection 0
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Start:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_298/obs3
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_298/obs1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | appid:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | parent_window:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [pw] Building modifiers for dma
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Sharing initialized
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Sent restore token to /org/freedesktop/portal/desktop/session/1_298/obs1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Stream destroyed
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] Session destroyed
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [toplevel] (deactivate) locks: 1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [toplevel] (activate) locks: 2
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] New session:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_165/webrtc_1662918478
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_165/webrtc_session715277288
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | appid:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] SelectSources:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_165/webrtc669175206
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_165/webrtc_session715277288
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy]  | appid:
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] option persist_mode to 1
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] unused option multiple
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] unused option types
Jul 02 13:58:47 x270.home.lan xdg-desktop-portal-hyprland[33798]: [LOG] [screencopy] restore data invalid / missing, prompting

The only message in PipeWire is this one (when using the app only, not when using the web):

Jul 04 08:00:20 x270.home.lan pipewire[2060]: mod.client-node: detected old client version 5
wowblvck commented 2 months ago

I see the same problem in Google Meet, after selecting the entire screen area there is only a black screen.

The bug began to appear after updating PipeWire to version 1.2.0

goldyfruit commented 2 months ago

@wowblvck try to add the bitdepth,10 option to your monitor to see if it helps (it doesn't for my Teams issue but it did for Meet).

pulsar256 commented 2 months ago

bitdepth, 10 fixes screen sharing in Teams/PWA (chromium).

Without setting the bitdepth garbage / pixeljunk (screenshot below) is "shared".

Did also try xdg-desktop-portal-wlr-git which was working fine without the extra monitor configuration.

OBS screen capture will initially / briefly also show the pixel junk but recover quickly (without setting the bitdepth explicitly)

image

wowblvck commented 2 months ago

@wowblvck try to add the bitdepth,10 option to your monitor to see if it helps (it doesn't for my Teams issue but it did for Meet).

Thanks! It's fix my problem.

goldyfruit commented 2 months ago

All is fine... It was a user issue with Teams. All is working as expected on the Hyprland side.

Sorry for the noise, at least @wowblvck you got your issue sorted :+1: