ACPI reads wrong temperature
Hi,
I installed Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with the latest Bios 09HK), but the notebook continued to shutting down with the message "Critical temperature reached (65535 C). Shutting down.". To stop this I patched the thermal module, so that it ignores every temperature above 1000 C.
The wrong temperatuer is also listed in /proc/acpi/thermal_zone/THRM/temperature. Using lm-sensors I get the following output:
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +65535.0°C (crit = +105.0°C)
max6657-i2c-0-4c
Adapter: SMBus I801 adapter at 18e0
M/B Temp: +39.0°C (low = -65.0°C, high = +127.0°C)
(crit = +110.0°C, hyst = +100.0°C)
CPU Temp: +44.4°C (low = +35.1°C, high = +57.1°C)
(crit = +110.0°C, hyst = +100.0°C) The acpitz-virtual-0 device is the temperature that the kernel-acpi-module reads. The temperature listed under CPU Temp is the temperature read directly by lm-sensors, which seems to be right (at least it's in the same range as when running windows).
Strange is, that during boot the right temperature seems to be read:
[ 10.519291] ACPI: Thermal Zone [THRM] (58 C)
I had the same problem also with the 2.6.18-6-686 (Lenny) and with Ubuntu Hardy Heron (think the kernel was 2.6.24).
Can somenone give me a hint how I can fix the ACPI temperatuer reading? What other logs, system outputs should I post?
B.R. Peter
Signature · 5 lines
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Peter Mahlknecht
Hi,
I installed Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with the latest Bios 09HK), but the notebook continued to shutting down with the message "Critical temperature reached (65535 C). Shutting down.". To stop this I patched the thermal module, so that it ignores every temperature above 1000 C.
Do you get wrong temperatures if you never load the max6657 driver?
Signature · 1 line
Matthew Garrett | [email protected]
-------- Original-Nachricht --------
Quoted 7 lines
Datum: Fri, 31 Oct 2008 14:30:30 +0000
Von: Matthew Garrett <[email protected]>
An: Peter Mahlknecht <[email protected]>
CC: [email protected]
Betreff: Re: ACPI reads wrong temperatureOn Fri, Oct 31, 2008 at 03:02:47PM +0100, Peter Mahlknecht wrote:
Quoted 8 lines
Quoted 2 lines
Hi,
I installed Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 withthe latest Bios 09HK), but the notebook continued to shutting down with the message "Critical temperature reached (65535 C). Shutting down.".
Quoted 1 line
To stop this I patched the thermal module, so that it ignores every
temperature above 1000 C.
Do you get wrong temperatures if you never load the max6657 driver?
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?
B.R. Peter
Signature · 2 lines
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
Quoted 4 lines · Peter Mahlknecht
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load
em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?
In the lm90 case it's almost certainly because you have the firmware and Linux trying to access the chip at the same time. Since it has indexed registers, this fails very miserably. I'm surprised that the TV card driver has any effect - it should be on an entirely spearate i2c bus. Are you sure you don't have lm90 loaded in that case?
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 10 lines
Quoted 4 lines
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load
em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?In the lm90 case it's almost certainly because you have the firmware and Linux trying to access the chip at the same time. Since it has indexed registers, this fails very miserably. I'm surprised that the TV card driver has any effect - it should be on an entirely spearate i2c bus. Are you sure you don't have lm90 loaded in that case?
Yes, I am. I had also a talk with the author of the Tv-card driver and he suggested to but the problem on the lm-sensors ml: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
We know now that the problem is related to the i2c-i801 driver.
Peter
Signature · 5 lines
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Peter Mahlknecht
Quoted 5 lines
Quoted 4 lines
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load
em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?
Quoted 7 lines
Quoted 5 lines
In the lm90 case it's almost certainly because you have the firmware and Linux trying to access the chip at the same time. Since it has indexed registers, this fails very miserably. I'm surprised that the TV card driver has any effect - it should be on an entirely spearate i2c bus. Are you sure you don't have lm90 loaded in that case?
Yes, I am. I had also a talk with the author of the Tv-card driver and he suggested to but the problem on the lm-sensors ml: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
We know now that the problem is related to the i2c-i801 driver.
Yes. This is related with i2c-i801 driver.
We have a similar bug.
http://bugzilla.kernel.org/show_bug.cgi?id=10245
In this bug after the driver of lm_sensor is loaded, the system read the incorrect temperature. The root cause is that the SMBus is used by ACPI for thermal management. After the lm_sensor is loaded, Linux will use the same bus. There is the conflict. So if the Linux doesn't attach the driver to the SMbus, it will be OK.
Will you please attach the output of acpidump, lspci -vxxx?
Thanks.
Quoted 2 lines
Peter
-------- Original-Nachricht --------
Quoted 26 lines
Datum: Mon, 03 Nov 2008 10:05:36 +0800
Von: Zhao Yakui <[email protected]>
An: Peter Mahlknecht <[email protected]>
CC: Matthew Garrett <[email protected]>, "[email protected]" <[email protected]>
Betreff: Re: ACPI reads wrong temperatureQuoted 6 lines · Peter Mahlknecht
Quoted 6 lines
Quoted 4 lines
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load
em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?In the lm90 case it's almost certainly because you have the firmware
and
Quoted 5 lines
Quoted 4 lines
Linux trying to access the chip at the same time. Since it has indexed registers, this fails very miserably. I'm surprised that the TV card driver has any effect - it should be on an entirely spearate i2c bus. Are you sure you don't have lm90 loaded in that case?
Yes, I am. I had also a talk with the author of the Tv-card driver and
he suggested to but the problem on the lm-sensors ml:
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.htmlQuoted 1 line
We know now that the problem is related to the i2c-i801 driver.
Yes. This is related with i2c-i801 driver.
We have a similar bug.
http://bugzilla.kernel.org/show_bug.cgi?id=10245
Quoted 7 lines
In this bug after the driver of
lm_sensoris loaded, the system read the incorrect temperature. The root cause is that the SMBus is used by ACPI for thermal management. After thelm_sensoris loaded, Linux will use the same bus. There is the conflict. So if the Linux doesn't attach the driver to the SMbus, it will be OK.Will you please attach the output of acpidump, lspci -vxxx?
I attached the two files.
Peter
Signature · 1 line
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Thanks for the info.
From the attached info we can know that the I/O start address for SMbus is 0x18E0. And SMbus is internally used in AML code.
If the I2C-i801 driver is loaded, there is the conflict between BIOS and OS.
So I think that it is a BIOS bug. And this can't be fixed by Linux-kernel. It had better fixed by BIOS upgrading.
Thanks.
-----Original Message-----
From: Peter Mahlknecht [mailto:[email protected]]
Sent: 2008年11月3日 17:02
To: Zhao, Yakui
Cc: [email protected]; [email protected]
Subject: Re: ACPI reads wrong temperature
-------- Original-Nachricht --------
Quoted 26 lines
Datum: Mon, 03 Nov 2008 10:05:36 +0800
Von: Zhao Yakui <[email protected]>
An: Peter Mahlknecht <[email protected]>
CC: Matthew Garrett <[email protected]>, "[email protected]" <[email protected]>
Betreff: Re: ACPI reads wrong temperatureQuoted 6 lines · Peter Mahlknecht
Quoted 6 lines
Quoted 4 lines
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load
em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?In the lm90 case it's almost certainly because you have the firmware
and
Quoted 5 lines
Quoted 4 lines
Linux trying to access the chip at the same time. Since it has indexed registers, this fails very miserably. I'm surprised that the TV card driver has any effect - it should be on an entirely spearate i2c bus. Are you sure you don't have lm90 loaded in that case?
Yes, I am. I had also a talk with the author of the Tv-card driver and
he suggested to but the problem on the lm-sensors ml:
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.htmlQuoted 1 line
We know now that the problem is related to the i2c-i801 driver.
Yes. This is related with i2c-i801 driver.
We have a similar bug.
http://bugzilla.kernel.org/show_bug.cgi?id=10245
Quoted 7 lines
In this bug after the driver of
lm_sensoris loaded, the system read the incorrect temperature. The root cause is that the SMBus is used by ACPI for thermal management. After thelm_sensoris loaded, Linux will use the same bus. There is the conflict. So if the Linux doesn't attach the driver to the SMbus, it will be OK.Will you please attach the output of acpidump, lspci -vxxx?
I attached the two files.
Peter
Signature · 1 line
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Quoted 6 lines · Yakui
Thanks for the info.
From the attached info we can know that the I/O start address for SMbus is0x18E0. And SMbus is internally used in AML code.If the I2C-i801 driver is loaded, there is the conflict between BIOS and OS.
So I think that it is a BIOS bug. And this can't be fixed by Linux-kernel.
I don't think the BIOS is doing anything wrong here. It's entitled to assume that the operating system won't load drivers for hardware it's not declaring.
Signature · 1 line
Matthew Garrett | [email protected]
Len Brown
reviewerQuoted 4 lines
I don't think the BIOS is doing anything wrong here. It's entitled to assume that the operating system won't load drivers for hardware it's not declaring.
agreed, we need a linux solution.
-len
Quoted 6 lines · Len Brown
Quoted 4 lines
I don't think the BIOS is doing anything wrong here. It's entitled to assume that the operating system won't load drivers for hardware it's not declaring.
agreed, we need a linux solution.
There's a kernel warning in this kind of situation, but IIRC we were still at the point where there were false positives.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 10 lines · Matthew Garrett
Quoted 6 lines · Len Brown
Quoted 4 lines
I don't think the BIOS is doing anything wrong here. It's entitled to assume that the operating system won't load drivers for hardware it's not declaring.
agreed, we need a linux solution.
There's a kernel warning in this kind of situation, but IIRC we were still at the point where there were false positives.
On your box after the i2c-i801 driver is loaded, the smbus controller will be used by the AML code and i2c-i801 driver. Unfortunately there is no synchronization between them. IMO this is the BIOS fault. The SMbus will be accessed by the two different modules. But it is exported by BIOS.
So the better solution is that:
a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
the SMbus controller . Of course it won't try to load the device driver for it.
b. Linux OS won't load the device driver for it.
thanks.
Quoted 1 line
Quoted 5 lines · Zhao Yakui
On your box after the i2c-i801 driver is loaded, the smbus controller will be used by the AML code and i2c-i801 driver. Unfortunately there is no synchronization between them. IMO this is the BIOS fault. The SMbus will be accessed by the two different modules. But it is exported by BIOS.
No, loading i2c-i801 is harmless. The breakage occurs when you attempt to drive the smbus.
Quoted 5 lines
So the better solution is that:
a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
the SMbus controller . Of course it won't try to load the device driver for it.
b. Linux OS won't load the device driver for it.
The solution is for users not to load smbus drivers unless they know for certain that it's safe to do so, or alternatively for us to refuse to load i2c drivers if they overlap with ACPI resource allocations.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 16 lines · Matthew Garrett
Quoted 5 lines · Zhao Yakui
On your box after the i2c-i801 driver is loaded, the smbus controller will be used by the AML code and i2c-i801 driver. Unfortunately there is no synchronization between them. IMO this is the BIOS fault. The SMbus will be accessed by the two different modules. But it is exported by BIOS.
No, loading i2c-i801 is harmless. The breakage occurs when you attempt to drive the smbus.
Quoted 5 lines
So the better solution is that:
a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
the SMbus controller . Of course it won't try to load the device driver for it.
b. Linux OS won't load the device driver for it.
Quoted 3 lines
The solution is for users not to load smbus drivers unless they know for certain that it's safe to do so, or alternatively for us to refuse to load i2c drivers if they overlap with ACPI resource allocations.
We already have that:
Quoted 1 line
or alternatively for us to refuse to load i2c drivers
in drivers/acpi/osl.c:
#define ENFORCE_RESOURCES_STRICT 2
#define ENFORCE_RESOURCES_LAX 1
#define ENFORCE_RESOURCES_NO 0
static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
lax means print out warning which i2c driver conflicts with which ACPI Operation Region.
Did you get such a message:
printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
" conflicts with ACPI region %s"
" [0x%llx-0x%llx]\n",
acpi_enforce_resources == ENFORCE_RESOURCES_LAX
? KERN_WARNING : KERN_ERR,
ioport ? "I/O" : "Memory", res->name,
(long long) res->start, (long long) res->end,
res_list_elem->name,
(long long) res_list_elem->start,
(long long) res_list_elem->end);If not, probably this specific i2c driver has to be added to check it's resources against ACPI used Operation Regions.
Jean: Could you add that if necessary, pls.
This is the whole thread:
http://marc.info/?t=122546192400002&r=1&w=2
Thanks,
Thomas
Quoted 29 lines · Thomas Renninger
Quoted 16 lines · Matthew Garrett
Quoted 5 lines · Zhao Yakui
On your box after the i2c-i801 driver is loaded, the smbus controller will be used by the AML code and i2c-i801 driver. Unfortunately there is no synchronization between them. IMO this is the BIOS fault. The SMbus will be accessed by the two different modules. But it is exported by BIOS.
No, loading i2c-i801 is harmless. The breakage occurs when you attempt to drive the smbus.
Quoted 5 lines
So the better solution is that:
a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
the SMbus controller . Of course it won't try to load the device driver for it.
b. Linux OS won't load the device driver for it.Quoted 3 lines
The solution is for users not to load smbus drivers unless they know for certain that it's safe to do so, or alternatively for us to refuse to load i2c drivers if they overlap with ACPI resource allocations.
We already have that:
Quoted 1 line
or alternatively for us to refuse to load i2c drivers
in
drivers/acpi/osl.c:#define
ENFORCE_RESOURCES_STRICT2
#defineENFORCE_RESOURCES_LAX1
#defineENFORCE_RESOURCES_NO0
Quoted 5 lines
static unsigned int
acpi_enforce_resources=ENFORCE_RESOURCES_LAX;lax means print out warning which i2c driver conflicts with which ACPI Operation Region.
Did you get such a message:
According to his logs, the warning was printed.
Signature · 1 line
Matthew Garrett | [email protected]
Hi Thomas,
Quoted 11 lines · Thomas Renninger
Quoted 10 lines · Matthew Garrett
Quoted 5 lines · Zhao Yakui
On your box after the i2c-i801 driver is loaded, the smbus controller will be used by the AML code and i2c-i801 driver. Unfortunately there is no synchronization between them. IMO this is the BIOS fault. The SMbus will be accessed by the two different modules. But it is exported by BIOS.
No, loading i2c-i801 is harmless. The breakage occurs when you attempt to drive the smbus.
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
So the better solution is that:
a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
the SMbus controller . Of course it won't try to load the device driver for it.
b. Linux OS won't load the device driver for it.The solution is for users not to load smbus drivers unless they know for certain that it's safe to do so, or alternatively for us to refuse to
Except that all these drivers auto-load, so the user doesn't actually get to verify anything beforehand. Nor do I believe they should have to. If there's a way for the user to verify that loading the driver is safe then the same check can be added to the driver itself. Which, as Thomas explained, is partly implemented, just not yet enforced.
Quoted 26 lines
Quoted 1 line
load i2c drivers if they overlap with ACPI resource allocations.
We already have that:
Quoted 1 line
or alternatively for us to refuse to load i2c drivers
in
drivers/acpi/osl.c:#define
ENFORCE_RESOURCES_STRICT2
#defineENFORCE_RESOURCES_LAX1
#defineENFORCE_RESOURCES_NO0static unsigned int
acpi_enforce_resources=ENFORCE_RESOURCES_LAX;lax means print out warning which i2c driver conflicts with which ACPI Operation Region.
Did you get such a message:
printk("%sACPI: %s resource %s [0x%llx-0x%llx]"" conflicts with ACPI region %s" " [0x%llx-0x%llx]\n", acpi_enforce_resources == ENFORCE_RESOURCES_LAX ? KERN_WARNING : KERN_ERR, ioport ? "I/O" : "Memory", res->name, (long long) res->start, (long long) res->end, res_list_elem->name, (long long) res_list_elem->start, (long long) res_list_elem->end);
Quoted 6 lines
If not, probably this specific i2c driver has to be added to check it's resources against ACPI used Operation Regions.
Jean: Could you add that if necessary, pls.
This is the whole thread:
http://marc.info/?t=122546192400002&r=1&w=2
The i2c-i801 driver already has this check.
The exact same issue (reported by the same person) was already discussed on the lm-sensors list:
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-October/024608.html
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
With the same conclusion, i.e. i2c-i801 should be blacklisted on that specific model, or acpi_enforce_resources=strict should be used. Or the BIOS should hide the SMBus, that would be even better.
Signature · 1 line
Jean Delvare