0

I now use Thinkfan by way explained in http://www.thinkwiki.org/wiki/How_to_control_fan_speed. To see what I want to achieve please skip to the end of post to GOAL first, the rest is to show my current understanding of the issue.

I installed package:
apt install thnkfan, then enabled manual control by

echo 'options thinkpad_acpi fan_control=1' | sudo tee -a /etc/modprobe.d/thinkpad_acpi.conf 

then restarted laptop as per web page above. For automatic control it said some scripts should be loaded and the scripts provided for dwonload are lengthy. (An ACPI fan control script can be used to override the firmware's fan algorithm with gentler, quieter version.)

  • 1st question is: doesn't installation of thinkfan w/out manual control option enabled overrides firmware algo? What does thinkfan install do if not that?

Now I've found another page https://forum.thinkpads.com/viewtopic.php?t=119546 that states that for configuration that control fan speed in accordance with sensors file /etc/thinkfan.conf should be edited, no extra scripts mentioned. It says to add hwmon /sys/devices/virtual/thermal/thermal_zone0/temp to the file and then a table of temperatures. In my laptop in that file I have table with temperatures, but no hwmon like line, even commented, it has though link to thinkwiki page (although about sensors, not setup (http://www.thinkwiki.org/wiki/Thermal_Sensors)).

  • 2nd question: even that thinkwiki page is listed in my package, looks like thinkwiki when talking about control scripts is outdated?

The page https://forum.thinkpads.com/viewtopic.php?t=119546 also talks about testing thinkfan w/out restart as opposed to mentioned thinkwiki page.

  • can thinkfan work fully w/out laptop restart after install?

And lastly, I do remember a web page discussing how to avoid fan being turned on due to short temperature peaks.

  • how to do that?

Some current system info with manual control working, Linux Mint 19.1:

# /etc/init.d/thinkfan status

● thinkfan.service - simple and lightweight fan control program
   Loaded: loaded (/lib/systemd/system/thinkfan.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
  • why is service inactive, what does it mean?

GOAL:

To be able to control fan speed on a number of thinkpad models with debian based systems both manually and via sensors with configuration that enables to skip short temperature peaks with and w/out laptop restart after thinkfan install.

2 Answers 2

2
  1. You can manually control fanspeed without thinkfan. First set fan_control=1 as you have. Then cat /proc/acpi/ibm/fan will tell you the current fan speed/level and also available fan levels. Those should be 0-7, plus auto, disengaged, and full-speed. As far as I know, the last two are the same. They correspond to running the fan at max RPM, probably exceeding manufacturer specs. Auto corresponds to default fan control provided by lm-sensors. Now you can do things like this to manually set the fan level:

    sudo echo "level 5" > /proc/acpi/ibm/fan
    sudo echo "level auto" > /proc/acpi/ibm/fan
    

    If not, then these work:

    echo level 5 | sudo tee /proc/acpi/ibm/fan
    echo level auto | sudo tee /proc/acpi/ibm/fan
    
  2. There are a number of reasonably good guides out there for setting up thinkfan.
    Here is one and here's another. Both are OK. Also look at the example configurations here. It's not too difficult. Once it's set up, you can turn the daemon on or off as you like, and set it to load at boot. None of those require a reboot, but the details will differ according to your distro.

  3. Setting up your thinkfan.conf will require some effort and testing. I don't recommend just pasting in someone else's temperature settings. It's a good idea to build in some hysteresis, as seen in the example configurations. If you want full-speed (as I did) then you need to enter it with quotes just like this: "level full-speed", or you might be able to use 127 instead (but verify that works manually).

  4. You may be able to handle temperature spikes by adjusting the time between measurements. The option is -s and I think the default is 5 seconds. I haven't tried anything related to this. Note that there is some smoothing already built into thinkfan as it only increases the fan level based on the maximum of all the temperatures that it monitors. So if you have your sensors set up correctly, and they're all in the red, then it's probably worth worrying about. I haven't played around with this at all, but my guess is that a better solution is to adjust your temp settings for a smoother response instead of messing around with sensor timings. The hysteresis is important – make sure each fan level cools well into the range of the next lower level, otherwise your fan speed will be overly sensitive at the boundary.

1
  • Is it sufficient to just type in thinkfan -s 2 to set the measurement period to 2 seconds permanently? I mean, will it remain 2 secs after reboot? Is there a way to determine the current period? Jan 5, 2021 at 13:52
1

Thinkfan needs to be enabled. To do that you simply systemctl enable thinkfan. And you have to launch it as well if you didn't do that already.

You can walk through this process and then run systemctl start thinkfan. But I prefer a reboot instead when everything is setup.

7
  • thanx, but... Can you please list all steps (in order) required to install thinkfan and get it running w/out laptop restart? Jul 24, 2019 at 14:48
  • I updated my post.
    – kuzeyron
    Jul 24, 2019 at 16:00
  • In the link reboot is mentioned before systemctl enable thinkfan. Your advice reboot instead of your additional line, please answer if reboot in linked answer can be just skipped or else. Thanx. P.S. I want to use it for live distros, they cannot be rebooted (as far as I know, at least for non persistent, default configs). Jul 25, 2019 at 6:57
  • I left the old text intact and I'm pointing out with the Edit part as you suggested. I'll make another edit.
    – kuzeyron
    Jul 25, 2019 at 12:05
  • I was waiting for your I'll make another edit, it was too long, recently tried to follow link instructions and then systemctl start thinkfan - that command resulted in error, and systemctl start thinkfan results in same error when run on rebooted system with working thinkfan. Your efforts are appriciated, however my issue is left open. Aug 19, 2019 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .