Skip to content

realvolk/CAGT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

╔══════════════════════════════════════╗
║ CAGT — AMD GPU Fan Control ║
╚══════════════════════════════════════╝

CAGT

A single-file, TUI AMD GPU fan controller for Linux
Just you and your GPU cooled properly.

Version C ncurses License


What is CAGT?

CAGT is a single C file, TUI-based fan controller for AMD GPUs on Linux.

It reads your GPU temperature directly from hwmon, runs it through a fan curve, and writes the correct PWM value, all from a clean, interactive terminal interface.


Quick Start

gcc -O2 -o cagt cagt.c -lncurses
chmod +x cagt
sudo ./cagt

Controls

Key Action
M Toggle Manual / Auto mode
T Cycle temperature unit (°C → °F → K)
+ / - Adjust fan by ±5% (enters Manual)
↑ / ↓ Adjust fan by ±1% (enters Manual)
0 – 9 Set fan to 0% – 90% instantly
Q Quit (restores auto fan control)

All manual adjustments auto-switch you into Manual mode.

Press M to go back to the curve.


Features

  • Clean ncurses TUI — color-coded temps, fan curve visualization
  • Auto fan curve — 7-point temperature-to-speed mapping
  • Manual override — granular 1% or 5% steps, plus instant presets
  • Temperature units — Celsius, Fahrenheit, or Kelvin (yes, really)
  • 25+ GPU detection — Polaris, Vega, Navi, RDNA3, and older GCN
  • Single file — no headers, no build system, no dependencies beyond ncurses
  • Safe exit — SIGINT, SIGTERM, or Q restores automatic fan control

Default Fan Curve

Temp (°C) Fan Speed
20 0%
35 20%
50 30%
60 45%
70 60%
80 75%
90 90%
100 100%

Temperatures between these points are linearly interpolated (Example: at 42°C the fan runs at ~25%, not a flat 20% or 30%.)

The curve is hardcoded in fan_curve(). Edit the points array and recompile to customize.

Supported GPUs

Generation Models
Polaris RX 560, RX 570, RX 580 (including 2048SP)
Vega RX Vega 56, Vega 64, Radeon VII
Navi 10 RX 5600 XT, RX 5700, RX 5700 XT
Navi 20 RX 6700 XT, RX 6800, RX 6800 XT, RX 6900 XT
Navi 30 (RDNA3) RX 7600, RX 7700 XT, RX 7800 XT, RX 7900 XT, RX 7900 XTX
Older GCN HD 7950, HD 7970, R9 290/390, R9 Fury

Unknown AMD GPUs still work, they just show their PCI device ID.


Dependencies

CAGT requires only ncurses for its TUI.

# Artix / Arch
sudo pacman -S ncurses

# Debian / Ubuntu
sudo apt install libncurses-dev

# Fedora
sudo dnf install ncurses-devel

# Void
sudo xbps-install ncurses-devel

Project Structure

CAGT/
├── cagt.c           # the entire program
├── LICENSE         # Volk Open License 1.0
└── README.md       # this file

Why CAGT Exists

CAGT is a small personal project.

It's a single static binary that runs in your terminal, updates at 10Hz, and exits cleanly, restoring your GPU to automatic control every time.

Do one thing and do it well.


Contributing

Contributions welcome.

Keep it simple. CAGT is intentionally a single-file tool with no external dependencies beyond ncurses.

Please read CONTRIBUTING.md for guidelines.


License

Licensed under the Volk Open License 1.0 © realvolk 2026.

Releases

No releases published

Packages

 
 
 

Contributors

Languages