hyprwm / xdg-desktop-portal-hyprland

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

OBS Freezes on Wayland with Pipewire (xdg-desktop-portal-hyprland) #239

Closed different-name closed 1 week ago

different-name commented 4 months ago

OS

Arch NixOS

Behaviour

OBS Screen Capture (pipewire) freezes as soon as the input is selected

https://github.com/user-attachments/assets/435758a5-a0ba-4d07-aa6d-f3d8c04b383f

See original OBS issue where this was marked as a xdg-desktop-portal-hyprland issue: https://github.com/obsproject/obs-studio/issues/10959

dec05eba commented 4 months ago

I cant reproduce this. Are you using latest hyprland desktop portal and hyprland installed from master branch?

different-name commented 4 months ago

They've just merged the swap to aquamarine into master I believe so likely a lot of big changes, will try reproduce tomorrow and update

different-name commented 4 months ago

I cant reproduce this. Are you using latest hyprland desktop portal and hyprland installed from master branch?

I am using the latest commit on the master branch of xdg-desktop-portal hyprland, and this commit from 7 hours ago on hyprland https://github.com/hyprwm/Hyprland/commit/cbaac6deafb857662d630efbca8b0ebac0f11b44

Able to reproduce reliably, might be noteworthy that I am on an Nvidia card, and I've looked through the logs attached in the original issue, they are also using an Nvidia card

First launch can be okay, with the source not freezing, seems to reliably break on subsequent launches and after clicking the Select Monitor button in the source properties

dec05eba commented 4 months ago

Oh ok that might explain it then, I tested it on amd

SSS-Says-Snek commented 3 months ago

I can reproduce the issue (I also have an Nvidia card)

c4em commented 3 months ago

I'm also able to reproduce this on Nvidia, both on the latest master commit and latest stable version of Tag: v0.41.2, commits: 918d8340afd652b011b937d29d5eea0be08467f5. For me the first launch behavior is different though, it first segfaults when adding the new source:

info: PipeWire initialized
info: User added source 'Screen Capture (PipeWire)' (pipewire-screen-capture-source) to scene 'Scene'
info: [pipewire] Screencast session created
info: PipeWire initialized
info: [pipewire] Asking for monitor and window

(process:9791): GLib-CRITICAL **: 15:39:53.592: g_variant_is_object_path: assertion 'string != NULL' failed

(process:9791): GLib-CRITICAL **: 15:39:53.592: g_variant_new_object_path: assertion 'g_variant_is_object_path (object_path)' failed
zsh: segmentation fault (core dumped)  nix run nixpkgs#obs-studio

and on consecutive launches it freezes like shown in the video.

Oery commented 3 months ago

I can reproduce it and I'm on Nvidia and latest commit. The stream freeezes instantly when created on OBS first, but if a stream is created on Discord, then the OBS streams works fine. There are no errors nor warnings in my logs.

mufaroxyz commented 2 months ago

Any updates on this? I'm still having issues on Nvidia

sfjuocekr commented 2 months ago

I have the same-ish issue, the funny thing is when I have OBS active it captures fine but when I switch back to the game my game output freezes!

When I tab back to OBS the game seems to continue fine in the background.

LeonLeeLi commented 1 month ago

I have the same-ish issue, the funny thing is when I have OBS active it captures fine but when I switch back to the game my game output freezes!我遇到了同样的问题,有趣的是,当我激活 OBS 时,它可以正常捕获,但是当我切换回游戏时,我的游戏输出冻结了!

When I tab back to OBS the game seems to continue fine in the background.当我返回 OBS 时,游戏似乎在后台继续正常进行。

The same issue

mufaroxyz commented 1 month ago

So far the only workaround I found that worked for me is: https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/220#issuecomment-2227471077

Though, the issue still occurs randomly, I was able to at least get the screen capture to work at the bare minimum

different-name commented 1 week ago

I'm going to close this issue since I can no longer reproduce, perhaps it was fixed accidentally :partying_face: If anyone else is still experiencing this I'm happy to reopen