A GPU manager for Linux using eBPF LSM hooks to block GPUs
Creator and Main maintainer: @luytan
Head to the docs to see how to install Cardwire on your system
The cardwire CLI lets you manage GPU states and system modes
Note: Integrated/Hybrid modes only work on host with two GPUs
Note 2: Manual mode is not implemented
# Set system mode
cardwire set integrated / hybrid / manual
# Get current mode status
cardwire get
# List all detected GPUs and their status
cardwire list
# Manually block/unblock a specific GPU by ID
cardwire gpu 1 --block
cardwire gpu 1 --unblock
The daemon reads its configuration from /etc/cardwire/cardwire.toml.
# /etc/cardwire/cardwire.toml
auto_apply_gpu_state = true
experimental_nvidia_block = false
battery_auto_switch = false
experimental_nvidia_block is an experimental feature that blocks specifics NVIDIA's files, must be used with caution
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/
Cardwire-tray (by SeawolfTony): https://github.com/JuanDelPueblo/cardwire-tray
Cardwire uses eBPF with LSM hooks to intercept file operations on GPU device nodes, such as /dev/dri/renderDX, /dev/dri/cardX, sysfs config and nvidiaX
When a GPU is "blocked," the eBPF program returns -ENOENT for any syscall targeting that device. This provides several key benefits:
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
$ claude mcp add cardwire \
-- python -m otcore.mcp_server <graph>