Re: PROBLEM: CPU fan shuts down on load of fan.ko in kernel 2.6.18 and later

Bjorn Helgaas
2007-01-08T05:08:14Z

On Sunday 07 January 2007 13:10, Matthew Brett wrote:
> I am sorry, I am a bit lost. Should I expect replacing:
>
> > + device->flags.force_power_state = 1;
> > + acpi_bus_set_power(device->handle, state);
> > + device->flags.force_power_state = 0;
>
> with:
>
> > + if (state == ACPI_STATE_D0)
> > + acpi_bus_set_power(fan->handle, ACPI_STATE_D3);
> > + else if (state == ACPI_STATE_D3)
> > + acpi_bus_set_power(fan->handle, ACPI_STATE_D0);
> > + acpi_bus_set_power(fan->handle, state);
>
> in fan.c from 2.6.20-rc3 should solve the problem (replacing
> fan->handle with device->handle)? It does not seem to.

I think the "acpi_bus_set_power" call was added after
2.6.17. So if you remove it, I suspect your fan might work
like it used to.

I doubt that's the correct fix, though, because that call
was probably added for a reason. Konstantin can probably
speak to that.

If you feel like experimenting, you could print out what
state the BIOS tells you the fan is in (from the
acpi_bus_get_power() call), try setting it to either
ACPI_STATE_D0 or ACPI_STATE_D3, and see what the fan does.