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

Fails to detect display on Wayland with Radeon #3427

Closed
2 tasks done
theMajc opened this issue Dec 2, 2024 · 2 comments
Closed
2 tasks done

Fails to detect display on Wayland with Radeon #3427

theMajc opened this issue Dec 2, 2024 · 2 comments

Comments

@theMajc
Copy link

theMajc commented Dec 2, 2024

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?

This issue is present in the latest pre-release

Describe the Bug

Moonlight fails to connect to Sunshine server, if the server's power management blanks out the screen (turns monitor off).

I have one monitor connected via DisplayPort and one emulation dongle connected via HDMI.

Moonlight connection works fine when monitor is ON.
As soon as the monitor is blanked, attempting to connect will result in "Connection Error" error 503. Sunshine produces the following log when connection fails:

[2024-12-01 18:05:30.377]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024-12-01 18:05:30.377]: Info: Trying encoder [nvenc]
[2024-12-01 18:05:30.777]: Info: Encoder [nvenc] failed
[2024-12-01 18:05:30.777]: Info: Trying encoder [vaapi]
[2024-12-01 18:05:31.177]: Info: Encoder [vaapi] failed
[2024-12-01 18:05:31.177]: Info: Trying encoder [software]
[2024-12-01 18:05:31.577]: Info: Encoder [software] failed
[2024-12-01 18:05:31.577]: Fatal: Unable to find display or encoder during startup.
[2024-12-01 18:05:31.577]: Fatal: Please check that a display is connected and powered on.

Expected Behavior

No response

Additional Context

I only noticed this happen recently. I do not have a reliable window of time to work with here, but I tested this scenario a couple weeks ago with v2024.1115.143556, and was able to connect to Sunshine when host's monitor was OFF, or was disconnected from monitor. This issue developed recently when I had not change Sunshine config or updated Sunshine.

Setting unprivileged screencasting with this command did not resolve this issue: sudo setcap -r $(readlink -f $(which sunshine))

Host Operating System

Linux

Operating System Version

Ubuntu 24.04.1 LTS

Architecture

amd64/x86_64

Sunshine commit or version

v2024.1127.551

Package

Linux - deb

GPU Type

AMD

GPU Model

Radeon 680M

GPU Driver/Mesa Version

amdgpu

Capture Method

None

Config

sunshine_name = Bosp3

Apps

{
    "env": {
        "PATH": "$(PATH):$(HOME)\/.local\/bin"
    },
    "apps": [
        {
            "name": "LoRes Desktop",
            "image-path": "",
            "prep-cmd": [
                {
                    "do": "gnome-monitor-config set -LpM HDMI-1 -m 1920x1080@60.000",
                    "undo": "gnome-monitor-config set -Lp -M DP-2 -m 3440x1440@49.987"
                }
            ],
            "exclude-global-prep-cmd": "",
            "auto-detach": "true",
            "wait-all": "true",
            "exit-timeout": "5"
        }
    ]
}

Relevant log output

[2024-12-01 17:48:41.294]: Info: Sunshine version: v2024.1127.551
[2024-12-01 17:48:41.294]: Info: Package Publisher: LizardByte
[2024-12-01 17:48:41.294]: Info: Publisher Website: https://app.lizardbyte.dev
[2024-12-01 17:48:41.294]: Info: Get support: https://app.lizardbyte.dev/support
[2024-12-01 17:48:41.295]: Error: Couldn't load cuda: -1
[2024-12-01 17:48:41.295]: Info: Found display [wayland-0]
[2024-12-01 17:48:41.296]: Info: Found interface: zxdg_output_manager_v1(5) version 3
[2024-12-01 17:48:41.296]: Info: Found interface: wl_output(32) version 4
[2024-12-01 17:48:41.296]: Warning: Missing Wayland wire for wlr-export-dmabuf
[2024-12-01 17:48:41.296]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.297]: Info: Found display [wayland-0]
[2024-12-01 17:48:41.297]: Info: Found display [wayland-0]
[2024-12-01 17:48:41.297]: Info: Found interface: zxdg_output_manager_v1(5) version 3
[2024-12-01 17:48:41.297]: Info: Found interface: wl_output(32) version 4
[2024-12-01 17:48:41.297]: Info: Resolution: 3440x1440
[2024-12-01 17:48:41.297]: Info: Offset: 0x0
[2024-12-01 17:48:41.297]: Info: Logical size: 3440x1440
[2024-12-01 17:48:41.297]: Info: Name: DP-2
[2024-12-01 17:48:41.297]: Info: Found monitor: Dell Inc. 34"
[2024-12-01 17:48:41.298]: Info: -------- Start of KMS monitor list --------
[2024-12-01 17:48:41.298]: Info: Monitor 0 is DP-2: Dell Inc. 34"
[2024-12-01 17:48:41.298]: Info: --------- End of KMS monitor list ---------
[2024-12-01 17:48:41.301]: Warning: Gamepad ds5 is disabled due to Permission denied
[2024-12-01 17:48:41.301]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024-12-01 17:48:41.301]: Info: Trying encoder [nvenc]
[2024-12-01 17:48:41.301]: Info: Screencasting with KMS
[2024-12-01 17:48:41.301]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.301]: Error: Couldn't find monitor [0]
[2024-12-01 17:48:41.301]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.301]: Error: Couldn't find monitor [0]
[2024-12-01 17:48:41.365]: Info: System tray created
[2024-12-01 17:48:41.501]: Info: Screencasting with KMS
[2024-12-01 17:48:41.501]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.502]: Error: Couldn't find monitor [0]
[2024-12-01 17:48:41.502]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.502]: Error: Couldn't find monitor [0]
[2024-12-01 17:48:41.702]: Info: Encoder [nvenc] failed
[2024-12-01 17:48:41.702]: Info: Trying encoder [vaapi]
[2024-12-01 17:48:41.702]: Info: Screencasting with KMS
[2024-12-01 17:48:41.702]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.703]: Info: Found monitor for DRM screencasting
[2024-12-01 17:48:41.703]: Info: Found connector ID [108]
[2024-12-01 17:48:41.704]: Info: Found cursor plane [76]
[2024-12-01 17:48:41.749]: Info: Creating encoder [h264_vaapi]
[2024-12-01 17:48:41.750]: Info: Color coding: SDR (Rec. 601)
[2024-12-01 17:48:41.750]: Info: Color depth: 8-bit
[2024-12-01 17:48:41.750]: Info: Color range: JPEG
[2024-12-01 17:48:41.774]: Info: vaapi vendor: Mesa Gallium driver 24.0.9-0ubuntu0.2 for AMD Radeon Graphics (radeonsi, rembrandt, LLVM 17.0.6, DRM 3.57, 6.8.0-48-generic)
[2024-12-01 17:48:41.780]: Info: Using normal encoding mode
[2024-12-01 17:48:41.780]: Info: Using default rate control
[2024-12-01 17:48:41.780]: Warning: [h264_vaapi @ 0x55f6d2a7aa40] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024-12-01 17:48:41.806]: Info: Creating encoder [hevc_vaapi]
[2024-12-01 17:48:41.806]: Info: Color coding: SDR (Rec. 601)
[2024-12-01 17:48:41.806]: Info: Color depth: 8-bit
[2024-12-01 17:48:41.806]: Info: Color range: JPEG
[2024-12-01 17:48:41.832]: Info: vaapi vendor: Mesa Gallium driver 24.0.9-0ubuntu0.2 for AMD Radeon Graphics (radeonsi, rembrandt, LLVM 17.0.6, DRM 3.57, 6.8.0-48-generic)
[2024-12-01 17:48:41.836]: Info: Using normal encoding mode
[2024-12-01 17:48:41.836]: Info: Using default rate control
[2024-12-01 17:48:41.836]: Warning: [hevc_vaapi @ 0x55f6d2a7aa40] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024-12-01 17:48:41.869]: Info: Creating encoder [av1_vaapi]
[2024-12-01 17:48:41.869]: Info: Color coding: SDR (Rec. 601)
[2024-12-01 17:48:41.869]: Info: Color depth: 8-bit
[2024-12-01 17:48:41.869]: Info: Color range: JPEG
[2024-12-01 17:48:41.890]: Info: vaapi vendor: Mesa Gallium driver 24.0.9-0ubuntu0.2 for AMD Radeon Graphics (radeonsi, rembrandt, LLVM 17.0.6, DRM 3.57, 6.8.0-48-generic)
[2024-12-01 17:48:41.894]: Error: [av1_vaapi @ 0x55f6d2a7aa40] No usable encoding entrypoint found for profile VAProfileAV1Profile0 (32).
[2024-12-01 17:48:41.895]: Error: Could not open codec [av1_vaapi]: Function not implemented
[2024-12-01 17:48:41.897]: Info: Screencasting with KMS
[2024-12-01 17:48:41.897]: Info: /dev/dri/card1 -> amdgpu
[2024-12-01 17:48:41.898]: Info: Found monitor for DRM screencasting
[2024-12-01 17:48:41.898]: Info: Found connector ID [108]
[2024-12-01 17:48:41.898]: Info: Found cursor plane [76]
[2024-12-01 17:48:41.910]: Info: Creating encoder [hevc_vaapi]
[2024-12-01 17:48:41.910]: Info: Color coding: SDR (Rec. 709)
[2024-12-01 17:48:41.910]: Info: Color depth: 10-bit
[2024-12-01 17:48:41.910]: Info: Color range: JPEG
[2024-12-01 17:48:41.931]: Info: vaapi vendor: Mesa Gallium driver 24.0.9-0ubuntu0.2 for AMD Radeon Graphics (radeonsi, rembrandt, LLVM 17.0.6, DRM 3.57, 6.8.0-48-generic)
[2024-12-01 17:48:41.935]: Info: Using normal encoding mode
[2024-12-01 17:48:41.935]: Info: Using default rate control
[2024-12-01 17:48:41.935]: Warning: [hevc_vaapi @ 0x55f6d2ac8f40] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
[2024-12-01 17:48:41.971]: Info: 
[2024-12-01 17:48:41.971]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024-12-01 17:48:41.971]: Info: 
[2024-12-01 17:48:41.971]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2024-12-01 17:48:41.971]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2024-12-01 17:48:41.974]: Info: Configuration UI available at [https://localhost:47990]
[2024-12-01 17:48:41.974]: Info: Adding avahi service bosp3
[2024-12-01 17:48:42.960]: Info: Avahi service bosp3 successfully established.
@TakodaS
Copy link

TakodaS commented Dec 5, 2024

Notice Warning: Missing Wayland wire for wlr-export-dmabuf

This is a well known issue since sunshine uses dmabuf, which is an outdated/not recommended for modern use on a Wayland system.

Similar issue here: hyprwm/Hyprland#6623

@ReenigneArcher
Copy link
Member

Duplicate of #3327

@ReenigneArcher ReenigneArcher marked this as a duplicate of #3327 Dec 5, 2024
@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
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

3 participants