Tell user when ACPI is killing machine
Subsystems (2)
Hi!
On critical overheat (or perceived critical overheat -- acpi bioses on some notebooks apparently report bogus values from time to time), kernel itself calls /sbin/halt *without telling anything*. User can not see anything, his machine just shuts down cleanly. Bad.
We should at least tell the user what is going on...
Pavel
drivers/acpi/thermal.c +1 -0
@@ -467,6 +474,7 @@if (result)return_VALUE (result); +printk (KERN_EMERG "Critical temperature reached (%d C), shutting down.\n" , tz->temperature);acpi_bus_generate_event (device,ACPI_THERMAL_NOTIFY_CRITICAL , tz->trips.critical.flags.enabled);acpi_thermal_call_usermode (ACPI_THERMAL_PATH_POWEROFF );
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Hi!
Quoted 6 lines
On critical overheat (or perceived critical overheat -- acpi bioses on some notebooks apparently report bogus values from time to time), kernel itself calls
/sbin/halt*without telling anything*. User can not see anything, his machine just shuts down cleanly. Bad.We should at least tell the user what is going on...
Okay, I had two bugs in single line of code (%ld and KELVIN_TO_CELSIUS). Sorry about that, here's better version.
Pavel
drivers/acpi/thermal.c +1 -0
@@ -467,6 +474,7 @@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 );
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
drivers/acpi/thermal.c line 477
Quoted 1 line · Pavel Machek
drivers/acpi/thermal.c +1
-0+printk (KERN_EMERG "Critical temperature reached (%d C), shutting down.\n" , tz->temperature);
Maybe there should be a KELVIN_TO_CELSIUS conversion for tz->temperature?
Regards,
Frederik Deweerdt
[email protected]
Quoted 4 lines · Pavel Machek
On critical overheat (or perceived critical overheat -- acpi bioses on some notebooks apparently report bogus values from time to time), kernel itself calls
/sbin/halt*without telling anything*. User can not see anything, his machine just shuts down cleanly. Bad.
Sorry if this is a bit OT, but why doesn't ACPI scale the CPU frequency back instead of shutting down? This is what APM does on my laptop (presumably in the BIOS) but when I enable ACPI the machine shuts down whenever I do something CPU intensive (yes; it's a poorly designed laptop). I have cpufreq support (cpufreq: P4/Xeon(TM) CPU On-Demand Clock Modulation available). Has this kind of thing been added since I last tried it, or do I actually have to actively set up cpufreq in user space to get thermally-induced clock modulation? Or is not even possible with the current state of things?
Hi!
Quoted 6 lines
Quoted 4 lines
On critical overheat (or perceived critical overheat -- acpi bioses on some notebooks apparently report bogus values from time to time), kernel itself calls
/sbin/halt*without telling anything*. User can not see anything, his machine just shuts down cleanly. Bad.Sorry if this is a bit OT, but why doesn't ACPI scale the CPU
Yep it is OT.
Quoted 5 lines
frequency back instead of shutting down? This is what APM does on my laptop (presumably in the BIOS) but when I enable ACPI the machine shuts down whenever I do something CPU intensive (yes; it's a poorly designed laptop). I have cpufreq support (cpufreq: P4/Xeon(TM) CPU On-Demand Clock Modulation available). Has this kind of thing been
It should try scaling first (and it works for me (tm)), but when temperature reaches "critical" limit it is assumed that everything failed and shutdown is only option. (On hp omnibook even in slowest possible mode, if you play .mpg video it overheats.)
Quoted 3 lines
added since I last tried it, or do I actually have to actively set up cpufreq in user space to get thermally-induced clock modulation? Or is not even possible with the current state of things?
cpufreq is not connected to acpi thermal subsystem. Dominik has some patches to change that, IIRC.
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]