Fan Control – How to Manually Turn On CPU Fan

12.04fanfancontrollm-sensorssensors

My BIOS controls my fan speeds, and I want to keep it that way. I have a machine in my basement where it's normally pretty cool, and as long as the machine isn't under high load the fans don't need to run at all. The BIOS already handles this just fine.

But if my fans aren't running, I have no way to test them to make sure they aren't broken. So I'd like to make a script which will turn on the fans full blast for a few seconds, then use lm-sensors to monitor fan speed, and then I will know that the fans aren't broken.

How can I manually turn on the fans to full speed? I don't want to use fancontrol, because I'm not looking for something that keeps running and keeps controlling fan speed. I just want something "low tech" that will turn them on regardless of temperature.

Another thread said:

If you really want to do it yourself, you can probably find special device files named pwm1, pwm2, etc. in /sys/class/hwmon/*/device/. You can cat them to get the current value or write a number between 0 and 255 to change the fan speed.

That would be perfect, but it doesn't seem to work. Fancontrol says that my CPU fan is /sys/devices/platform/it87.656/pwm3, but when I set that to 255, it doesn't affect fan speed at all.

Does anyone know how I can manually turn on the fan from a script, regardless of temperature?

Best Answer

You can do this with the tool

pwmconfig

This tool is normally used to save a configuration file for fancontrol. But you don't have to do so. You can just start the tool, than it will put all fans on full speed, sowing there current speed like this:

Giving the fans some time to reach full speed...
Found the following fan sensors:
  hwmon0/device/fan1_input     current speed: 2129 RPM
  hwmon0/device/fan2_input     current speed: 1679 RPM
  hwmon0/device/fan3_input     current speed: 0 ... skipping!
  hwmon0/device/fan4_input     current speed: 0 ... skipping!

After that you just skip (Ctr+C) the tool without saving anything.

To install the tool, you can use the following command:

sudo apt-get install fancontrol