(Steam Deck) Black picture in 4-7/10 streams when GAMESCOPE_COMPOSITE_FORCE set to 0 since 2026.906

Aperta
#5,839 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, linux

Direzione di ricerca

Start in src/platform/linux/kmsgrab.cpp, especially the plane selection at lines 1539-1542 and the fb() helpers around lines 644-656 and 104-122. Reproduce repeated KMS captures on a Steam Deck with GAMESCOPE_COMPOSITE_FORCE unset or set to 0, comparing working and black streams and their DRM plane state. Done means the capture consistently shows the picture despite the active overlay plane, with the relevant warning or selection behavior corrected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

The stream stays black (but sound works) in 4 to 7 out of 10 tries when connecting with Moonlight to a Steam Deck (started as root via flatpak run --system from a Decky plugin, handheld, internal display) since 2026.906 when GAMESCOPE_COMPOSITE_FORCE is set to 0. When set to 1 (using DISPLAY=:0 xprop -root -f GAMESCOPE_COMPOSITE_FORCE 32c -set GAMESCOPE_COMPOSITE_FORCE 1) or using 2026.516, the stream works as expected. Switching that flag while streaming has no effect until you restart the stream. The logs show Warning: Couldn't get drm fb for plane [0]: Invalid argument with 60 entries per second for 13 seconds, but my session continued for another 9 seconds after that and the picture stayed black the whole time.

To reproduce, start a Sunshine instance with version >= 906 in Game Mode with GAMESCOPE_COMPOSITE_FORCE unset or set to 0. As I wrote, this issue only occurs about 4-7 out of 10 tries, and I sometimes got lucky and got 3 working streams in a row (see the log), so you might have to try multiple times.

Expected Behavior

The stream should show a picture all the time.

Additional Context

Note that in the logs I provided, I had to reconnect the stream 3 times for the issue to appear, so the initial logs might look fine. The initial 3 sessions didn't show a single fb warning.

While the stream was black, there have been two active planes on the CRTC - Primary (obj 73, zpos 3) and Overlay
(obj 95, zpos 10), both 1280x800 ARGB8888, both with active AMD color pipeline
(DEGAMMA sRGB, SHAPER, LUT3D, BLEND sRGB). When the stream worked normally, there was just the primary plane, XRGB2101010, Pipeline Default. Rotation (rotate-270) and size were the same in both instances. I can provide the drm_info snapshots if needed.

I also tried the latest pre-release (2026.929.125923), which is affected as well. I had to set system_tray = disabled there though, as otherwise Sunshine would exit right after startup because no system tray is available in game mode on the Steam Deck.

Issue #5659 is possibly related, as it shows similar symptoms (overlay planes disturbing kmsgrab)

My analysis (not verified):

  • according to my research the [0] in the warning message isn't the number of the plane, but of the framebuffer id, meaning that the plane Sunshine chose when starting the stream (kmsgrab.cpp#L1539-L1542) didn't have any framebuffer in the affected frames.
  • kmsgrab.cpp takes the first non-cursor plane with framebuffer and afterward only reads this plane. When there are two planes, the composited image is never read. Which plane Sunshine chooses isn't logged.
  • plane selection and refresh() are unchanged between 516 and 914
  • 906 brought code changes as well as a runtime change fdo 24.08 -> KDE 6.10, GL 24.08 ->
    25.08 at the same time, and there are no intermediate builds on flathub, so I can't bisect this further. However, I can test with AppImages if that helps.
  • ruled out: privileged DRM/EGL worker (#5706/#5709) - was introduced in 914, but 906 is already affected

Side note for 914: card.fb() (fb() and drmModeGetFB2_privileged/drmModeGetFB_privileged) runs in the worker thread, but the warning prints errno of the calling thread (thread-local) - the error text (EINVAL/EAGAIN) is meaningless. This doesn't explain the black image though, as the black image is already present in 906.

Host Operating System

Linux

Operating System Version

SteamOS 3.8.28 (Build 20260922.1), Kernel 6.18.50-valve2, GameScope 3.16.23.6,

Architecture

amd64/x86_64

Package

Linux - flathub/flatpak

GPU Type

AMD

GPU Model

„AMD Custom GPU 0405" (Van Gogh) / Steam Deck LCD

GPU Driver/Mesa Version

26.2.2 (Flatpak GL.default//25.08, 2026.906+), 26.1.8 (//24.08, 2026.516)

Capture Method

KMS (Linux)

Apps

Log output

Online logs

https://gist.github.com/causa-prima/1c03a3b11e5b050044466fd433ace31c

Lingua principale
C++
Stelle
43k
Fork
2.4k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LizardByte/Sunshine

Tutte le issue di LizardByte/Sunshine

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.