Repository navigation
Linux: software encoder fails on GNOME portal/PipeWire BGRA (scale Invalid argument / imgutils ABRT) when no HW encode available #5430
Description
Activity
Why'd you remove our issue template fields?
Yes on nightly 0.0.5368 (commit: 4eb2db5, Debian trixie amd64 deb from CI/Docker build).
This is not the beta/pre-release... this is a WIP/draft PR. I have not even asked anyone to test this PR because it's not ready yet.
- addedaiPR has signs of heavy ai usage (either indicated by user or assumed)PR has signs of heavy ai usage (either indicated by user or assumed)
on Jul 19, 2026 oh, my fault. I hope the nightly build may works, not realizing that it is only a draft.
so which one should i test and may works well? im happy to give it a try.pre-releases are listed with GitHub releases
- Version: 2026.715.205118
- Commit: 9d2409f
- Host: Debian 13 (trixie), GNOME Wayland, virtual monitor Meta-0 1920×1080
- Config: capture = portal, encoder = software (GPU is AMD CAICOS / radeon — VAAPI decode only, no HW encode)
Result on this build: still broken (same portal + software path).
Portal/PipeWire capture succeeds:text 1 │ [pipewire] Video format: 12 2 │ [pipewire] Size: 1920x1080 3 │ [pipewire] using memory buffersSoftware encode fails during probe:
text 1 │ Trying encoder [software] 2 │ Creating encoder [libx264] 3 │ Error: Couldn't scale frame: Invalid argument 4 │ Encoder [software] failedThen nvenc / vulkan / vaapi all fail (expected here), and startup ends
with:text 1 │ Fatal: Unable to find display or encoder during startup. 2 │ Error: Video failed to find working encoderSo this pre-release does not fix the portal BGRA → software (libx264) scale still fails on my setup.
Same issue here, but with KWin Screencast instead of the portal. Fedora 44, KDE Plasma 6
Wayland, Sunshine 2026.808.164219,capture = kwin+encoder = software(GPU has no
hardware encode).Startup dies with:
Info: Screencasting with KWin ScreenCast Info: [pipewire] Video format: 12 Info: [pipewire] using memory buffers Info: Creating encoder [libx264] Error: Couldn't scale frame: Invalid argument Info: Encoder [software] failed Fatal: Unable to find display or encoder during startup.I traced it to
dummy_img()insrc/platform/linux/pipewire.cpp. During startup
validation the encoder takes a dummy image and feeds it straight intosws_scale_frame(),
and since PR #5360 changeddummy_img()to justreturn 0(no buffer),img->datais
null and sws bails with EINVAL. The PR's comment says it mirrors kmsgrab/wlgrab, but those
allocate inalloc_img()— the PipeWire one doesn't.Same PR also added a
~img_descriptor_t()thatdelete[]simg->dataunconditionally.
With the memory-buffer path (which is what PipeWire delivers to software encoders)
fill_img()pointsimg->dataat PipeWire's own staging buffer, so the destructor frees
memory it doesn't own — heap corruption and SIGABRT on session teardown once streaming
actually starts.Locally I restored the dummy allocation and added a
data_ownedflag so the destructor
only frees what belongs to the image. With that, startup validation passes and sessions
tear down cleanly.
Is there an existing issue for this?
Related strings appear elsewhere but are not the same setup:
"Couldn't scale frame"often with NVENC / other capture stacksencoder = software(libx264) +capture = portal+ GNOME Wayland virtual monitor (Meta-0 / headless remote) + GPU with VAAPI decode only (no encode)Is your issue described in the documentation?
Docs cover portal capture and software encode; they do not document this failure path (portal BGRA → software scale fails, then fatal “no display/encoder” even though a monitor and PipeWire stream exist).
Is your issue present in the latest beta/pre-release?
This issue is present in the latest pre-release
Tested:
0.0.5368(commit: 4eb2db5f4884135ef593ec375e003523b019800d, debian-trixie-amd64)2026.516.143833(commit: 14ffa6fdaa53f7b51512be2b3d24f3939695403c)Describe the Bug
On Debian 13 (trixie) + GNOME Wayland, with a virtual/remote monitor
Meta-01920×1080 (GNOME Remote Desktop headless-style session), Sunshine is configured with:capture = portalencoder = software(required: host GPU has no H.264 encode entrypoint)Portal capture succeeds and PipeWire delivers format 12 (BGRA) @ 1920×1080,
using memory buffers.Software encode then fails:
Error: Couldn't scale frame: Invalid argument→Encoder [software] failed→ nvenc/vulkan/vaapi all fail →Fatal: Unable to find display or encoder during startup/Video failed to find working encodersrc_linesize … >= bytewidth failed at libavutil/imgutils.c:350(SIGABRT). Client may see ~one frame then a dead session.Misleading outcome: logs clearly show Wayland
Meta-0, successful portal RemoteDesktop Start, and a PipeWire stream, yet the final fatal message blames a missing display/encoder.system_tray = disabledis set here so Qt tray does not take down the process; tray is unrelated to the scale failure.Expected Behavior
libx264, orSteps To Reproduce
Meta-01920×1080.2026.516to hit the laterimgutilsabort.Host Operating System
Linux
Operating System Version
Debian GNU/Linux 13 (trixie), kernel 6.12.95+deb13-amd64
Architecture
amd64/x86_64
Package
Linux -
.deb(LizardByte debian-trixie-amd64 / packaged2026.516.143833and nightly0.0.5368)GPU Type
AMD
GPU Model
AMD CAICOS PRO (Radeon HD 7450) — DRM
radeon, Mesa GalliumGPU Driver/Mesa Version
Mesa 25.0.7-2+deb13u1 (LLVM 19.1.7); libva 1.22 / 2.22.0
Capture Method
XDG Portal (PipeWire)
Apps
(default / Desktop stream; not app-specific)Log output
Portal + PipeWire (common):
Nightly 0.0.5368 (software probe):
2026.516.143833 (after stream start):
VAAPI (expected on this GPU — decode only):
Online logs
No response
Additional Context
av_image_copyon the software path;imgutilsassert matches src_linesize < bytewidth for the assumed format.vainfo, and portal/PipeWire node details if useful.Related