Bug 4679 - Fan turns off but not back on again on HP pavilion desktop
Summary: Fan turns off but not back on again on HP pavilion desktop
Status: CLOSED UNREPRODUCIBLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Fan (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: Konstantin Karasyov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-29 09:36 UTC by Keenan Pepper
Modified: 2007-03-08 20:33 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.12-rc5-mm1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.