Public bug reported:

Because of thermal problems, my notebook suddenly shutdown and I lost
all my work.

The cause was that ACPI thermal zone reached CRITICAL level, and the
kernel call's /sbin/poweroff:

-------~/src/linux/linux-source-2.6.20-2.6.20/drivers/acpi/thermal.c
[..]
#define ACPI_THERMAL_PATH_POWEROFF      "/sbin/poweroff"
[..]
static int acpi_thermal_critical(struct acpi_thermal *tz)
{
        if (!tz || !tz->trips.critical.flags.valid)
                return -EINVAL;
        if (tz->temperature >= tz->trips.critical.temperature) {
                printk(KERN_WARNING PREFIX "Critical trip point\n");
                tz->trips.critical.flags.enabled = 1;
        } else if (tz->trips.critical.flags.enabled)
                tz->trips.critical.flags.enabled = 0;
        printk(KERN_EMERG
               "Critical temperature reached (%ld C), shutting down.\n",
               KELVIN_TO_CELSIUS(tz->temperature));
        acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL,
                                tz->trips.critical.flags.enabled);
        acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);

        return 0;
}
-------~/src/linux/linux-source-2.6.20-2.6.20/drivers/acpi/thermal.c

HOW TO REPRODUCE: 
1.a Keep your notebook/hardware unclean ;) and do some cpu stress
1.b Increase the trip_point to a minor level. Ex:
   # cat /proc/acpi/thermal_zone/THM/temperature 
   temperature:             53 C
   # echo -n "50:0:0:0:0" > /proc/acpi/thermal_zone/THM/trip_points
2. Watch your notebook shutting down with no warning or futher action


RECOMMENDATION:
1. Change the thermal.c module for calling a script. This script may check if 
acpid is working, if it is not active, THEN call poweroff
2. Add an acpid script int /etc/acpi for taking care of the process. This 
script may call gnome-power-manager for asking the user to suspend to disk/ram. 
The script may also slow down the cpu frequency, if possible.

Cheers,
-- 
Aldrin Martoq

** Affects: Ubuntu
     Importance: Undecided
         Status: Unconfirmed

-- 
acpi critical thermal zone call poweroff insteand of suspend to disk or ram, 
results in lost of work
https://bugs.launchpad.net/bugs/113926
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to