Normally, you don’t need to manually control your fan’s speed as the hardware already do the job. Though somehow it doesn’t work as you expect. Like in my case, the temperature is too high while the fan doesn’t spin at all. Enough of me talking, let’s do this.
Warning (Warning)
This tutorial is solely for thinkpad, hence the title. Don’t point your finger at me if things go south.
Install thinkfan
For Arch and Arch-based distros:
First, you need to install yay:
$ git clone https://aur.archlinux.org/yay.git$ cd yay$ makepkg -siThen simply install thinkfan on AUR with yay:
yay thinkfanOther debian-based distros:
sudo apt-get -y install tp-smapi-dkms thinkfan lm-sensors read-edid i2c-toolsOr you can build it yourself:
git clone https://github.com/vmatare/thinkfan.git
cd thinkfan
mkdir build && cd build
ccmake ..
make
sudo make installCheck your fan
cat /proc/acpi/ibm/fanIt should show your level is on auto:
status: enabledspeed: 0level: autocommands: level <level> (<level> is 0-7, auto, disengaged, full-speed)commands: enable, disablecommands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))Find your sensor location:
find /sys/devices -type f -name "temp*_input"Take note of the output. This will be your hwmon location for thinkfan configuration file.
Configure
Now you can edit your thinkfan.conf using your preferred text editor:
sudo vim /etc/thinkfan.confBelow is my setting. Put your hwmon location accordingly:
tp_fan /proc/acpi/ibm/fanhwmon /sys/devices/virtual/thermal/thermal_zone0/temphwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input(0, 0, 47)(1, 45, 49)(2, 47, 52)(3, 50, 57)(4, 55, 62)(5, 60, 77)(7, 73, 93)(127, 85, 32767)Configure thinkpad_acpi modprobe:
sudo echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkfan.confsudo modprobe -rv thinkpad_acpisudo modprobe -v thinkpad_acpiNote (Info)
If you encounter modprobe: FATAL: "Module thinkpad_acpi is in use” then just reboot your machine.
Now let’s start your thinkfan:
sudo thinkfan -qThen try checking your fan again:
cat /proc/acpi/ibm/fanYour level should be other than auto:
status: disabledspeed: 0level: 0commands: level <level> (<level> is 0-7, auto, disengaged, full-speed)commands: enable, disablecommands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds))