libdrmtap-sys
Raw FFI bindings for libdrmtap — a C library for capturing Linux screen framebuffers via DRM/KMS.
What is libdrmtap?
libdrmtap captures screen contents at the kernel level using DRM/KMS APIs. Unlike PipeWire/portal-based capture, it works:
- At the login screen (GDM, SDDM, LightDM)
- Without user interaction (no "Select screen to share" prompt)
- On Wayland (bypasses the compositor security model)
- Headless (no display server needed)
⚠️ Testing Status
Verified working:
virtio_gpu(QEMU/Parallels VMs), Intel Meteor Lake (i915, dual 3840x2160, EGL CCS detiling of the tiled/compressed framebuffer), and NVIDIA Jetson Orin Nano (nvidia-drm, Wayland).The AMD (
amdgpu) backend is implemented but not yet validated on real hardware.If you test AMD or other configurations, please report results via GitHub Issues.
Requirements
- Linux with DRM/KMS support (kernel 4.20+ for the tiled/modifier framebuffer path, i.e. Ubuntu 20.04+; linear/VM framebuffers work on older kernels)
- A C compiler — the embedded C sources are compiled statically at build time.
There is no system
libdrmtapinstall,meson install, orpkg-configlookup of a shared library. libdrmdevelopment headers (located viapkg-config), plus EGL, OpenGL ES 2, libseccomp, and libcap (and their-devheaders) — the crate links these.
Usage
This is a -sys crate with raw FFI bindings. For a safe wrapper, use libdrmtap.
use *;
use ptr;
unsafe
License
MIT