All the steps for setting up thinkfan
on thinkpad x1 yoga gen 7:
-
install sensors (likely)
-
install thinkfan
-
create config file for driver (or whatever it is):
echo options thinkpad_acpi fan_control=1 experimental=1 > /etc/modprobe.d/thinkfan.conf
Note: having experimental=1
may be important or not (it is related to yoga having two fans instead of one).
- load the module:
modprobe thinkpad_acpi
- create config file
/etc/thinkfan.conf
for controlling the fan. Mine contains the following:
######################################################################
## thinkfan 0.9 example config file
## ================================
##
## ATTENTION: There is only very basic sanity checking on the configuration.
## That means you can set your temperature limits as insane as you like. You
## can do anything stupid, e.g. turn off your fan when your CPU reaches 70°C.
##
## That's why this program is called thinkfan: You gotta think for yourself.
##
#######################################################################
##
## This file shows how to use sensor-specific temperature limits.
## First of all, you need to specify temperature inputs. On a Thinkpad, you can
## just use:
##
tp_thermal /proc/acpi/ibm/thermal # provides 8 temperature inputs
#
## Next we specify the fan we want to use. On a Thinkpad, this is:
#
tp_fan /proc/acpi/ibm/fan
#
## Then you need to specify the temperature limits for each of the sensors.
## A dot means that the corresponding sensor should be ignored. The length of the
## UPPER and LOWER limits must be the same as the number of temperatures. In this
## example, /proc/acpi/ibm/thermal contains 8 sensors, some of which are unused (hence the dots).
#
{ "level 0" # the fan level
# ^-------^ This works for /proc/acpi/ibm/thermal.
#
# Sensor count:
# 1 2 3 4 5 6 7 8
# ======================
(0 0 0 0 0 0 0 0) # LOWER limit
(53 . . . . . . .) # UPPER limit
}
{ "level 1"
(48 . . . . . . .)
(60 . . . . . . .)
}
{ "level 2"
(55 . . . . . . .)
(65 . . . . . . .)
}
{ "level auto"
(60 . . . . . . .)
(99 . . . . . . .)
}
Note: if your goal is to postpone the fun from kicking in too early, you might get away with a simpler two-level separation: level 0 and level auto.
-
you can test if it works by running
thinkfan -n
-
add thinkfan service to autostart:
sudo systemctl enable thinkfan
- restart, and check if it started on boot by running:
sudo systemctl status thinkfan
#thinkpad #fan-control