Bug 9798

Summary: Fan resume not working on nx6325 without userland assistance
Product: ACPI Reporter: Rafael J. Wysocki (rjw)
Component: Power-FanAssignee: Alexey Starikovskiy (astarikovskiy)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: acpi-bugzilla, astarikovskiy, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: commit 93ad7c07ad487b036add8760dabcc35666a550ef Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 9243    
Attachments: Don't check the set state
Don't check the set state #2
Patch that appears to fix the issue

Description Rafael J. Wysocki 2008-01-22 13:17:36 UTC
Subject         : Fan resume not working on nx6325 without userland assistance
Submitter       : "Rafael J. Wysocki" <rjw@sisk.pl>
Date            : 2008-01-22 02:41
References      : http://marc.info/?t=120096647100001&r=1&w=4
Handled-By      : Alexey Starikovskiy <astarikovskiy@suse.de>
Comment 1 Rafael J. Wysocki 2008-01-22 13:19:11 UTC
Caused by:

commit 93ad7c07ad487b036add8760dabcc35666a550ef
Author: Alexey Starikovskiy <astarikovskiy@suse.de>
Date:   Mon Oct 22 14:19:21 2007 +0400

    ACPI: Fan: Drop force_power_state acpi_device option
Comment 2 Alexey Starikovskiy 2008-01-22 13:26:43 UTC
Created attachment 14536 [details]
Don't check the set state

Rafael,
Could you please check which part of the commit creates a problem?
Does this patch change anything?
Comment 3 Rafael J. Wysocki 2008-01-22 14:58:33 UTC
The problem still exists with this patch (ie. the fan behaves like without it after a resume), while reverting commit 93ad7c07ad487b036add8760dabcc35666a550ef makes it go away.
Comment 4 Rafael J. Wysocki 2008-01-22 15:07:53 UTC
Hmm, why don't we do what the user land is doing on resume (ie. switch the fan on/off unconditionally)?
Comment 5 Alexey Starikovskiy 2008-01-22 15:14:01 UTC
It was so some time ago, then the interaction with thermal was found, so we decided to force write of the current state. I was thinking that after I removed caching of the state from power resource it is safe to drop this workaround, but it seems I'm wrong.
Comment 6 Alexey Starikovskiy 2008-01-22 15:14:55 UTC
Created attachment 14537 [details]
Don't check the set state #2

Please check this patch
Comment 7 Rafael J. Wysocki 2008-01-22 15:43:17 UTC
This one apparently helps.
Comment 8 Alexey Starikovskiy 2008-01-22 15:46:20 UTC
Good. Don't like to put force flag back...
Comment 9 Rafael J. Wysocki 2008-01-22 15:59:35 UTC
(In reply to comment #8)
> Good. Don't like to put force flag back...

Agreed.

Please push the patch to Len ASAP.
Comment 10 Rafael J. Wysocki 2008-01-22 16:21:48 UTC
Sorry, I was too quick to say that.

It seemed to help right after the resume, but after a subsequent kernel compilation the fan is staying at 75% of full speed and the /proc/acpi/fan/*/state files are obviously lying.  Well ...
Comment 11 Rafael J. Wysocki 2008-01-22 17:19:30 UTC
Created attachment 14538 [details]
Patch that appears to fix the issue

This patch is doing better than the previous ones as the post resume thermal management apparently works with it.
Comment 12 Rafael J. Wysocki 2008-01-23 06:53:47 UTC
Comment on attachment 14538 [details]
Patch that appears to fix the issue

No.  With this patch, thermal management after resume from hibernation is busted.
Comment 13 Rafael J. Wysocki 2008-01-23 06:55:08 UTC
It seems the only thing that really help in all situations is to revert commit 93ad7c07ad487b036add8760dabcc35666a550ef, unfortunately.
Comment 14 Len Brown 2008-01-23 19:44:24 UTC
93ad7c07ad487b036add8760dabcc35666a550ef
has been reverted from the acpi release tree.
Comment 15 Len Brown 2008-01-24 12:47:11 UTC
the revert mentioned in comment #14 shipped in linux-2.6.24-rc8-git8