Installation
Arch/CachyOS/Arch-based
The official Open Gaming Collective Arch packages are available here: ogc-arch-packaging
Alternatively, using the AUR:
yay -S cardwire
And start the service:
sudo systemctl enable cardwired --now
Nix
Using nixpkgs-unstable (recommended)
services.cardwired = {
enable = true;
settings = {
auto_apply_gpu_state = true;
experimental_nvidia_block = true;
battery_auto_switch = true;
battery_auto_switch_mode = "hybrid";
external_display_auto_switch = false;
};
}
Using the repo’s flake (This will be dropped when cardwire hits nixpkgs-26.11):
flake.nix:
cardwire = {
url = "github:opengamingcollective/cardwire";
inputs.nixpkgs.follows = "nixpkgs";
};
configuration.nix:
imports = [ inputs.cardwire.nixosModules.default ];
services.cardwire = {
enable = true;
settings = {
auto_apply_gpu_state = true;
experimental_nvidia_block = true;
battery_auto_switch = true;
battery_auto_switch_mode = "hybrid";
external_display_auto_switch = false;
};
};
Fedora/Fedora-based
Cardwire is officially distributed through Terra on Fedora systems
To install Terra, follow the instructions here: https://docs.terrapkg.com/usage/installing
Using Terra
sudo dnf install cardwire
And start the service:
sudo systemctl enable cardwired --now
Bazzite
Cardwire is installed out-of-the-box
Atomic Fedora-based
Cardwire is officially distributed through Terra on Fedora systems
To install Terra, follow the instructions here: https://docs.terrapkg.com/usage/installing
Using Terra
sudo rpm-ostree install cardwire
And start the service:
sudo systemctl enable cardwired --now
Note
Thanks to the Fyra Labs / Terra team for packaging and maintaining Cardwire on Fedora !!
AerynOS
Cardwire is available in the official AerynOS repositories.
sudo moss install cardwire
And start the service:
sudo systemctl enable cardwired --now
Ubuntu / Debian
A .deb package is available on the releases page. You can download and install it using apt.
sudo apt install ./cardwire_*.deb
sudo systemctl enable cardwired --now
Build from source (Alternative)
Install build dependencies:
sudo apt install libbpf-dev libudev-dev pkg-config libegl1-mesa-dev libvulkan-dev libglvnd-dev libwayland-dev libxkbcommon-dev libx11-dev libxcb1-dev libx11-xcb-dev
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install bpf-linker
cargo binstall bpf-linker
Then clone and build:
git clone https://github.com/OpenGamingCollective/cardwire.git
make build
sudo make install
And start the service:
sudo systemctl enable cardwired --now
Other distros
For now, other distros must clone the repo and use make to build and install Cardwire. You will also need to enable BPF LSM manually, see the Enabling BPF LSM (with GRUB) section above.
Build dependencies:
- cargo (plus
bpf-linkerand a pinned nightly toolchain for the eBPF program) - libudev-dev
- pkg-config
- Vulkan, EGL, Wayland and X11 development packages (GUI build)
git clone https://github.com/OpenGamingCollective/cardwire.git
make build
sudo make install
And start the service:
sudo systemctl enable cardwired --now