A small Linux watchdog for the 12VHPWR / 12V-2x6 GPU power connector. It reads the per-pin current from the on-board monitoring chip and, if any pin goes over a set limit (default 9.2 A), writes a trip log and powers the machine off.
- A GPU that exposes per-pin data over I2C. In practice this means an ASUS ROG Astral RTX 5090 / 5080 (or ROG Matrix 4090), which carries an ITE IT8915FN chip. Regular 40/50-series cards tie all 12V pins together internally and have no per-pin sensor — nothing can read it, on any OS.
- NVIDIA driver installed and the
i2c-devkernel module loaded. - Python 3 (standard library only — no pip packages).
- Root (for I2C access and to power off).
sudo ./vhpwr-guard.py --debug # probe every NVIDIA bus, dump raw + decoded
sudo ./vhpwr-guard.py --status # one decoded reading--status should print six pins at ~12 V. If it can't find the chip, run
--debug to see which bus/method works. On the reference machine the chip is on
i2c-3 and answers only to smbus byte reads, hence --bus 3 --method smbus.
--dry-run never powers off; it only logs what it would do. Set the threshold
below idle current (~0.3 A) to force a trip:
sudo ./vhpwr-guard.py --dry-run --threshold 0.2 --trip-samples 3You should see a CRITICAL OVERCURRENT TRIP line and a log at
/var/log/vhpwr-guard-trip-<timestamp>.log. Ctrl-C to stop.
# 1. script
sudo cp vhpwr-guard.py /usr/local/bin/vhpwr-guard.py
sudo chmod +x /usr/local/bin/vhpwr-guard.py
# 2. load i2c-dev at boot
echo i2c-dev | sudo tee /etc/modules-load.d/i2c-dev.conf
# 3. service (edit --bus/--method in the file if yours differ)
sudo cp vhpwr-guard.service /etc/systemd/system/vhpwr-guard.service
# 4. enable + start
sudo systemctl daemon-reload
sudo systemctl enable --now vhpwr-guard.service
systemctl status vhpwr-guardLook for active (running) and a line like
vhpwr-guard v2 started on i2c-3 @ 0x2b (mode=smbus).
journalctl -u vhpwr-guard -f # live log (warnings, trips)
sudo systemctl restart vhpwr-guard # after editing the unit
sudo systemctl stop vhpwr-guard # stop this session
sudo systemctl disable vhpwr-guard # stop starting at boot--bus N I2C bus (default: autodetect NVIDIA bus)
--method smbus|rdwr force read method (Astral needs smbus)
--addr 0xNN chip address (default 0x2b)
--threshold A per-pin trip current (default 9.2)
--warn A per-pin warning current, logged only (default 8.5)
--interval S seconds between polls (default 0.5)
--trip-samples N consecutive over-limit samples needed to trip (default 3)
--dry-run never power off; log only
--status print one reading and exit
--list list NVIDIA I2C buses
--debug probe every NVIDIA bus and dump raw + decoded data
- Readings are sanity-checked (a pin must show a real ~12 V rail and < 25 A), so a corrupted I2C read can't cause a shutdown. A trip also requires several consecutive over-limit samples, not a single spike.