Open 2e0byo opened 9 months ago
for me it's not $HOURS
, but literally once and only once. so when I try to screenshare with, say, Discord, the preview works great, but as soon as I choose the screen to actually stream it, I'm prompted twice more to select a screen (regardless of whether or not I manually checked the 'restore token' box), and both attempts fail. trying to share again leaves even the preview broken.
I'm having the same problem. After streaming once, it's broken, until I logout and login again. That should restart xdg-desktop-portal-hyprland and then it works again.
Edit: The error is exactly the same as @pwfff : [ERR] [screencopy] Couldn't obtain a format from dma
Having the exact same problem as @pwfff. First screen share works properly, stops working soon as I start sharing again. My logs are equal to @2e0byo's.
As a workaround I'm using the nuclear script from the wiki, https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal/ everytime I need to screenshare.
Having the same issue, seems to be somewhat related to #11 #123,
I'm having the same problem. After streaming once, it's broken, until I logout and login again. That should restart xdg-desktop-portal-hyprland and then it works again.
Edit: The error is exactly the same as @pwfff :
[ERR] [screencopy] Couldn't obtain a format from dma
Yea, I noticed this from the menu becoming "empty" in my duplicate issue here #152 😂
@ellwoodb I have managed to fix the [ERR] [screencopy] Couldn't obtain a format from dma
by having OBS open before doing the screencast on Discord? It's weird, maybe something related to dma?
@jh-devv I sadly don't have enough knowledge about how the portal works to know about dma
stuff.
Despite that, opening OBS before Discord seems to "keep it alive" somehow. Interesting...
for me it's not
$HOURS
, but literally once and only once. so when I try to screenshare with, say, Discord, the preview works great, but as soon as I choose the screen to actually stream it, I'm prompted twice more to select a screen (regardless of whether or not I manually checked the 'restore token' box), and both attempts fail. trying to share again leaves even the preview broken.
Having the same issue. Have you found any solutions to this problem?
At some point (4h < point < 24h) after booting the system, screen capture fails: obs for instance shows
I've traced this down to
xdg-desktop-portal-hyprland
by restarting services until it worked again. Logs from before restart:Logs from after, with successful screen capture
``` ov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] SHAREDATA returned selection 0 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] Start: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_162/obs3 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_162/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | appid: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | parent_window: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [pw] Building modifiers for dma Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] Sharing initialized Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] New session: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_168/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_168/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | appid: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] SelectSources: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_168/obs2 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_168/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | appid: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] option cursor_mode to 2 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] option persist_mode to 2 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] unused option multiple Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] unused option types Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] restore data invalid / missing, prompting Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_IN> Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [sc] Selection: /screen:DP-4 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] SHAREDATA returned selection 0 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] Start: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_168/obs3 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_168/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | appid: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | parent_window: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [pw] Building modifiers for dma Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] Sharing initialized Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [pw] Building modifiers for dma Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [pw] Building modifiers for dma Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy/pipewire] Out of buffers Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] New session: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_174/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_174/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | appid: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] SelectSources: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_174/obs2 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_174/obs1 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | appid: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] option cursor_mode to 2 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] option persist_mode to 2 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] unused option multiple Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] unused option types Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] restore data invalid / missing, prompting Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_IN> Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [sc] Selection: /screen:DP-4 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] SHAREDATA returned selection 0 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] Start: Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/request/1_174/obs3 Nov 18 18:31:00 digory xdg-desktop-portal-hyprland[556063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_174/obs1 ```I've realised I'm on a slightly outdated commit, so I'll rebuild (arch,
xdg-desktop-portal-hyprland-git
) and see if this goes away, but it's been happening for at least a month.How do I debug further? If it just failed I'd run in gdb, but I don't want to do that for hours on end until the problem emerges.