A GPU manager for Linux using eBPF LSM hooks to block GPUs
Creator and Main maintainer: @luytan
- This project is in early development. Expect bugs and incomplete functionality
Head to the docs to see how to install and use Cardwire on your system
Cardwire uses eBPF with LSM hooks to intercept file operations on GPU device nodes, such as /dev/dri/renderDX, /dev/dri/cardX, sysfs config, nvidiaX and other GPU-related files.
When a GPU is "blocked," the eBPF program returns -ENOENT for any syscall targeting that device, effectively hiding it from apps. This provides several key benefits:
- Instant App Startup: Prevents applications (like Electron apps or GTK apps) from attempting to initialize the GPU, this eliminates the 3–4 second "hang" typically caused by waiting for a sleeping GPU to power up
- Power Efficiency: By blocking access at the syscall level, the GPU is never woken from its lowest power state (D3cold), extending battery life on laptops
- Non-Invasive: Unlike traditional methods that might require driver unloading, risky unbind or complex Wayland setups, this approach is transparent to the rest of the system and easy to toggle
Note: X11 is not supported. Cardwire requires Wayland.
for issues related to these projects, please report to their respective repo
GNOME extension (by Moxuz): https://extensions.gnome.org/extension/9919/cardwire-gpu-toggle/
Need help or have a question about Cardwire? Join us on the OGC Discord: https://discord.gg/4K2pZ6abQm
- Huge thanks to the asus-linux community for their guidance and for suggesting the eBPF approach.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.