Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First screen share is working, subsequent shares show black screen #172

Open
herrwusel opened this issue Jan 19, 2024 · 9 comments
Open

Comments

@herrwusel
Copy link

Similar to #148, I'm experiencing the behaviour that the first screen share is working and afterwards only a black screen is shown.

I built commit 4fc83e6 and started XDPH with -v:

[TRACE] [core] got poll event
[TRACE] [core] got poll event
[TRACE] [sc] hlOnBuffer for 0x6183b95d86c0
[TRACE] [sc] hlOnDmabuf for 0x6183b95d86c0
[TRACE] [sc] hlOnBufferDone for 0x6183b95d86c0
[TRACE] [sc] pw format 8 size 3804x2070
[TRACE] [sc] hl format 875709016 size 3804x2070
[TRACE] [sc] wlrOnBufferDone: dequeue, no current buffer
[TRACE] [pw] dequeue on 0x6183b95aa2b0
[TRACE] [pw] dequeue failed
[LOG] [screencopy/pipewire] Out of buffers
[TRACE] [pw] pwStreamParamChanged on 0x6183b95aa2b0
[TRACE] [pipewire] pw requested dmabuf
[TRACE] [pw] Format renegotiated:
[TRACE] [pw]  | buffer_type DMA
[TRACE] [pw]  | format: 8
[TRACE] [pw]  | modifier: 72057594037927938
[TRACE] [pw]  | size: 3804x2070
[TRACE] [pw]  | framerate 60
[TRACE] [core] got poll event
[TRACE] [core] got poll event
[TRACE] [core] got poll event
[TRACE] [core] got poll event
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95cebe8 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95cec18 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95cec48 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95cec78 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95ceca8 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95cecd8 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95ced08 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [pw] pwStreamAddBuffer with 0x6183b95ced38 on 0x6183b95aa2b0
[TRACE] [pw] createBuffer: type dma
[TRACE] [pw] buffer datas 1
[TRACE] [core] got poll event
[TRACE] [core] got poll event

If I cut too much from the logs, I can provide a full log.

@mtwb47
Copy link

mtwb47 commented Jan 27, 2024

I don't have the logs yet, but I too have this issue with one of my monitors. Will record two of my three monitors, but the third one will not capture. Must restart the portal via systemctl to get it to work.

hyprland-portal version is the most recent one pulled from the git repository and built from source. Hyprland itself is version - 0.34.0-1.1

@vaxerski
Copy link
Member

vaxerski commented Feb 3, 2024

can't really test 3 monitors myself due to the lack of 3 monitors (I only have two) but sharing two at once seems to work for me.

Can I get a log from that? Is it also pw being out of buffers?

@mtwb47
Copy link

mtwb47 commented Feb 3, 2024

Can I get a log from that? Is it also pw being out of buffers?

I'm a complete wayland noob, so can you point me towards where I can find them? Or should I look in the systemd logs? Also, not sure about the pw thing either. Again total noob.

@herrwusel
Copy link
Author

For me, it is happening with two monitors: laptop and external.
I searched for “pw being out of buffers” but I don't know what to do with it.

@vaxerski
Copy link
Member

vaxerski commented Feb 4, 2024

You can append -v to your xdph systemd service and then journalctl -u xdg-desktop-portal-hyprland > log.txt (worth noting you have to restart the service for the change to take effect, obviously)

Or you can use the nuclear script from the wiki and append -v to the xdph cmdline for verbose logs. Then, attach the result. https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal/#usage

@herrwusel
Copy link
Author

If you are referring to me, I did run xdgh by first using the nuclear script and then running from the command line (see first post).

It might be a problem with the Intel iGPU. I just got another laptop with an AMD iGPU and sharing just works(TM).

@rurigk
Copy link
Contributor

rurigk commented Feb 5, 2024

I think i found how to reproduce (AMD gpu)

This error only happens if you turn off and on your monitor

Kill and then launch xdg-desktop-portal-hyprland -> turn off monitor -> turn on monitor -> try to screen cap that monitor
If i restart xdg-desktop-portal-hyprland it gets fixed until monitor is turned off and on again

@herrwusel can you try if this triggers yor problem?

@herrwusel
Copy link
Author

Kill and then launch xdg-desktop-portal-hyprland -> turn off monitor -> turn on monitor -> try to screen cap that monitor
If i restart xdg-desktop-portal-hyprland it gets fixed until monitor is turned off and on again

I can't reproduce this on my current system.

@malcolmrebughini
Copy link

I used to have this issue with zoom, but now zoom will always show a black screen (reported here: #178 ). But the issue now happens with firefox too.

The first time it works, the second time the picker shows up but selecting anything won't start the share, and trying to share again does not even bring the picker dialog anymore.
Killing the process and starting firefox resets the state and you can go through the same steps again.

[LOG] [screencopy]  | appid: 
[LOG] [screencopy] SelectSources:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_74/webrtc582008398
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_74/webrtc_session552811761
[LOG] [screencopy]  | appid: 
[LOG] [screencopy] option persist_mode to 1
[LOG] [screencopy] unused option multiple
[LOG] [screencopy] unused option types
[LOG] [screencopy] restore data invalid / missing, prompting
[LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=c5e28ebcfe00a5
10922779b2c568cfa52a317445_1712073150 XDPH_WINDOW_SHARING_LIST="<REDACTED" hyprland-share-picker 2>&1
[LOG] [sc] Selection: /screen:DP-2

[LOG] [screencopy] SHAREDATA returned selection 0
[LOG] [screencopy] Start:
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_74/webrtc1912163979
[LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_74/webrtc_session552811761
[LOG] [screencopy]  | appid: 
[LOG] [screencopy]  | parent_window: 
[LOG] [pw] Building modifiers for dma
[LOG] [screencopy] Sharing initialized
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] [pipewire] Asked for a wl_shm buffer which is legacy.
[WARN] 
[pipewire] Asked for a wl_shm buffer which is legacy.
[LOG] [sc] Incompatible formats, renegotiate stream
[LOG] [pw] Building modifiers for dma
[LOG] [pw] Building modifiers for dma
[ERR] [screencopy] tried scheduling on already scheduled cb (type 0)

Systeminfo:

Hyprland, built from branch HEAD at commit c5e28ebcfe00a510922779b2c568cfa52a317445  (props: bump ver 0.37.1).
Date: Sat Mar 16 14:51:49 2024
Tag: v0.37.1

flags: (if any)


System Information:
System name: Linux
Node name: malcolm
Release: 6.8.2-arch2-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000


GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] [10de:1c8c] (rev a1) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:
local/xdg-desktop-portal 1.18.2-1
    Desktop integration portals for sandboxed apps
local/xdg-desktop-portal-hyprland 1.3.1-6
    xdg-desktop-portal backend for hyprland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants