Adaptive fan controller for ThinkPad laptops. Automatically switches between quiet and gaming fan curves based on CPU load — no manual intervention needed.
Built on top of thinkfan. Designed for ThinkPads with thinkpad_acpi fan control. Tested on the T580 but should work on any ThinkPad that thinkfan supports.
tp-fanctl monitors CPU utilization by reading /proc/stat every 3 seconds. When sustained load is detected, it switches thinkfan to an aggressive cooling profile. When load drops, it switches back to a quiet profile.
Hysteresis prevents thrashing:
- Gaming mode engages after 12 seconds of sustained >55% CPU
- Quiet mode re-engages after 30 seconds of sustained <25% CPU
- Counter decay (not hard reset) absorbs transient spikes and dips
The asymmetry is deliberate — ramp up fast to protect thermals, ramp down slow to survive loading screens.
On shutdown, BIOS auto fan control is restored.
| File | Purpose |
|---|---|
tp-fanctl |
Adaptive fan daemon (Python 3, zero deps) |
tp-fanctl-tray |
System tray applet (GTK3 + AppIndicator3) |
tp-fanctl-gaming |
Manual switch to gaming profile |
tp-fanctl-quiet |
Manual switch to quiet profile |
The tray applet shows a purple Q in quiet mode and a blue G in gaming mode. Right-click for manual override.
- A ThinkPad with
thinkpad_acpikernel module thinkfaninstalled and working- Python 3.10+
python3-gobject+libappindicator-gtk3(for tray applet only)
git clone <this-repo>
cd tp-fanctl
sudo ./install.sh
sudo reboot # required for fan_control=1 to take effectThe installer:
- Copies binaries to
/usr/local/bin/ - Installs fan curve configs to
/etc/ - Enables
thinkpad_acpi fan_control=1via modprobe - Configures thinkfan to use the active profile
- Installs and enables the systemd service
- Sets up tray applet autostart
Layer thinkfan first:
rpm-ostree install thinkfan
sudo rebootThen run the installer as normal. All files go to /usr/local/ and /etc/, which persist across updates.
Edit /etc/thinkfan.yaml (quiet) and /etc/thinkfan-gaming.yaml (gaming) to adjust temperature thresholds and fan levels.
You may need to adjust the coretemp sensor indices to match your CPU core count. Find your sensors:
find /sys/class/hwmon -name name -exec sh -c 'echo "$(cat {}): $(dirname {})"' \;
sensorssudo ./uninstall.shMIT