Bug 15425

Summary: Wrong ACPI temperature after suspend/resume
Product: ACPI Reporter: Maximilian Mehnert (maximilian.mehnert)
Component: Power-ThermalAssignee: Zhang Rui (rui.zhang)
Status: CLOSED DUPLICATE    
Severity: high CC: matiasjrossi, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.33 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: acpi dump on dell studio 1537
custom _TMP method

Description Maximilian Mehnert 2010-03-02 12:37:03 UTC
Probably starting with 2.6.30 (see https://bugzilla.redhat.com/show_bug.cgi?id=532161) the following problem has been reported:

--snip from bugzilla.redhat.com--

When using kernel 2.6.30.9-90.fc11.i686.PAE ACPI reports all temperature zones
are 0 C. When this happens the cooling fans are never turned on causing instant
shutdowns when the temperatures reach a dangerous level.


Version-Release number of selected component (if applicable):
2.6.30.9-90.fc11.i686.PAE

With the previous stable kernel version:

[abarto@roadrunner ~]$ uname -r
2.6.30.8-64.fc11.i686.PAE
[abarto@roadrunner ~]$ sudo cat /proc/acpi/thermal_zone/TZ01/temperature
temperature:             39 C

(after suspend/resume)

[abarto@roadrunner ~]$ sudo cat /proc/acpi/thermal_zone/TZ01/temperature
temperature:             39 C

With the latest kernel version and all updates from the testing repo:

[abarto@roadrunner ~]$ uname -r
2.6.30.9-90.fc11.i686.PAE
[abarto@roadrunner ~]$ sudo cat /proc/acpi/thermal_zone/TZ01/temperature 
temperature:             39 C

(after suspend/resume)

[abarto@roadrunner ~]$ sudo cat /proc/acpi/thermal_zone/TZ01/temperature 
temperature:             0 C    

--snap--

I still see this in latest 2.6.33
Comment 1 Zhang Rui 2010-03-03 06:50:05 UTC
please attach the acpidump otuput of your laptop.
please try the latest upstream kernal from kernel.org and see if the problem still exists.
Comment 2 Maximilian Mehnert 2010-03-03 18:27:55 UTC
Created attachment 25343 [details]
acpi dump on dell studio 1537

I checked out 
commit 3a5b27bf6f29574d667230c7e76e4b83fe3014e0
Merge: 5057bfa 21df20f
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Tue Mar 2 10:41:26 2010 -0800

The problem still persists. Attached is the requested output from acpidump.
Comment 3 Zhang Rui 2010-03-04 05:34:27 UTC
Created attachment 25351 [details]
custom _TMP method

please follow the kernel_src/Documentation/acpi/method-customizing.txt to override the _TMP method with the new _TMP method attached.

And then attach the output of "cat /proc/acpi/thermal_zone/TZ00/temperature" both before and after the system suspend.
Comment 4 Maximilian Mehnert 2010-03-05 19:55:47 UTC
Well, whatever I do after overriding the _TMP method this way, it shows 

cat /proc/acpi/thermal_zone/TZ0*/temperature
temperature:             1 C
temperature:             0 C
temperature:             0 C

;-)
Comment 5 Maximilian Mehnert 2010-03-05 20:02:45 UTC
correction.
replugging the power supply yields:
cat /proc/acpi/thermal_zone/TZ0*/temperature
temperature:             1 C
temperature:             59 C
temperature:             78 C

(before, all temperatures showed sane values after replugging the power supply.)
Comment 6 Zhang Rui 2010-03-08 02:24:51 UTC
(In reply to comment #4)
> Well, whatever I do after overriding the _TMP method this way, it shows 
> 
> cat /proc/acpi/thermal_zone/TZ0*/temperature
> temperature:             1 C
> temperature:             0 C
> temperature:             0 C
> 
My patch only changes the temperature of TZ00, so I double the temperature in all the three thermal zones is 0 when AC is unplugged. will you please make a double check?

BTW: now it seems the problem is that ACPI thermal zone report insane temperature when AC is unplugged or when system comes back from suspend, right?

could you please do the same test both BEFORE and AFTER suspend?
Comment 7 Matías Javier Rossi 2010-03-09 16:59:46 UTC
Hi!
I've got a Studio 1555, and noticed the same problem.
I'm currently using 2.6.34-rc1 from git and the problem exists.
In my case plugging/unplugging the power adaptor doesn't changes anything.

So, when i'm running from a cold boot:

$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +42.0°C  (crit = +100.0°C)                  
temp2:       +50.0°C  (crit = +100.0°C)                  
temp3:       +72.0°C  (crit = +100.0°C)                  

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +40.0°C  (high = +90.0°C, crit = +90.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +39.0°C  (high = +90.0°C, crit = +90.0°C)  

now AFTER suspend & resume:

$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:       +0.0°C  (crit = +100.0°C)                  
temp2:       +0.0°C  (crit = +100.0°C)                  
temp3:       +0.0°C  (crit = +100.0°C)                  

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +41.0°C  (high = +90.0°C, crit = +90.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +39.0°C  (high = +90.0°C, crit = +90.0°C)

should i try your patch?
do you need my acpidump?

thanks in advance!
Comment 8 Zhang Rui 2010-03-10 01:44:13 UTC
Rossi, please attach the acpidump first and I'll check if you can use the patch.
Comment 9 Zhang Rui 2010-03-10 01:45:15 UTC
ping Maximilian...
Comment 10 Zhang Rui 2010-03-10 01:47:20 UTC
hah, please verify if this is a duplicate of bug #14667
Comment 11 Maximilian Mehnert 2010-03-10 12:42:56 UTC
Ha! What irony. I spent hours bisecting this, coming to the same conclusion only to be notified that someone did it already. 
Yes. It's a duplicate. Sigh :-) :-D
Comment 12 Maximilian Mehnert 2010-03-10 12:44:47 UTC

*** This bug has been marked as a duplicate of bug 14667 ***