README.md
a1d
Light-weight fan and power controller for the Argon ONE V3 for Raspberry Pi 5.
This does what the OEM one does:
- Monitors system thermals and adjusts the fan speed accordingly.
- Responds to a double-press of the power button by rebooting the system.
- Responds to a 3-5s press of the power button by initiating clean shutdown.
- Ensures that any clean shutdown instructs the case to remove power correctly.
motivation
The OEM software is a bit garbo. DarkElvenAngel’s
argononed is thousands of lines
of C. This is less than 200 lines of Rust.
usage
Add the flake to your own (or otherwise fetch it!):
inputs.a1d.url = "git+https://nossa.ee/~talya/a1d";
Add the NixOS module:
nixpkgs.lib.nixosSystem {
# ...
modules = [
# ...
a1d.nixosModules.${system}.default
];
}
Enable it in your config!
services.a1d.enable = true;
Done. Temperature zones aren’t configurable at the moment. Note that this enables Polkit to grant reboot/poweroff permissions.
nix is scary
Sowwy. You can cargo build --release and get target/release/a1d
running somehow. Here’s an a1d.service for you:
[Unit]
Description=a1d Argon ONE V3 fan/power daemon
[Service]
ExecStart=/path/to/a1d
DynamicUser=true
ReadWritePaths=/dev/i2c-1
ReadWritePaths=/dev/gpiochip0
Restart=on-failure
RestartSec=10s
SupplementaryGroups=i2c
SupplementaryGroups=gpio
[Install]
WantedBy=multi-user.target
And a 99-a1d.rules for /etc/polkit-1/rules.d or
/usr/share/polkit-1/rules.d:
polkit.addRule(function(action, subject) {
if (subject.user !== "a1d")
return;
if (action.id === "org.freedesktop.login1.power-off" ||
action.id === "org.freedesktop.login1.power-off-multiple-sessions" ||
action.id === "org.freedesktop.login1.power-off-ignore-inhibit" ||
action.id === "org.freedesktop.login1.reboot" ||
action.id === "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id === "org.freedesktop.login1.reboot-ignore-inhibit") {
return polkit.Result.YES;
}
});
You’ll also want to symlink the a1d binary into your systemd-shutdown
directory, perhaps /usr/lib/systemd/system-shutdown.
todo
- Expose used temperature/fan speed on prometheus.
license
Copyright © 2025 Asherah Connor <ashe@kivikakk.ee>
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the COPYING file for more details.