Linux/Hyprland: `output_name` ignored, wlr and kms capture always stream the same monitor

Đang mở
#6,134 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, linux
Lĩnh vực
backend, desktop

Hướng nghiên cứu

Start by tracing how output_name selects a monitor in the wlr and KMS capture paths, then compare that selection with the monitor actually passed to the streaming pipeline. Reproduce on Hyprland with two monitors and test both capture methods; done means the stream matches the selected monitor for each method. The payload names no source files or tests, so locating the relevant entry points will take project familiarity.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Is there an existing issue for this?
  • I have searched the existing issues
Is your issue described in the documentation?
  • I have read the documentation
Is your issue present in the latest beta/pre-release?

Tested on the latest stable release (v2026.914.233613).

Describe the Bug

Two monitors on one NVIDIA GPU: Acer HDMI-A-1 (1920x1080@60, at 1920x0) and Samsung DP-2 (1920x1080@240, at 0x0). Whatever output_name is set to, the stream always shows the Acer (HDMI-A-1), while the log reports the other monitor:

  • capture = wlr, output_name = 1 -> log: [wlgrab] Selected monitor [Samsung ... (DP-2)] for streaming, stream shows HDMI-A-1.
  • capture = kms, output_name = 1 -> log: Found connector ID [840] (840 = DP-2 in /sys/class/drm), stream shows HDMI-A-1. Same with output_name = 0.
  • capture = portal is not an option: Could not create RemoteDesktop session (xdg-desktop-portal-hyprland has no RemoteDesktop interface).

Each change was followed by a service restart and a fresh session from Moonlight.

Expected Behavior

The selected monitor is the one streamed.

Additional Context

Workaround: a prep-cmd on the Desktop app disables DP-2 for the session:
hyprctl eval "hl.monitor({output='DP-2',disabled=true})", re-enabled in the undo command.

Compositor: Hyprland 0.56.2 (Lua config), xdg-desktop-portal-hyprland 1.4.1.
Client: Moonlight on Windows.

Host Operating System

Linux

Operating System Version

Arch Linux (Omarchy 4.5.0)

Architecture

amd64/x86_64

Package

Linux - Arch package (sunshine 2026.914.233613-1)

GPU Type

NVIDIA

GPU Model

NVIDIA GeForce RTX 3060

GPU Driver/Mesa Version

615.78.08

Capture Method

wlr and KMS (both affected)

Ngôn ngữ chính
C++
Star
43k
Fork
2.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LizardByte/Sunshine

Tất cả issue của LizardByte/Sunshine

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.