KWin + VA-API: Black screen on RX 6700 XT with EGL_BAD_PARAMETER (0x300C); memory-buffer workaround causes high latency
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp, linux
- Ambito
- backend, performance
Direzione di ricerca
Start with src/platform/linux/pipewire.cpp, the reported workaround location, and trace the DMA-BUF image import path into VA-API. Reproduce the failure with KWin/PipeWire capture and check whether the import error permits a safe fallback to memory buffers. Done means video works with VA-API without the black screen, while measuring whether latency improves over the reported workaround.
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
Closely related to #5316, but with different GPU hardware and symptoms (black screen instead of a crash).
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
Sunshine 2026.914.233613 produces a completely black video stream when using KWin/PipeWire capture with VA-API hardware encoding on an AMD Radeon RX 6700 XT (Navi 22) passed through to a Debian 13 VM running KDE Plasma on Wayland.
Moonlight successfully connects and audio works, but no video is displayed. The issue occurs on both Windows 11 and Debian Linux Moonlight clients over wired LAN, regardless of whether Desktop or Steam Big Picture is streamed.
Sunshine repeatedly reports:
Info: Creating encoder [hevc_vaapi]
Error: Couldn't import RGB Image: 0000300C
Error: Could not convert image
0x300C corresponds to EGL_BAD_PARAMETER.
Configuration:
capture = kwin
encoder = vaapi
adapter_name = /dev/dri/renderD128
output_name = Virtual-2
The RX 6700 XT is correctly detected, and vainfo confirms H.264 and HEVC hardware encoding support.
Test results:
| Encoder / configuration | Result |
|---|---|
| VA-API (unmodified Sunshine) | Black screen, repeated EGL import errors |
Software (libx264) |
Video works, but extremely sluggish |
| Vulkan | Green screen |
| VA-API with forced PipeWire memory buffers | Video works, but noticeable latency |
Explicit GPU selection using adapter_name and DRI_PRIME=pci-0000_01_00_0 did not resolve the issue.
Workaround confirmed:
Following the approach described in #5316, I rebuilt Sunshine from the same version and modified src/platform/linux/pipewire.cpp to force CPU-memory buffers by setting:
n_dmabuf_infos = 0;
The patched build reports:
[pipewire] using memory buffers
Found H.264 encoder: h264_vaapi [vaapi]
Found HEVC encoder: hevc_vaapi [vaapi]
The video stream now works with VA-API hardware encoding enabled.
However, the resulting stream has noticeably higher latency and feels sluggish, even over wired LAN. The additional memory copies may contribute to this, particularly at 3840x2160. This has not yet been fully benchmarked.
Unlike the original report in #5316, Sunshine does not crash. Instead, it repeatedly fails to import the captured image while continuing to run.
Expected Behavior
KWin/PipeWire capture should successfully import frames into the VA-API hardware encoding pipeline without producing a black screen.
Ideally, Sunshine should support low-latency DMA-BUF capture on this configuration or gracefully fall back to memory buffers when DMA-BUF/EGL import fails.
Hardware encoding should remain responsive at 4K/60 FPS without requiring an experimental patch.
Additional Context
- Related issue: #5316
- The original issue involves an AMD Polaris GPU, while this reproduction uses RDNA2 (RX 6700 XT).
- Sunshine runs in a Proxmox VM with PCIe passthrough of the Radeon GPU.
- The VM additionally has a QEMU/Bochs display adapter (
1234:1111) for its graphical console. - KDE Plasma runs on Wayland with a virtual KWin display (
Virtual-2, 3840x2160 @ 60 Hz, 200% scaling). - A second virtual display (
Virtual-1) was disabled without resolving the problem. - Capturing a normal desktop screenshot with KDE Spectacle works correctly.
- The patched Sunshine version was built locally and started through a systemd user-service override.
- Both Windows 11 and Debian Linux Moonlight clients reproduce the black screen.
- The underlying cause appears related to DMA-BUF/EGL image import between KWin/PipeWire and Sunshine's VA-API processing, but this has not been conclusively isolated.
Host Operating System
Linux
Operating System Version
Debian GNU/Linux 13 (Trixie), KDE Plasma / Wayland, kernel 6.12.113+deb13-amd64, running inside a Proxmox VM
Architecture
amd64/x86_64
Package
Linux - AppImage
GPU Type
AMD
GPU Model
AMD Radeon RX 6700 XT (Navi 22, RDNA2, PCI ID 1002:73df), PCIe passthrough
GPU Driver/Mesa Version
amdgpu, Mesa 25.0.7-2+deb13u1, radeonsi, LLVM 19.1.7, DRM 3.61
Capture Method
Kwin
Apps
[
{
"name": "Desktop"
},
{
"name": "Steam Big Picture"
}
]
Log output
[2026-10-28 20:00:12.316]: Info: Creating encoder [hevc_vaapi]
[2026-10-28 20:00:12.329]: Info: EGL: context priority set to HIGH
[2026-10-28 20:00:12.336]: Info: vaapi vendor: Mesa Gallium driver 25.0.7-2+deb13u1 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 19.1.7, DRM 3.61, 6.12.113+deb13-amd64)
[2026-10-28 20:00:12.336]: Info: Streaming bitrate is 14988000
[2026-10-28 20:00:12.336]: Info: [VAAPI] Quality level set to 0 (fastest level: 32)
[2026-10-28 20:00:12.336]: Info: [VAAPI] Using CBR rate control with standard VBV size
[2026-10-28 20:00:12.369]: Error: Couldn't import RGB Image: 0000300C
[2026-10-28 20:00:12.369]: Error: Could not convert image
[2026-10-28 20:00:12.377]: Info: Creating encoder [hevc_vaapi]
[2026-10-28 20:00:12.389]: Info: EGL: context priority set to HIGH
[2026-10-28 20:00:12.396]: Info: vaapi vendor: Mesa Gallium driver 25.0.7-2+deb13u1 for AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 19.1.7, DRM 3.61, 6.12.113+deb13-amd64)
[2026-10-28 20:00:12.426]: Error: Couldn't import RGB Image: 0000300C
[2026-10-28 20:00:12.426]: Error: Could not convert image
After applying the memory-buffer workaround:
[pipewire] Streaming display 'Virtual-2' offset: 0x0 resolution: 3840x2160
[pipewire] using memory buffers
Found H.264 encoder: h264_vaapi [vaapi]
Found HEVC encoder: hevc_vaapi [vaapi]
Online logs
No response
- Lingua principale
- C++
- Stelle
- 43k
- Fork
- 2.4k
- Merge medio
- 1g 6h
- PR unite (30g)
- 106
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LizardByte/Sunshine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
LizardByte/Sunshine#6051 ·
I maintainer di solito rispondono entro 1 giorno
-
Linux/NVIDIA: full-range 4:2:0 streams #FF0000 as green and #0000FF as dark greenForse già presa @qqshfox l’ha presa 18 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
LizardByte/Sunshine#5953 ·
I maintainer di solito rispondono entro 1 giorno
-
PIN pairing fails with "Missing CSRF token" - web UI never fetches/attaches the tokenForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
LizardByte/Sunshine#5467 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
LizardByte/Sunshine#6048 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
LizardByte/Sunshine#6035 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di LizardByte/Sunshine
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
xiaoyifang/goldendict-ng#3148 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 4 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[Bug]: Launching Space Calibrator causes Bluetooth mouse lag due to a 100% duty-cycle BLE scanForse già presa @Yuuki204 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni