* PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation
@ 2007-04-06 20:13 Walter Francis
2007-04-10 0:47 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: Walter Francis @ 2007-04-06 20:13 UTC (permalink / raw)
To: linux-kernel; +Cc: wally
After hibernating, the CPU0 thermal zone never updates. It will stay at 59C
forever for example.
I've tried making the thermal driver a module and unloading it before
hibernating and it didn't help, also went back as far as 2.6.19 and saw the
same behavior there. Currently using 2.6.21-pre6. If I reboot or suspend to
*RAM*, the problem fixes itself. And CPU1's thermal zone is fine. But CPU0
if it's (example) 59C, it stays 59C forever. I'm seeing it in gkrellm, but
it's coming from /proc/acpi/thermal_zone/*/temperature and verified to match
there.
I'm using Fedora Core 6 on a Lenovo 3000 V100 laptop, custom kernel. Still
modular, but stripped down to eliminate things that are not part of this
particular laptop. All features work, suspend to ram and disk work fine,
sound, wireless, etc. Just this quirk with the ACPI thermal zone crops up
when hibernating to disk.
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz
stepping : 6
cpu MHz : 1000.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat p
se36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni
monitor d
s_cpl est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 3328.18
clflush size : 64
Repeat for CPU 1. Core 2 Duo T5500. Kernel is SMP, both CPUs show, just not
pasting both for brevity.
I have turned ACPI debug on, here's copies of dmesg before hibernating:
http://unlimitedphoto.com/~wally/stuff/dmesg-2.6.21-pre6
And after hibernating:
http://unlimitedphoto.com/~wally/stuff/dmesg-2.6.21-pre6-afterhibernation
Please keep me on the CC so I can respond to queries, as I am not on the
mailing list.
--
Walter Francis
khayts.us
theblackmoor.net
unlimitedphoto.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation
2007-04-06 20:13 PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation Walter Francis
@ 2007-04-10 0:47 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2007-04-10 0:47 UTC (permalink / raw)
To: wally; +Cc: linux-kernel, Jung-Ik (John) Lee, linux-acpi
On Fri, 6 Apr 2007 16:13:55 -0400 (EDT)
"Walter Francis" <wally@theblackmoor.net> wrote:
> After hibernating, the CPU0 thermal zone never updates. It will stay at 59C
> forever for example.
>
> I've tried making the thermal driver a module and unloading it before
> hibernating and it didn't help, also went back as far as 2.6.19 and saw the
> same behavior there. Currently using 2.6.21-pre6. If I reboot or suspend to
> *RAM*, the problem fixes itself. And CPU1's thermal zone is fine. But CPU0
> if it's (example) 59C, it stays 59C forever. I'm seeing it in gkrellm, but
> it's coming from /proc/acpi/thermal_zone/*/temperature and verified to match
> there.
Yeah, John spotted a bug in there the other day.
Does this fix it?
--- a/drivers/acpi/thermal.c~acpi-thermal-fix-mod_timer-interval
+++ a/drivers/acpi/thermal.c
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *dat
del_timer(&(tz->timer));
} else {
if (timer_pending(&(tz->timer)))
- mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
+ mod_timer(&(tz->timer),
+ jiffies + (HZ * sleep_time) / 1000);
else {
tz->timer.data = (unsigned long)tz;
tz->timer.function = acpi_thermal_run;
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation
@ 2007-04-10 0:47 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2007-04-10 0:47 UTC (permalink / raw)
To: wally; +Cc: linux-kernel, Jung-Ik (John) Lee, linux-acpi
On Fri, 6 Apr 2007 16:13:55 -0400 (EDT)
"Walter Francis" <wally@theblackmoor.net> wrote:
> After hibernating, the CPU0 thermal zone never updates. It will stay at 59C
> forever for example.
>
> I've tried making the thermal driver a module and unloading it before
> hibernating and it didn't help, also went back as far as 2.6.19 and saw the
> same behavior there. Currently using 2.6.21-pre6. If I reboot or suspend to
> *RAM*, the problem fixes itself. And CPU1's thermal zone is fine. But CPU0
> if it's (example) 59C, it stays 59C forever. I'm seeing it in gkrellm, but
> it's coming from /proc/acpi/thermal_zone/*/temperature and verified to match
> there.
Yeah, John spotted a bug in there the other day.
Does this fix it?
--- a/drivers/acpi/thermal.c~acpi-thermal-fix-mod_timer-interval
+++ a/drivers/acpi/thermal.c
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *dat
del_timer(&(tz->timer));
} else {
if (timer_pending(&(tz->timer)))
- mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
+ mod_timer(&(tz->timer),
+ jiffies + (HZ * sleep_time) / 1000);
else {
tz->timer.data = (unsigned long)tz;
tz->timer.function = acpi_thermal_run;
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation
2007-04-10 0:47 ` Andrew Morton
(?)
@ 2007-04-10 1:47 ` Walter Francis
2007-04-10 1:57 ` Andrew Morton
-1 siblings, 1 reply; 6+ messages in thread
From: Walter Francis @ 2007-04-10 1:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Jung-Ik Lee, linux-acpi
> On Fri, 6 Apr 2007 16:13:55 -0400 (EDT)
> "Walter Francis" <wally@theblackmoor.net> wrote:
>> After hibernating, the CPU0 thermal zone never updates. It will stay at 59C
>> forever for example.
> Yeah, John spotted a bug in there the other day.
>
> Does this fix it?
>
> --- a/drivers/acpi/thermal.c~acpi-thermal-fix-mod_timer-interval
> +++ a/drivers/acpi/thermal.c
> @@ -758,7 +758,8 @@ static void acpi_thermal_check(void *dat
> del_timer(&(tz->timer));
> } else {
> if (timer_pending(&(tz->timer)))
> - mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
> + mod_timer(&(tz->timer),
> + jiffies + (HZ * sleep_time) / 1000);
> else {
> tz->timer.data = (unsigned long)tz;
> tz->timer.function = acpi_thermal_run;
No joy, didn't help.
Didn't apply clean to 21-pre6 (still latest I see on kernel.org), but here's
the section that seemed right.
/*
* Schedule Next Poll
* ------------------
*/
if (!sleep_time) {
if (timer_pending(&(tz->timer)))
del_timer(&(tz->timer));
} else {
if (timer_pending(&(tz->timer)))
mod_timer(&(tz->timer),jiffies + (HZ * sleep_time) /
1000);
else {
tz->timer.data = (unsigned long)tz;
tz->timer.function = acpi_thermal_run;
tz->timer.expires = jiffies + (HZ * sleep_time) / 1000;
add_timer(&(tz->timer));
Also, I think this is new with the line replaced.. Not sure exactly what's
causing it, but when I restart the cpuspeed daemon:
Starting cpuspeed: Error: Not an integer:
/proc/acpi/thermal_zone/TZS1/temperature
# cat /proc/acpi/thermal_zone/TZS1/temperature
temperature: 41 C
Looks normal to me?
Thanks!
--
Walter Francis
khayts.us
theblackmoor.net
unlimitedphoto.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation
2007-04-10 1:47 ` Walter Francis
@ 2007-04-10 1:57 ` Andrew Morton
2007-04-10 2:18 ` Walter Francis
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2007-04-10 1:57 UTC (permalink / raw)
To: wally; +Cc: linux-kernel, Jung-Ik Lee, linux-acpi
On Mon, 9 Apr 2007 21:47:38 -0400 (EDT) "Walter Francis" <wally@theblackmoor.net> wrote:
> > On Fri, 6 Apr 2007 16:13:55 -0400 (EDT)
> > "Walter Francis" <wally@theblackmoor.net> wrote:
>
> >> After hibernating, the CPU0 thermal zone never updates. It will stay at 59C
> >> forever for example.
>
> > Yeah, John spotted a bug in there the other day.
> >
> > Does this fix it?
> >
> > --- a/drivers/acpi/thermal.c~acpi-thermal-fix-mod_timer-interval
> > +++ a/drivers/acpi/thermal.c
> > @@ -758,7 +758,8 @@ static void acpi_thermal_check(void *dat
> > del_timer(&(tz->timer));
> > } else {
> > if (timer_pending(&(tz->timer)))
> > - mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
> > + mod_timer(&(tz->timer),
> > + jiffies + (HZ * sleep_time) / 1000);
> > else {
> > tz->timer.data = (unsigned long)tz;
> > tz->timer.function = acpi_thermal_run;
>
> No joy, didn't help.
>
> Didn't apply clean to 21-pre6 (still latest I see on kernel.org), but here's
> the section that seemed right.
>
> /*
> * Schedule Next Poll
> * ------------------
> */
> if (!sleep_time) {
> if (timer_pending(&(tz->timer)))
> del_timer(&(tz->timer));
> } else {
> if (timer_pending(&(tz->timer)))
> mod_timer(&(tz->timer),jiffies + (HZ * sleep_time) /
> 1000);
> else {
> tz->timer.data = (unsigned long)tz;
> tz->timer.function = acpi_thermal_run;
> tz->timer.expires = jiffies + (HZ * sleep_time) / 1000;
> add_timer(&(tz->timer));
Yes, the above looks like the correct change.
> Also, I think this is new with the line replaced.. Not sure exactly what's
> causing it, but when I restart the cpuspeed daemon:
>
> Starting cpuspeed: Error: Not an integer:
> /proc/acpi/thermal_zone/TZS1/temperature
Strange. Maybe a timing thing.
> # cat /proc/acpi/thermal_zone/TZS1/temperature
> temperature: 41 C
>
> Looks normal to me?
Yes it does. What happens of you stop and restart the daemon a second
time?
fwiw, /proc/acpi/thermal_zone/ATF0/temperature seems to do the right thing
here.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation
2007-04-10 1:57 ` Andrew Morton
@ 2007-04-10 2:18 ` Walter Francis
0 siblings, 0 replies; 6+ messages in thread
From: Walter Francis @ 2007-04-10 2:18 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Jung-Ik Lee, linux-acpi
> On Mon, 9 Apr 2007 21:47:38 -0400 (EDT) "Walter Francis"
> <wally@theblackmoor.net> wrote:
>
>> > On Fri, 6 Apr 2007 16:13:55 -0400 (EDT)
>> > "Walter Francis" <wally@theblackmoor.net> wrote:
>>
>> >> After hibernating, the CPU0 thermal zone never updates. It will stay at
>> 59C
>> >> forever for example.
> Yes, the above looks like the correct change.
> Strange. Maybe a timing thing.
> Yes it does. What happens of you stop and restart the daemon a second
> time?
Same thing, although I reverted the change and it still happens, so I must
have overlooked it before. Which is odd, because it's right at the end of my
suspend script. Looked to see if the cpuspeed daemon has updated recently and
it hasn't. Strange. :)
> fwiw, /proc/acpi/thermal_zone/ATF0/temperature seems to do the right thing
> here.
SMP? Not sure if it's directly tied to SMP, my other laptop I never could get
to behave when suspending.
If there's any more info I can provide or patches to try, let me know.
--
Walter Francis
khayts.us
theblackmoor.net
unlimitedphoto.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-10 2:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-06 20:13 PROBLEM: ACPI Thermal Zone for CPU0 does not update after hibernation Walter Francis
2007-04-10 0:47 ` Andrew Morton
2007-04-10 0:47 ` Andrew Morton
2007-04-10 1:47 ` Walter Francis
2007-04-10 1:57 ` Andrew Morton
2007-04-10 2:18 ` Walter Francis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.