[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recurrent alerts "Package temperature above threshold, cpu clock throttled"



Hi Nicholas,

First of all, thank you for your continuous help :)

20 janv. 2020 à 22:27 de nsteeves@gmail.com:

>
>
>>> Have you tried disabling CPU freq boost?  When the ambient
>>> temperature is above 27°C my X220 and X230 need to have boost
>>> disabled to avoid overheating/throttling.
>>>
>> I've seen at least 2 ways to deactivate turbo boost:
>> 1) echo "1" to /sys/devices/system/cpu/intel_pstate/no_turbo
>> Visibly, as sysctl only works with /proc/sys (and not /sys), this
>> needs to be set permanently via a systemd service. What do you think
>> about this procedure:
>> https://blog.christophersmart.com/2017/02/08/manage-intel-turbo-boost-with-systemd/?
>> 2) modify MSR registers via wrmsr (https://askubuntu.com/a/619881). I don't know if there is persistance here...
>>
>> Do you use any of these? Something else?
>>
>
> I used the systemd method on my sister's old Macbook.  It seems to help
> with heat and fan noise, and everything is still consistently smooth, so
> we count it as a win.
>
So far, I've noticed that I don't have "temperature above threshold" alerts anymore if I deactivate turbo boost!
I've made some quick tests like:
stress-ng --cpu 4 --timeout 30s --metrics-brief
With turbo enabled my laptop raises to 80°C/4580MHz. Without it, it stays around 55°C/1800MHz.

What's weird is that those high temperatures during stress don't generate alerts necessarily. Even if T° is going to 80°C, I don't have "temperature above threshold" alerts for sure (??). Inversely, I can do nothing special but get those alerts...
I'm still confused & still don't know what really triggers those alerts then...

So far turbo boost deactivation seems to resolve the issue. Do you think I'll really lose performances?
I think turbo can be used only in mono-threaded context. With HT activated, I should not be in this context very often, right?

>> PS: My CPU is Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz.
>>
> Oooh.  Earlier your wrote that this is an X390, right?  The powerful CPU
> in a thin and tiny case with lightweight cooling solution problem may
> apply.
>
Lenovo ThinkPad X390 indeed ;)

> BTW, have you checked for Lenovo-provided firmware/BIOS/EC updates?
> I've seen temperature and fan profile-related fixes in a couple of them
> (for other Lenovo models).
>
Good idea. It seems there is a new firmware indeed!
If I'm right, I have N2JET83W (1.61) UEFI BIOS version and N2JHT32W (1.16) Embedded Controller version.
According to https://download.lenovo.com/pccbbs/mobiles/n2jul22w.txt, 1.62 (N2JET84W) and 1.17 (N2JHT33W) are available. Changelogs are as follows:

[Important updates]
- Addresses CVE-2019-0185 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0185)
- Security fix addresses LEN-29406 ST Microelectronics TPM Firmware ECDSA

[New functions or enhancements]
- Updated the CPU microcode.
   (Note) Above update will show "Self-Healing BIOS  backup progressing ... xx %"
          massage on screen during BIOS update process.
- Updated the Diagnostics module to version 04.11.000.
- Supported for Battery Diagnostics.
- Updated Charging LED to always On while AC adapter was connected.

[Problem fixes]
- Fixed an issue where system entered hibernation suddenly due to critical low
  battery status detected incorrectly.
- Fixed an issue where battery was not charged when AC adapter was connected
  before computer was turned on.
- Fixed an issue where system hang after disabled AMT setting in BIOS setup.

I've never updated firmware on Linux. I know it can be a dangerous operation...
I've just installed fwupd-amd64-signed on my Debian 10 and it tells me:

sudo fwupdmgr get-updates
X390/T490s Thunderbolt Controller has firmware updates:
GUID:                    e773c51e-a20c-5b29-9f09-6bb0e0ef7560
ID:                      com.lenovo.ThinkPadN2JTF.firmware
Update Version:          20.00
Update Name:             ThinkPad X390/ThinkPad T490s (Machine types: 20Q0,20Q1,20SC,20SD,20NX,20NY) Thunderbolt Controller
Update Summary:          Lenovo ThinkPad X390/ThinkPad T490s Thunderbolt Firmware
Update Remote ID:        lvfs
Update Checksum:         SHA1(6c0dce78ce4e91f6c8e79fdf3c8965077bd35219)
Update Location:         https://fwupd.org/downloads/8eef957c95cb6f534448be1faa7bbfc8702d620f64b757d40ee5e0b6b7094c0e-Lenovo-ThinkPad-X390-SystemFirmware-01.cab
Update Description:      Lenovo ThinkPad X390/ThinkPad T490s Thunderbolt Firmware
                        
                          • DO NOT FORCE UPDATE Thunderbolt Controller. This may damage the firmware.
                        
No upgrades for 20Q0CTO1WW System Firmware, current is 0.1.61: 0.1.51=older
UEFI Device Firmware has firmware updates:
GUID:                    ef5cdc85-9cf6-469d-9cb7-920b7dd6672b
ID:                      com.lenovo.ThinkPadN2JRN.firmware
Update Version:          192.47.1524
Update Name:             ThinkPad T490s Consumer ME Update
Update Summary:          Lenovo ThinkPad T490s Consumer ME Firmware
Update Remote ID:        lvfs
Update Checksum:         SHA1(7689117b9f94b853d688c84051c18a989a76c7fb)
Update Location:         https://fwupd.org/downloads/3e05da98267ebff8531c17f820b4dfaddc73c17f-Lenovo-ThinkPad-T490s-ConsumerMEFirmware-12.0.47.1524.cab
Update Description:       • 0 Q2'19 Intel Platform Update (Hot Fix Release)
                        
                         Problem Fixes
                        
                         Security issues fixed:
                        
No upgrades for UEFI Device Firmware, current is 0.1.16: 0.1.15=older, 0.1.12=older

It seems fwupd doesn't provide aforementioned 1.62 (N2JET84W), right? Maybe it's just a matter of time?
What would you do if you were me please? Manual update via dd on a USB thumbdrive? Nothing?

>> ii) Is it risky to do nothing about these temperature warnings?  I
>> have no idea what EC means (Embedded Controller?) but you said EC
>> eventually shutdowns the laptop if need be. I presume it's not really
>> beneficial from the user point of view as the current tasks will be
>> shutdowned and some work/data might be lost during the process.
>>
>
> Yes, "EC" means embedded controller :-)  Intel hardware is excellent
> about shutting itself down before damage occurs.
>
> So anyways, given that you have a new ultrabook with a powerful CPU, I
> think thermald is probably the best solution to try.  You can read about
> how it combines many other methods and aims to solve the problems
> inherent to ultrabooks here (01.org is the Intel open source project):
>
>  > https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon
>
Many thanks for the link. I didn't know about it. So I've:
* downloaded https://github.com/intel/thermal_daemon/archive/v1.9.1.zip
* unzipped v1.9.1.zi <https://github.com/intel/thermal_daemon/archive/v1.9.1.zip>p
* ./autogen.sh
* ./configure prefix=/
* make
* sudo make install

If I'm right, now I just need:
sudo systemctl start thermald.service
to make it happens.

Questions:
* are Intel INT340X drivers & Intel RAPL-mmio power capping driver necessary as prerequisites?
* am I supposed to custom anything like importing some ACPI style configuration?
* finally, is it risky? Especially, is it worth it considering the fact that turbo boost deactivation seems to solve the issue (so far!)?

> Best,
> Nicholas
>
Take care!l0f4r0


Reply to: