No description
  • Python 96.1%
  • Shell 3.9%
Find a file
2026-03-19 14:35:20 +01:00
src refactor Fan Mode 2026-03-19 14:35:20 +01:00
install.sh instead of copying the executable, create a symlink to user local bin 2026-03-19 14:35:07 +01:00
LICENSE Add MIT License 2026-02-19 00:03:13 +00:00
README.md update readme 2026-03-19 00:28:29 +01:00
screenshot.png Add screenshot 2026-02-19 00:01:07 +00:00
uninstall.sh add uninstall script to remove symlink from user local bin 2026-03-19 14:34:18 +01:00

🧊 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.

Arch Linux CachyOS Ubuntu Fedora Debian

Version

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

  1. Features
  2. ⚠️ Requirements
  3. 📦 Installation
  4. 📦 Dependencies
  5. 🔧 ThinkPad Fan Control Setup
  6. 🎮 Controls
  7. 🛠 Troubleshooting
  8. ⚠️ Known Issues
  9. 🚀 Roadmap
  10. 🛡 Safety
  11. 📜 License

🎯 Why ThinkTemp?

There are other ThinkPad fan control utilities available, but ThinkTemp focuses on:

  • 🧭 Clean, centered terminal UI
  • Instant manual control (07)
  • 🛡 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

Screenshot

Features

  • 🌡 Live CPU temperature display
  • 🌀 Live fan RPM monitoring
  • 🎛 Manual fan levels (07)
  • ❄ 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_acpi with fan_control=1
  • lm-sensors
  • python-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
17 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 0 during 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