hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.88k stars 752 forks source link

Sunshine no longer working with Wayland/headless backends #6623

Closed phonetic112 closed 5 days ago

phonetic112 commented 1 week ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 4778afe2e6b4a6f8c7d218ccd8fe7e0bd4d2ee9c (hyprctl: make recv timeout bigger and give error message if it does timeout (6621)). Date: Fri Jun 21 18:41:23 2024 Tag: v0.41.1-56-g4778afe2, commits: 4874 flags: (if any) System Information: System name: Linux Node name: arch Release: 6.9.5-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 19:06:37 +0000 GPU information: 07:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD104 [GeForce RTX 4070] [10de:2786] (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: ```

Description

Sunshine can't select the monitor if the Wayland or headless backends are used. Regressed by 4f26ae70fde3b4cd5ad8ef096a7f0cb6c2dc5528.

How to reproduce

Run sunshine in a nested session with output_name = 1

Crash reports, logs, images, videos

sunshine.log

vaxerski commented 6 days ago

[2024:06:21:19:13:48]: Error: Unknown Monitor connector type [WL]: Please report this to the GitHub issue tracker

Is this a problem with us? from this log I cannot tell.

[2024:06:21:19:13:48]: Warning: Missing Wayland wire for wlr-export-dmabuf sure is missing, you should use screencopy instead.

phonetic112 commented 6 days ago

Error: Unknown Monitor connector type [WL]

since wlr_export_dmabuf isn't available it's falling back to drm/kms capture, which doesn't work with non-real monitors

vaxerski commented 5 days ago

it should use wlr_screencopy and not export_dmabuf. I have no plans on fixing this.

martydingo commented 3 days ago

Well this has entirely killed my use case for Hyperland, I thought you guys wanted this to be flexible?

You have a commit which says wlr_export_dmabuf is old, broken and unused as well however it is not unused, as this very issue suggests there are many people using hyprland's headless functionaility with sunshine.

I've spent all day digging into this to find it was an update to Hyprland which has broken my setup.

I honestly think the way this issue has been handled isn't great, simply telling people 'nah' to people who were already achieving this is kinda crazy, I'd get it if this were a feature request but it's a regression..

martydingo commented 3 days ago

I also want to add the reasoning for dmabuf, as found on an issue discussing NVFBC and X11

For Nvidia, yes. For AMD and Intel, no.

The reason is that Nvidia doesn't support VAAPI encoding, so KMS/X11/wlgrab frames need to be read back from the GPU to CPU memory for NVENC encoding. When using KMS/wlgrab+VAAPI or NvFBC+NVENC, we can directly import GPU buffers for encoding without having to read them back to the CPU first.

Which seems reasonable and disagrees with the commit statement.

vaxerski commented 3 days ago

wlr_export_dmabuf has been superseded years ago by wlr_screencopy_v1 which also does dmabuf and is what you should use

martydingo commented 2 days ago

Could it be noted somewhere? It is a breaking change for Sunshine and there will be people in the same boat as me probably trying to understand what their issue is.

vaxerski commented 2 days ago

it's noted here, if they encounter the same issue they should search the bug tracker and find this issue.