hyprwm / xdg-desktop-portal-hyprland

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

Screenshare not working on Firefox after picking input #233

Open victor23k opened 4 months ago

victor23k commented 4 months ago

Hi there! I'm having problems trying to screenshare on Firefox. I'm using nvidia.

After trying to screenshare in the gUM Test Page, I can pick an input but there is nothing shown. I have the following logs:

❯ systemctl --user status xdg-desktop-portal-hyprland pipewire wireplumber
● xdg-desktop-portal-hyprland.service - Portal service (Hyprland implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-hyprland.service; static)
     Active: active (running) since Thu 2024-07-04 12:29:45 CEST; 3min 47s ago
 Invocation: 50bd738b688e434b8ed2b1c31633f10e
   Main PID: 80276 (xdg-desktop-por)
      Tasks: 5 (limit: 38072)
     Memory: 136M (peak: 304.2M)
        CPU: 4.851s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal-hyprland.service
             └─80276 /usr/lib/xdg-desktop-portal-hyprland

Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma
Jul 04 12:30:06 x xdg-desktop-portal-hyprland[80276]: [LOG] [pw] Building modifiers for dma

● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset: enabled)
     Active: active (running) since Thu 2024-07-04 12:18:16 CEST; 15min ago
 Invocation: b92d8f0b2aef4a96908c7bc2fbedf11b
TriggeredBy: ● pipewire.socket
   Main PID: 74403 (pipewire)
      Tasks: 3 (limit: 38072)
     Memory: 6.4M (peak: 7.2M)
        CPU: 1.753s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─74403 /usr/bin/pipewire

Jul 04 12:18:16 x systemd[917]: Started PipeWire Multimedia Service.

● wireplumber.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-07-04 12:18:16 CEST; 15min ago
 Invocation: 22e0f45416e44ef8bfc17693699024f4
   Main PID: 74404 (wireplumber)
      Tasks: 7 (limit: 38072)
     Memory: 6.4M (peak: 7.3M)
        CPU: 491ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
             └─74404 /usr/bin/wireplumber

Jul 04 12:18:16 x systemd[917]: Started Multimedia Service Session Manager.
Jul 04 12:18:16 x wireplumber[74404]: default: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
Jul 04 12:18:16 x wireplumber[74404]: [1:37:44.892394914] [74404] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
Jul 04 12:18:16 x wireplumber[74404]: [1:37:44.892402692] [74404] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
Jul 04 12:18:16 x wireplumber[74404]: [1:37:44.892414955] [74404]  INFO Camera camera_manager.cpp:313 libcamera v0.3.0

I can't find what this message [pw] Building modifiers for dma means. Would really appreciate some help to debug this and find what is the piece that's not working properly.

lapwat commented 3 months ago

My Screen Sharing on Firefox has been also broken since last week.

gshearer commented 3 months ago

Just confirming. I have two Archlinux systems, identical configurations using hyperland, both all AMD. One system I have updated, the other hasn't been updated since kernel 6.9.6 -- the latter works, the updated one does not. So, this problem was introduced recently. Here's a screenshot. 2024-07-10_10-07-1720623076

lapwat commented 3 months ago

Sharing my config in cases this is useful

Configuration

Linux 6.9.7-arch1-1
Hyprland v0.41.2
xdg-desktop-portal 1.18.4-1
xdg-desktop-portal-hyprland 1.3.2-1
Mozilla Firefox 127.0.2

pipewire
Compiled with libpipewire 1.2.0
Linked with libpipewire 1.2.0

wireplumber
Compiled with libwireplumber 0.5.5
Linked with libwireplumber 0.5.5
systemctl --user status xdg-desktop-portal-hyprland
● xdg-desktop-portal-hyprland.service - Portal service (Hyprland implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-hyprland.service; static)
     Active: active (running) since Fri 2024-07-12 10:46:04 CEST; 1min 54s ago
 Invocation: 57955c47133d4c8b9be3d37baa5598ec
   Main PID: 2350 (xdg-desktop-por)
      Tasks: 5 (limit: 38010)
     Memory: 95.4M (peak: 319.7M)
        CPU: 235ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal-hyprland.service
             └─2350 /usr/lib/xdg-desktop-portal-hyprland

Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_20/webrtc_session1720760173
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy]  | appid:
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy] SelectSources:
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_20/webrtc935119829
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_20/webrtc_session1720760173
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy]  | appid:
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy] option persist_mode to 1
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy] unused option multiple
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy] unused option types
Jul 12 10:46:31 xps xdg-desktop-portal-hyprland[2350]: [LOG] [screencopy] restore data invalid / missing, prompting
atasoglou commented 3 months ago

Just confirming. I have two Archlinux systems, identical configurations using hyperland, both all AMD. One system I have updated, the other hasn't been updated since kernel 6.9.6 -- the latter works, the updated one does not. So, this problem was introduced recently. Here's a screenshot. 2024-07-10_10-07-1720623076

same issue here...

gshearer commented 3 months ago

Hey everyone, just dropping by to say that as of this morning I ran both a pacman update, and a fresh build of the git version of hyprland portal, and screenshare seems to be working :) Good job whomever fixed this! Thank you!

lapwat commented 3 months ago

Mine also was fixed thanks to:

Linux 6.9.8/6.9.9 OR xdg-desktop-portal-hyprland 1.3.2-2

lapwat commented 3 months ago

Actually that was not fixed. But I was able to analyze the behavior a little bit.

I am using a dual monitor setup: the monitor of my laptop + an external monitor. The only way I could make screen sharing work is by putting the Firefox AND the app I want to share on the external monitor. If I don't do that, the Screen Sharing popup successfully lists the app but is not able to access it.

vzolin commented 2 months ago

https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/99

Following a recommendation in this other issue and adding bitdepth, 10 to all monitors fixed the problem for me.

It's actually working better in Firefox than in Chrome now. Chrome still ask 3 times what screen you want to share, Firefox just once.