fan control

Daniele Boffi
2003-05-01T16:51:37Z

I noticed that not only can I check the status of the fan in /proc/acpi/fan but
I can change it. Since this issue does not seem to be documented (am I wrong?)
I want to be sure I am not doing anything wrong.

Here is the structure of my /proc/acpi/fan directory

$ ls -R /proc/acpi/fan
/proc/acpi/fan:
C1D9 C1DA C1DB C1DC

/proc/acpi/fan/C1D9:
state

/proc/acpi/fan/C1DA:
state

/proc/acpi/fan/C1DB:
state

/proc/acpi/fan/C1DC:
state

If the fan is off, I see:

$ cat /proc/acpi/fan/*/*
status: off
status: off
status: off
status: off

If it is spinning slowly, I get

$ cat /proc/acpi/fan/*/*
status: off
status: off
status: off
status: on

If it is at maximum speed, I have

$ cat /proc/acpi/fan/*/*
status: on
status: on
status: on
status: on

And analogous things for the intermediate situations.

Now, I noticed that if I echo 0 into the state files, the fan start spinning.
So that, for instance, if I am in the case when only the first state is on,
then

$ cat /proc/acpi/fan/*/*
status: off
status: off
status: off
status: on
$ echo -n 0 > /proc/acpi/fan/C1DB/state
$ cat /proc/acpi/fan/*/*
status: off
status: off
status: on
status: on

and the fan spins faster...

To go back, it is sufficient to echo 3 into the same file and the
corresponding state goes off.
I understand this procedure might be very dangerous. How am I sure that, after
playing with the fans, the control of them goes back to the thermal zones?

Any pointer is appreciated.

Daniele