* FW: ACPI too sensitive about critical temperature
@ 2004-01-19 8:50 Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A84702C9321E-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Grover, Andrew @ 2004-01-19 8:50 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
-----Original Message-----
From: Julius Volz [mailto:julius.volz-cOr7zazyEW0f8UlNpKJ8ow@public.gmane.org]
Sent: Sunday, January 18, 2004 6:26 AM
To: Grover, Andrew; Diefenbaugh, Paul S
Subject: ACPI too sensitive about critical temperature
Hi,
I didn't want to bug the whole lkml with this, so I'm sending this to
you guys who wrote "drivers/acpi/thermal.c". I hope that's okay...
A friend of mine has a mainboard (I can find out the specific type if
you want to know) which reports inaccurately high temperature "peaks"
from time to time.
Looking at /proc/acpi/thermal_zone/THR1/temperature every second might
look something like this: 45, 43, 47, 42, 90, 43, 41, 45
This is of course bad when CONFIG_ACPI_THERMAL is enabled and the
computer just randomly shuts down when you are working. The problem with
detecting this bug for normal users is that the temperature reported in
the shutdown message is already taken from a next measurement and looks
ok again.
So you might get a shutdown message saying,
"Critical temperature reached (43 C)..."
and wonder why the system shuts down although you set critical
temperature to 85°C in the BIOS.
I've looked at thermal.c and thought that it would be better to look at
temperature measurements over a range of, say, three seconds (if that is
possible) to sort out these false peaks.
As there might be many mainboards out there that do this and
CONFIG_ACPI_THERMAL should normally be enabled, this could turn out to
be a problem for many people otherwise.
What do you think?
Julius
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: FW: ACPI too sensitive about critical temperature
[not found] ` <F760B14C9561B941B89469F59BA3A84702C9321E-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
@ 2004-01-19 22:02 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2004-01-19 22:02 UTC (permalink / raw)
To: Grover, Andrew; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi!
> I didn't want to bug the whole lkml with this, so I'm sending this to
> you guys who wrote "drivers/acpi/thermal.c". I hope that's okay...
>
> A friend of mine has a mainboard (I can find out the specific type if
> you want to know) which reports inaccurately high temperature "peaks"
> from time to time.
> Looking at /proc/acpi/thermal_zone/THR1/temperature every second might
> look something like this: 45, 43, 47, 42, 90, 43, 41, 45
Try this one.
Pavel
--- clean/drivers/acpi/thermal.c 2003-07-27 22:31:09.000000000 +0200
+++ linux/drivers/acpi/thermal.c 2004-01-13 22:33:49.000000000 +0100
@@ -223,8 +223,11 @@
tz->last_temperature = tz->temperature;
status = acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ if (tz->temperature != tz->last_temperature)
+ printk(KERN_ERR "temperature damaged while processing\n");
return -ENODEV;
+ }
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", tz->temperature));
@@ -457,7 +460,17 @@
return_VALUE(-EINVAL);
if (tz->temperature >= tz->trips.critical.temperature) {
+ long old_temperature = tz->temperature;
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Critical trip point\n"));
+
+ result = acpi_thermal_get_temperature(tz);
+ if (!result) {
+ if (tz->temperature < (tz->trips.critical.temperature - 100)) {
+ printk(KERN_ALERT "ACPI changed its mind about temperature, was %ld C, now %ld C",
+ KELVIN_TO_CELSIUS(old_temperature), KELVIN_TO_CELSIUS(tz->temperature));
+ return_VALUE(0);
+ }
+ }
tz->trips.critical.flags.enabled = 1;
}
else if (tz->trips.critical.flags.enabled)
@@ -467,8 +480,8 @@
if (result)
return_VALUE(result);
+ printk(KERN_EMERG "Critical temperature reached (%ld C), shutting down.\n", KELVIN_TO_CELSIUS(tz->temperature));
acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL, tz->trips.critical.flags.enabled);
-
acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);
return_VALUE(0);
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-19 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-19 8:50 FW: ACPI too sensitive about critical temperature Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A84702C9321E-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2004-01-19 22:02 ` Pavel Machek
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.