T490 Fan Speed Configuration With Thinkfan
@ rushi | Tuesday, May 24, 2022 | 2 minutes read | Update at Tuesday, May 24, 2022

I love Thinkpads. They are robust and durable. And no need to mention about their world class keyboards!

It works like a charm, but we need to configure it a bit for silence. Let’s start!

1. Install the necessary package

sudo apt install thinkfan

2. Create the configuration file

After installing the package we need to create a config file in the following directory: /etc/thinkfan.conf

This file requires three main items:

  • The fan information
  • The temperature information
  • Speed level for temperature levels

In order to provide fan information, we write this line:

tp_fan /proc/acpi/ibm/fan

For the temperature information we should scan the sensors of the device.

find /sys/devices -type f -name 'temp*_input'

Enter fullscreen mode Exit fullscreen mode

Running this comman should give you something like this but without hwmon keyword. Don’t forget to add it in front of each line.

hwmon /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp6_input
hwmon /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp3_input
hwmon /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp7_input
hwmon /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp4_input
hwmon /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp1_input
hwmon /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4/temp5_input
hwmon /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon3/temp1_input
hwmon /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon3/temp2_input
hwmon /sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/hwmon/hwmon2/temp3_input
hwmon /sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/hwmon/hwmon2/temp2_input
hwmon /sys/devices/pci0000:00/0000:00:08.1/0000:06:00.0/hwmon/hwmon8/temp1_input
hwmon /sys/devices/virtual/thermal/thermal_zone0/hwmon5/temp1_input

Enter fullscreen mode Exit fullscreen mode

After adding these lines to the configuration, we need to add our fan speed data for each temperature level. This is a sane configuration for daily usage but use at your own risk.

# speed level | start temp | end temp

(0, 0,  55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 66)
(7, 63, 32767)

Now the config file is ready!

3. Enable acpi_fancontrol

We need to enable acpi_fancontrol on kernel module options! Add this line to /etc/modprobe.d/thinkpad_acpi.conf file:

options thinkpad_acpi fan_control=1

Enter fullscreen mode Exit fullscreen mode

Activate kernel settings by running this:

sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi

Enter fullscreen mode Exit fullscreen mode

4. Enable the thinkpan.service

In order to start the service any time you boot up your machine, we need to enable it!

sudo systemctl enable --now thinkfan.service

Enter fullscreen mode Exit fullscreen mode

5. Done!

You can check if the service is running or not with this command:

sudo systemctl status thinkfan.service

关于我

g1eny0ung 的 ❤️ 博客

记录一些 🌈 生活上,技术上的事

一名大四学生

马上(已经)毕业于 🏫 大连东软信息学院

职业是前端工程师

业余时间会做开源和 Apple App (OSX & iOS)

主要的技术栈是:

  • JavaScript & TypeScript
  • React.js
  • Electron
  • Rust

写着玩(写过):

  • Java & Clojure & CLJS
  • OCaml & Reason & ReScript
  • Dart & Swift

目前在 PingCAP 工作

– 2020 年 09 月 09 日更新

其他

如果你喜欢我的开源项目或者它们可以给你带来帮助,可以赏一杯咖啡 ☕ 给我。~

If you like my open source projects or they can help you. You can buy me a coffee ☕.~

PayPal

https://paypal.me/g1eny0ung

Patreon:

Become a Patron!

微信赞赏码

wechat

最好附加一下信息或者留言,方便我可以将捐助记录 📝 下来,十分感谢 🙏。

It is better to attach some information or leave a message so that I can record the donation 📝, thank you very much 🙏.