You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linux/Wayland: recording aborts on a single corrupted PipeWire frame (KDE Plasma 6 / AMD) #1946
Task wayland-pipewire-capture-thread failed: PipeWire screen capture frame was marked corrupted
It seems to come from the capture loop returning an error whenever a frame has PipeWire's SPA_CHUNK_FLAG_CORRUPTED flag set, which then ends the whole recording:
if chunk_flags.contains(spa::buffer::ChunkFlags::CORRUPTED){bail!("PipeWire screen capture frame was marked corrupted");}
As far as I can tell KWin sets this flag occasionally on a single frame, so it looks transient rather than a stream-wide problem. In my log, capture ran for around 8s and 312 frames, then stopped on one corrupted frame:
INFO ...:{task="wayland-pipewire-capture-thread"}: cap_recording::sources::screen_capture::linux: Linux Wayland PipeWire capture stopped sent=312 dropped=0 elapsed_ms=7966
INFO recording: cap_desktop_lib::recording: recording wait actor done: Err(PipelineDoneError(Task wayland-pipewire-capture-thread failed: PipeWire screen capture frame was marked corrupted))
I might be missing context, but I wondered whether the frame could be skipped rather than ending the recording. OBS's PipeWire capture does something similar: on the same flag it logs and skips the frame instead of tearing down the stream.
Looking at the code in crates/recording/src/sources/screen_capture/linux.rs, the fix here should be straightforward. The frame_from_pipewire_data function at line 635 currently bails on corrupted frames, and that error bubbles up through process_pipewire_frame to set_fatal_error, which terminates the recording.
The codebase already has a pattern for handling skipped frames - the dropped counter at line 486 tracks frames dropped due to pipeline stalls (StalledAndDropped). A corrupted frame could follow the same path: return Ok(None) from frame_from_pipewire_data instead of bailing, optionally log a warning, and increment the dropped counter.
Something like:
if chunk_flags.contains(spa::buffer::ChunkFlags::CORRUPTED){
tracing::warn!("PipeWire frame marked corrupted, skipping");returnOk(None);}
This would require changing the return type of frame_from_pipewire_data from anyhow::Result<ffmpeg::frame::Video> to anyhow::Result<Option<ffmpeg::frame::Video>> and updating process_pipewire_frame to handle the None case (just return Ok(None) to skip sending that frame).
The OBS approach you linked is the right model here - transient compositor hiccups shouldn't tear down an otherwise healthy capture session.
Related context: Linux desktop support landed recently in #1923, so the Wayland/PipeWire path is still relatively fresh. This would be a good hardening fix for KDE/KWin users.
This looks fixed on main: frame_from_pipewire_data in crates/recording/src/sources/screen_capture/linux.rs now logs a warning and skips a frame marked SPA_CHUNK_FLAG_CORRUPTED instead of ending the recording, which is the OBS behaviour suggested above. Probably safe to close once someone on KDE confirms.
This was fixed in 0.5.3. A frame marked corrupted is now skipped instead of ending the recording. Closing, but reopen if you still see it on the latest version.
Activity
linear commentedon Jun 27, 2026
CAP-739
tembo commentedon Jun 27, 2026
Looking at the code in
crates/recording/src/sources/screen_capture/linux.rs, the fix here should be straightforward. Theframe_from_pipewire_datafunction at line 635 currently bails on corrupted frames, and that error bubbles up throughprocess_pipewire_frametoset_fatal_error, which terminates the recording.The codebase already has a pattern for handling skipped frames - the
droppedcounter at line 486 tracks frames dropped due to pipeline stalls (StalledAndDropped). A corrupted frame could follow the same path: returnOk(None)fromframe_from_pipewire_datainstead of bailing, optionally log a warning, and increment the dropped counter.Something like:
This would require changing the return type of
frame_from_pipewire_datafromanyhow::Result<ffmpeg::frame::Video>toanyhow::Result<Option<ffmpeg::frame::Video>>and updatingprocess_pipewire_frameto handle theNonecase (just returnOk(None)to skip sending that frame).The OBS approach you linked is the right model here - transient compositor hiccups shouldn't tear down an otherwise healthy capture session.
Related context: Linux desktop support landed recently in #1923, so the Wayland/PipeWire path is still relatively fresh. This would be a good hardening fix for KDE/KWin users.
Aristides-19 commentedon Jun 28, 2026
Same issue here. I literally did the same thing as you (cachyos extracting .deb).
Theophilus2003 commentedon Oct 26, 2026
This looks fixed on main:
frame_from_pipewire_dataincrates/recording/src/sources/screen_capture/linux.rsnow logs a warning and skips a frame markedSPA_CHUNK_FLAG_CORRUPTEDinstead of ending the recording, which is the OBS behaviour suggested above. Probably safe to close once someone on KDE confirms.richiemcilroy commentedon Nov 4, 2026
This was fixed in 0.5.3. A frame marked corrupted is now skipped instead of ending the recording. Closing, but reopen if you still see it on the latest version.