Repository navigation
Description
Search existing issues
- I have searched the existing issues
Describe the bug
On a hybrid-GPU Linux laptop (AMD iGPU + NVIDIA dGPU), clicking Export (MP4) aborts the whole app. Only an empty .openscreen-mp4-<pid>-0.partial.mp4 is left in the output folder.
wgpu picks the NVIDIA adapter (PowerPreference::HighPerformance), but that device is opened without the dmabuf export extensions:
[d3d] adaptateur Vulkan : NVIDIA GeForce RTX 3050 Laptop GPU (DiscreteGpu, Vulkan) -> backend Hardware, export dmabuf indisponible
VaapiEncoder::open still succeeds, because it opens the hard-coded /dev/dri/renderD128, which is the AMD iGPU here. So run_multi_inner calls create_exportable_staging, which calls vkGetMemoryFdKHR even though the extension was never loaded. ash panics inside a non-unwinding context and the process aborts:
thread '<unnamed>' panicked at .../ash-0.38.0+1.3.281/src/extensions_generated.rs:12032:29:
Unable to load get_memory_fd_khr
thread '<unnamed>' panicked at .../core/src/panicking.rs:225:5:
panic in a function that cannot unwind
10: <ash::extensions_generated::khr::external_memory_fd::DeviceFn>::load_erased::get_memory_fd_khr
11: <openscreen_compositor::compositor_linux::Compositor>::create_exportable_staging
12: openscreen_compositor::pipeline_linux::run_multi_inner
13: openscreen_compositor::pipeline_linux::run_composited_multi_cancellable
14: napi::async_work::execute::<compositor_view::ExportMultiTask>
thread caused non-unwinding panic. aborting.
The doc comment on create_exportable_staging says it returns None when the device was opened without the external-memory extensions. In practice nothing checks that. The dmabuf_export flag from create_async is only logged and never stored on Gpu.
Expected behavior
Export completes. When the device has no dmabuf export, create_exportable_staging should return None, so the export falls back to the software encoder (libopenh264) instead of crashing.
To Reproduce
- Linux laptop with AMD iGPU (
renderD128) + NVIDIA dGPU (renderD129), proprietary NVIDIA driver, X11. - Record any clip (screen only, no audio).
- Click Export → MP4 → choose a path.
- The app closes immediately.
Workarounds that confirm the diagnosis:
VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.json(wgpu on AMD): export works, log showsexport dmabuf actifandencodeur video : h264_vaapi (materiel, dmabuf).OPENSCREEN_EXPORT_ENCODER=libopenh264skips the VAAPI path.
Suggested fix
Store the flag on Gpu and guard the call. The patch below is against v2.3.0 (still applies to main). I have not compiled it:
--- a/crates/compositor/src/d3d_linux.rs
+++ b/crates/compositor/src/d3d_linux.rs
@@ pub struct Gpu {
pub feature_level: u64,
+ /// True when the device was opened with VK_KHR_external_memory_fd +
+ /// VK_EXT_external_memory_dma_buf.
+ pub dmabuf_export: bool,
}
@@ async fn create_async
backend: got,
feature_level: 0,
+ dmabuf_export,
})
--- a/crates/compositor/src/compositor_linux.rs
+++ b/crates/compositor/src/compositor_linux.rs
@@ pub fn new_sized
feature_level: gpu.feature_level,
+ dmabuf_export: gpu.dmabuf_export,
};
@@ pub fn create_exportable_staging
use ash::vk;
+ // Without the extensions `get_memory_fd` is not loaded: ash panics
+ // ("Unable to load get_memory_fd_khr") and the whole process aborts.
+ if !self.gpu.dmabuf_export {
+ return None;
+ }A more complete fix could also open VAAPI on the render node that belongs to the wgpu adapter (match the PCI vendor/device), instead of hard-coding renderD128.
OS
Linux
OS Version
Debian 13 (kernel 6.12), X11, OpenScreen 2.3.0 AppImage
Device Type
Laptop: AMD Radeon (Renoir/Barcelo, RADV) + NVIDIA GeForce RTX 3050 Laptop GPU (proprietary driver)
Activity
fix(compositor): return None from create_exportable_staging without d…
test(compositor): skip the dmabuf round-trip on buffer capability, no…
test(compositor): skip the dmabuf round-trip on buffer capability, no…
github-actions commentedon Nov 19, 2026
Fixed by #1624 and merged into
main.This change is assigned to the
Next Releaserelease milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked asstatus: pending releaseuntil a packaged release containing it is published.fix(compositor): return None from create_exportable_staging without d…