How to control thinkpad_acpi via procfs, RHEL 6.4

5,436

I think you're running into this:

excerpt from thinkwiki - How to control fan speed

Fan control operations are disabled by default for safety reasons. To enable fan control, the module parameter fan_control=1 must be given to thinkpad-acpi.

You should be able to create the following file /etc/modprobe.d/thinkpad_acpi.conf with: options thinkpad_acpi fan_control=1 inside. Once you're enabled the fan_control option you should be able to do the following types of commands:

$ echo level 0 > /proc/acpi/ibm/fan    # (fan off)
$ echo level 7 > /proc/acpi/ibm/fan    # (maximum speed)
$ echo level auto > /proc/acpi/ibm/fan # (automatic - default)

If you receive a PERMISSION DENIED error you can use the following command syntax instead as a work-around:

$ echo level 0 | sudo tee /proc/acpi/ibm/fan    # (fan off)
$ echo level 7 | sudo tee /proc/acpi/ibm/fan    # (maximum speed)
$ echo level auto | sudo tee /proc/acpi/ibm/fan # (automatic - default)
Share:
5,436

Related videos on Youtube

mustaccio
Author by

mustaccio

Updated on September 18, 2022

Comments

  • mustaccio
    mustaccio over 1 year

    I'm having trouble with the thinkpad_acpi module on my Thinkpad T400. While the processor temperature can vary, depending on the CPU activity, from 40 to 85 deg. Celsius, my fan speed remains almost constant, in the range of 2600-3000 rpm. I was expecting the fan to speed up as the temperature rises, but it's not happening.

    Before digging deeper into why it doesn't work as one would expect, I tried to check if manually increasing the fan speed works. According to this README, I should be able to control the fan speed by writing level [1-7] to /proc/acpi/ibm/fan, but I get the "Invalid argument" error whatever the value.

    I realize this is an obscure problem, but may be someone has an idea what might be valid arguments. Here are some of my attempts:

    # cat /proc/acpi/ibm/fan
    status:     enabled
    speed:      2966
    level:      auto
    # echo 5 >/proc/acpi/ibm/fan
    bash: echo: write error: Invalid argument
    # echo 'level 5' >/proc/acpi/ibm/fan
    bash: echo: write error: Invalid argument
    # echo 'enable' >/proc/acpi/ibm/fan
    bash: echo: write error: Invalid argument
    # echo 'level auto' >/proc/acpi/ibm/fan
    bash: echo: write error: Invalid argument
    
  • Admin
    Admin almost 11 years
    Thanks for the response, but that produces the same Invalid argument error. So does # echo enable >/proc/acpi/ibm/fan, strangely.
  • Admin
    Admin over 2 years
    This is wrong: there are several things that you can set, so you need to tell which thing to set: when I cat /proc/acpi/ibm/fan I get the following output (on Fedora 34): status: enabled speed: 2489 level: auto commands: level <level> (<level> is 0-7, auto, disengaged, full-speed) commands: enable, disable commands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds)) , So you can say echo enable or echo disable or echo level <something> or echo watchdog <something>,
  • Admin
    Admin over 2 years
    ... but the thermal_acpi module has to be loaded with the fan_control=1 option (either on the command line or in a config file): otherwise, you cannot write anything to the file.