Skip to content

KMS capture fails on dual-gpu laptop #1320

Description

@maximumsomething

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 nightly release?

  • This issue is present in the nightly release

Describe the Bug

On my laptop with both an integrated and dedicated GPU, sunshine fails to initialize. KMS capture fails with the error Couldn't expose some/all drm planes for card: /dev/dri/card1, where card1 refers to the dedicated GPU (which doesn't have any video outputs).

On a non-wlroots Wayland system, such as GNOME or KDE, KMS is the only capture method available, as Sunshine doesn't support standard screen capturing on Wayland, only a wlroots specific method. So this causes Sunshine to not work at all.

Expected Behavior

KMS capturing initializes with card0 (the integrated GPU).

Additional Context

I'm using KDE with Wayland. I get the same message about drm planes on X11, but sunshine eventually works with the xcb backend.

Host Operating System

Linux

Operating System Version

Debian 6.1.27-1 (2023-05-08) (bookworm) linux 6.1.0-9-amd64

Architecture

64 bit

Sunshine commit or version

1.19.1

Package

Linux - deb

GPU Type

AMD

GPU Model

AMD Ryzen 9 5900HX with Radeon Graphics, Nvidia 3050ti laptop version

GPU Driver/Mesa Version

Mesa 22.3.6, Nvidia proprietary driver 515.86.01

Capture Method (Linux Only)

KMS

Config

I verified this bug with config reset to its default.

Apps

No response

Relevant log output

[2023:05:28:13:24:27]: Info: Sunshine version: 0.19.1.f734d6684fe3191f754710c22c0094c2b461eb24
[2023:05:28:13:24:27]: Error: Couldn't find any of the following libraries: [libnvidia-fbc.so.1, libnvidia-fbc.so]
[2023:05:28:13:24:27]: Info: Found display [wayland-0]
[2023:05:28:13:24:27]: Info: Found interface: zxdg_output_manager_v1(32) version 3
[2023:05:28:13:24:27]: Info: Found interface: wl_output(62) version 4
[2023:05:28:13:24:27]: Warning: Missing Wayland wire for wlr-export-dmabuf
[2023:05:28:13:24:27]: Error: Couldn't expose some/all drm planes for card: /dev/dri/card1
[2023:05:28:13:24:27]: Error: Unable to initialize capture method
[2023:05:28:13:24:27]: Error: Platform failed to initialize
[2023:05:28:13:24:27]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2023:05:28:13:24:27]: Info: Trying encoder [nvenc]
[2023:05:28:13:24:28]: Info: Encoder [nvenc] failed
[2023:05:28:13:24:28]: Info: Trying encoder [vaapi]
[2023:05:28:13:24:30]: Info: Encoder [vaapi] failed
[2023:05:28:13:24:30]: Info: Trying encoder [software]
[2023:05:28:13:24:32]: Info: Encoder [software] failed
[2023:05:28:13:24:32]: Fatal: Couldn't find any working encoder
[2023:05:28:13:24:32]: Error: Video failed to find working encoder
[2023:05:28:13:24:32]: Info: Configuration UI available at [https://localhost:47990]
[2023:05:28:13:24:32]: Info: Adding avahi service Sunshine
[2023:05:28:13:24:32]: Info: Avahi service Sunshine successfully established.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions