Bug 4679

Summary: Fan turns off but not back on again on HP pavilion desktop
Product: ACPI Reporter: Keenan Pepper (keenanpepper)
Component: Power-FanAssignee: Konstantin Karasyov (konstantin.karasyov)
Status: CLOSED UNREPRODUCIBLE    
Severity: high CC: acpi-bugzilla, bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.12-rc5-mm1 Subsystem:
Regression: --- Bisected commit-id:

Description Keenan Pepper 2005-05-29 09:36:01 UTC
Running Debian Sarge on an HP pavilion a302x.
I can turn off the fan by doing:
modprobe fan; echo 3 > /proc/acpi/fan/FAN1/state
but then doing:
echo 0 > /proc/acpi/fan/FAN1/state
does not turn it back on; it has to be rebooted to get the fan to start again.

I changed these lines in drivers/acpi/power.c:

-       if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF)
-               return_VALUE(-ENOEXEC);
+       if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF) {
+               ACPI_DEBUG_PRINT((ACPI_DB_WARN,
+                       "Device [%s] says it's still on\n", resource->name));
+               resource->state = ACPI_POWER_RESOURCE_STATE_OFF;
+       }

and now it works. This indicates that the hardware is lazy and doesn't bother
updating the state to indicate that the fan is now off. Linux therefore doesn't
turn the fan back on because it looks like it's on already.

A possible solution would be always to carry out actions even if they appear
redundant, perhaps printing a warning message.
Comment 1 Len Brown 2007-03-07 22:44:46 UTC
is this still an issue with a recent kernel?
Comment 2 Keenan Pepper 2007-03-08 07:46:54 UTC
I don't have this box any more, so someone else will have to check.