KWin + VA-API: Black screen on RX 6700 XT with EGL_BAD_PARAMETER (0x300C); memory-buffer workaround causes high latency
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp, linux
- Área
- backend, performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 43k
- Forks
- 2.4k
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 106
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de LizardByte/Sunshine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LizardByte/Sunshine#6051 ·
Los mantenedores suelen responder en 1 día
-
Linux/NVIDIA: full-range 4:2:0 streams #FF0000 as green and #0000FF as dark greenPosiblemente ocupada @qqshfox la tomó hace 18 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
LizardByte/Sunshine#5953 ·
Los mantenedores suelen responder en 1 día
-
PIN pairing fails with "Missing CSRF token" - web UI never fetches/attaches the tokenQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
LizardByte/Sunshine#5467 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
LizardByte/Sunshine#6048 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
LizardByte/Sunshine#6035 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de LizardByte/Sunshine
Issues similares
-
#2754 make deepseek api not workAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
xiaoyifang/goldendict-ng#3148 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 4 días
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
[Bug]: Launching Space Calibrator causes Bluetooth mouse lag due to a 100% duty-cycle BLE scanPosiblemente ocupada @Yuuki204 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días