- Python 96.1%
- Shell 3.9%
| src | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
| screenshot.png | ||
| uninstall.sh | ||
🧊 Better ThinkTemp
A clean, production-grade ThinkPad fan controller TUI for Linux. This project is a hard fork of the ThinkTemp project by Aextor84.
ThinkTemp provides live temperature monitoring and manual fan control directly from your terminal — safely, cleanly, and with kernel-level safeguards.
Install Specific Version
git clone https://gitlab.blackruby.hu/blackruby/thinktemp.git cd ThinkTemp git checkout v1.2.0
🧊 ThinkTemp
Terminal fan controller & temperature monitor for ThinkPad laptops on Linux
A clean, production-grade ThinkPad fan controller TUI with live temperature monitoring and manual fan control — built for clarity, safety, and performance.
📌 Table of Contents
- ✨ Features
- ⚠️ Requirements
- 📦 Installation
- 📦 Dependencies
- 🔧 ThinkPad Fan Control Setup
- 🎮 Controls
- 🛠 Troubleshooting
- ⚠️ Known Issues
- 🚀 Roadmap
- 🛡 Safety
- 📜 License
🎯 Why ThinkTemp?
There are other ThinkPad fan control utilities available, but ThinkTemp focuses on:
- 🧭 Clean, centered terminal UI
- ⚡ Instant manual control (0–7)
- 🛡 Built-in safety fallbacks
- 🔥 Overheat protection
- 🎛 Simple preset modes (Silent / Balanced / Performance)
- 📦 Easy installation as a system utility
ThinkTemp aims to feel lightweight, modern, and production-ready — not experimental.
🏷 Project Overview
ThinkTemp directly interfaces with the Linux thinkpad_acpi kernel module to provide safe, manual fan control on supported ThinkPad hardware.
It is designed for users who:
- Want precise thermal control
- Prefer terminal-based tools
- Need a lightweight alternative to background daemons
- Value safety mechanisms while overriding automatic fan curves
✨ Features
- 🌡 Live CPU temperature display
- 🌀 Live fan RPM monitoring
- 🎛 Manual fan levels (0–7)
- ❄ Fan OFF mode
- 🤖 Auto mode
- 🔇 Silent / ⚖ Balanced / 🚀 Performance presets
- 🔥 Overheat auto-fallback protection
- 🛡 Kernel watchdog safety
- 🧭 Clean centered TUI layout
- 📦 Installable system utility
⚠️ Requirements
- ThinkPad laptop
- Linux
thinkpad_acpiwithfan_control=1lm-sensorspython-rich- Root privileges
📦 Installation
Clone the repository:
git clone https://gitlab.blackruby.hu/blackruby/thinktemp.git
cd ThinkTemp
Run installer:
./install.sh
Launch:
sudo thinktemp
📦 Dependencies
🐍 Python
- Python 3.10+
Check your version:
python3 --version
🎨 python-rich
Used for rendering the terminal UI.
Arch / CachyOS
sudo pacman -S python-rich
Debian / Ubuntu
sudo apt install python3-rich
Fedora
sudo dnf install python3-rich
Or via pip:
pip install rich
🌡 lm-sensors
Required for CPU temperature monitoring.
Arch
sudo pacman -S lm_sensors
Debian / Ubuntu
sudo apt install lm-sensors
Fedora
sudo dnf install lm_sensors
Detect sensors:
sudo sensors-detect
sensors
🔧 ThinkPad Fan Control (Required for Manual Mode)
ThinkTemp depends on the thinkpad_acpi kernel module with manual fan control enabled.
Check support:
cat /proc/acpi/ibm/fan
You must see:
commands: level <0-7, auto, disengaged, full-speed>
🧪 Enable Temporarily (Until Reboot)
sudo modprobe -r thinkpad_acpi
sudo modprobe thinkpad_acpi fan_control=1
Verify:
cat /proc/acpi/ibm/fan
Expected output:
status: enabled
💾 Enable Permanently (Fedora)
Create the configuration file:
sudo nano /etc/modprobe.d/thinkpad_acpi.conf
Add:
options thinkpad_acpi fan_control=1
Rebuild initramfs (Fedora uses dracut):
sudo dracut --force
Reboot:
sudo reboot
After reboot:
cat /proc/acpi/ibm/fan
You should see:
status: enabled
🔐 Root Privileges
ThinkTemp must be run with elevated privileges:
sudo thinktemp
This is required because it writes to:
/proc/acpi/ibm/fan
🎮 Controls
| Key | Action |
|---|---|
| 0 | Fan OFF |
| 1–7 | Manual fan levels |
| a | Auto mode |
| s | Silent preset |
| b | Balanced preset |
| p | Performance preset |
| q | Quit & restore auto |
🛠 Troubleshooting
ThinkTemp does not start
Run with root:
sudo thinktemp
Verify shebang:
head -1 /usr/local/bin/thinktemp
Must be:
#!/usr/bin/env python3
Reinstall if needed:
./install.sh
Manual fan control not available
cat /proc/acpi/ibm/fan
If missing commands:
sudo modprobe -r thinkpad_acpi
sudo modprobe thinkpad_acpi fan_control=1
Temperatures not showing
Ensure sensors works:
sensors
If empty, run:
sudo sensors-detect
Command not found: thinktemp
Check installation:
ls /usr/local/bin/thinktemp
Reinstall if missing:
./install.sh
⚠️ Known Issues
- Requires root privileges
- Only compatible with ThinkPad systems supporting
thinkpad_acpi - Some terminals may flicker in alternate screen mode
- RPM may briefly show
0during transitions - No non-ThinkPad support (yet)
🚀 Roadmap
v1.1
- Config file support (
~/.config/thinktemp/) - Custom temperature threshold flag
- Version display in header
- Improved dependency detection
- Optional daemon mode
- Temperature history graph
- Improved terminal resize handling
Future Ideas
- Universal Linux fan backend
- Profile saving
- AUR package
- systemd service mode
- JSON metrics export
- Lightweight monitor mode
🛡 Safety
ThinkTemp includes:
- Temperature fallback (default 90°C)
- Kernel watchdog timeout
- Automatic restore on exit or crash
Manual fan control overrides automatic thermal management. Use responsibly.
📜 License
MIT License