Linux fan control for the Gigabyte G5 GE.
This tool controls the laptop fans through the embedded controller IO ports. The EC command sequence was reverse engineered from the Windows fan-control software because there was no native Linux control path for this model.
- Tested target: Gigabyte G5 GE
- NVIDIA GPU temperature is read through
nvidia-smi - Fan control uses
outb, provided by theioportpackage on Debian/Ubuntu
This is hardware-specific low-level control. Use it only on compatible machines and keep an eye on temperatures after installing or changing the curve.
sudo apt install ioport
sudo ./install.shThe installer copies the daemon and CLI to /usr/local/bin, installs the systemd service, creates /etc/g5ge-fan/config.json if missing, and starts g5ge-fancontrol.
fancli status
fancli watch
sudo fancli set 70
sudo fancli auto
fancli curve
sudo fancli max
sudo fancli max-stopset writes a temporary manual override under /run/g5ge-fan. auto clears the override and returns to the configured fan curve. max stops the daemon and keeps the fan at full speed until max-stop restarts automatic control.
The different modes are built janky af and vibecoded, but they work. I might clean this up later, and I am very open to PRs.
Default config path:
/etc/g5ge-fan/config.json
Automatic mode with the default curve:
{"mode": "auto"}Custom curve:
{
"mode": "auto",
"curve": [[0, 10], [50, 30], [65, 60], [75, 80], [85, 100]]
}Manual config:
{"mode": "manual", "speed": 60}Restart the service after changing persistent config:
sudo systemctl restart g5ge-fancontrolpytest -q