My old Lenovo Thinkpad X1 Carbon recently received a fresh Ubuntu install, but the fan was annoying me. It kept starting under low usage for some seconds, stopped and started a few minutes later. The system did not feel hot and checking the temperature it reveiled the CPU was only at 45°C when the fan started. I figured thinkfan can be used to fix this behavior.
apt install thinkfan vim /etc/thinkfan.conf # remove tp_fan and tp_thermal comment block at near end of file echo "options thinkpad_acpi experimental=1 fan_control=1" >> /etc/modprobe.d/thinkpad_acpi.conf rmmod thinkpad_acpi modprobe thinkpad_acpi service thinkfan restart (or manually thinkfan -n -c /etc/thinkfan.conf)
(In debian the configuration was a different yaml file that wasnt as easy as the above steps)