[SOLVED] CPU frequency scaling on Tiger Lake CPUs broken?

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] CPU frequency scaling on Tiger Lake CPUs broken?

Postby bekos » 2021-01-11 01:54

Hello,

I recently bought a new laptop (Asus Zenbook 14 UX435EG) equipped with the Intel Tiger Lake processor. Unfortunately, I have a problem with the CPU frequency scaling which only appears on Linux (Windows 10 Pro is just fine).
The moment I stress the CPU fully, the system sets the frequency of all cores to 400MHz. This happens a few seconds after the CPU is fully utilised, and I am 100% sure it is not a temperature problem because the cores are bellow 65C.

If I utilise fewer cores, the frequency reduction is not that severe. I understand that I should expect some frequency reduction when the CPU is at full load, but what is happening here is not normal. The CPU temperature is low and the 2.8GHz => 0.4GHz transition happens after 2-3 seconds. To me this seems like a bug. And if that wasn't enough, it appears that the system does not respect the minimum frequency set by cpupower when the CPU is under load.

I am using Debian sid (kernel 5.10), intel_pstate driver, and the "performance" governor. Ubuntu 20.10 ( kernel 5.8 ) and has the same problem. Interestingly, this problem is not present on Intel's Clear Linux (kernel 5.9).

To bring the CPU under load I just run the following 10-30 times:

Code: Select all
python3 -c "while True: pass" &


- Can someone with a Tiger Lake laptop share their experience?
- Any idea what is causing this?
- How can I completely disable any kind of CPU frequency scaling? I tried to disable intel_pstate driver and use the userspace governor but the problem is still there.
- Any pointers on how to replicate the frequency scaling configuration of Intel's Clear Linux on Debian?

Thank you for your time.
Last edited by bekos on 2021-01-13 00:38, edited 1 time in total.
bekos
 
Posts: 8
Joined: 2013-11-06 04:04

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby LE_746F6D617A7A69 » 2021-01-11 21:31

bekos wrote:Hello,

I recently bought a new laptop (Asus UX435EG) equipped with the Intel Tiger Lake processor. Unfortunately, I have a problem with the CPU frequency scaling which only appears on Linux (Windows 10 Pro is just fine).
The moment I stress the CPU fully, the system sets the frequency of all cores to 400MHz. This happens a few seconds after the CPU is fully utilised, and I am 100% sure it is not a temperature problem because the cores are bellow 65C.

1. Temperature measurement based on built-it CPU temp. sensors is extremely inaccurate, to the point, where it can be called a "bullshit".
2. CPU internal overheating protection mechanisms are in most cases not documented.
3. Intel avoids to tell what is the thermal throttling point for Your i7-1165G7 CPU (guess why)
4. Your i7-1165G7 CPU has a "configurable TDP" - this, in conjunction with notorious bugs in ASUS Bios'es could also explain "why?"
5. You're using unstable "sid" kernel - no comments needed.
6. Microsoft is notoriously lying about their systems performance - so using Microshit's Task Manager as a reference is just hilarious.

Regards
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 421
Joined: 2020-05-03 14:16

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby stevepusser » 2021-01-11 22:00

You may find it easier to stress the hardware with s-tui in the terminal.
It may just be a quirk in that machines "BIOS", as at least one MX user has the 11th-gen CPU and hasn't mentioned that problem. Have you tried installing intel-microde, firmware-misc-nonfree, and firmware-intel-sound from non-free?
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12186
Joined: 2009-10-06 05:53

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby bekos » 2021-01-11 22:33

Hi LE_746F6D617A7A69 and steveusser,

Thank you for your responses.

LE_746F6D617A7A69:
Good points you raised there. I am just reluctant to believe that this is a thermal problem because the CPU goes down to 400MHz 1 second after I run the stress test and back to 2GHz+ 1 second after I stop the stress tests. And also, if I let the stress test run for very long, the laptop doesn't really become much hotter. Not nearly as hot as when I run video games on Windows. On Windows, I used a bunch of stress tools that overclockers use in order to investigate the issue, not only the Task Manager.

steveusser:
Thank you for pointing me to the s-tui tool. It is quite useful indeed! I will use that from now on. I guess the reason I used python to do the "stress" test before was because I didn't know how to install software on the Intel Clear Linux live environment. My Linux skills are below average. :D Can you also tell me which laptop exactly this MX user has in case I end up selling my laptop and buying a new one?

As you both mentioned, maybe it is a BIOS issue and somehow Intel Clear Linux is patched to account for this, given that Intel's distro strives for performance on Intel systems. I will check if I can upgrade or downgrade the BIOS and see.

Thank you all!

PS: yes, all firmware (including non-free) and microcode are installed.
bekos
 
Posts: 8
Joined: 2013-11-06 04:04

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby bekos » 2021-01-12 10:57

Hi all,

I just want to give you an update. After trying a million of things, turns out the solution was very simple actually. After running "apt-get install thermald" everything started to work as expected! Quite embarrassing. I have installed Debian on another 4 laptops the past 6 years and I never had to install this package manually. Maybe the previous laptops didn't need it, or it was installed as a dependency of some other package.

Thanks everybody for your help!
bekos
 
Posts: 8
Joined: 2013-11-06 04:04

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby Head_on_a_Stick » 2021-01-12 15:26

Please edit the title of the thread and prepend [SOLVED], I'm sure this will be useful for others.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13062
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby LE_746F6D617A7A69 » 2021-01-13 21:34

bekos wrote:Hi all,

I just want to give you an update. After trying a million of things, turns out the solution was very simple actually. After running "apt-get install thermald" everything started to work as expected! Quite embarrassing. I have installed Debian on another 4 laptops the past 6 years and I never had to install this package manually. Maybe the previous laptops didn't need it, or it was installed as a dependency of some other package.

Thanks everybody for your help!
I think that You should define what does it mean "works as expected" for You - this means nothing unless You define this term.

Your BIOS apparently has a bug, OR Your system has a serious problem with cooling the CPU: 65deg.C @ 400MHz? - this can only mean a damaged CPU, insufficient cooling OR incorrect temperature readings.

There are 2 (*) main methods for controlling the CPU power consumption:
1. Variable base CPU clocking - this is what Linux kernel uses by default.
2. p-states: the difference between changing the p-states and changing the main CPU clock is that instead of lowering the "global" CPU clock, the power-saving software disables some parts of CPU hardware, without changing the main clock. In the effect, the reported CPU freq. does not change, but the *effective* performance of the CPU is lowered.

In other words: it does not matter if You're using thermald: Your CPU will always slow-down, even if it's global clock is unchanged.

This situation is similar to thermal throttling:
If f.e the CPU is clocked @2GHz and it it reaches the critical temperature, then it starts to skip every second clock pulse (typically) , what means that it *effectively* runs @1GHz - but the reported core clock is still 2GHz ;)

(*) ~20 years ago, before any power-saving technologies were invented, there was a program called "Rain" - it have periodically injected the halt asm instruction, to slow down the CPU - and to limit the power consumption.
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed
LE_746F6D617A7A69
 
Posts: 421
Joined: 2020-05-03 14:16

Re: CPU frequency scaling on Tiger Lake CPUs completely brok

Postby bekos » 2021-01-13 23:48

Hello LE_746F6D617A7A69 and thanks for the interesting comments!

- By "work as expected" I mean to not go from ~3GHz@~50C => 0.4GHz@~50C almost instantly when I start 20 threads sunning a simple loop. I would expect this to happen if the CPU was broken or didn't have any heatsink.
- Typo on the temperature. Make that ~46-48 Sorry! :D
- I understand what you are saying about the p-states and that frequency does not reflect effective performance.
- I don't really understand what thermald is doing to "fix" the issue. Nevertheless, after installing it, not only the frequency stays above 2GHz, but also the effective performance (in terms of FLOPS) is what I was expecting it to be.
- My suspicion is, as you already mentioned, that the BIOS has a bug, and I would be really interested to dig further and try to understand how thermald "fixes" the problem, but I am just too busy these days :mrgreen: Regardless, I reported the issue to ASUS (although they don't really have Linux support) just in case something changes.

Thanks again for the very educational comments!
bekos
 
Posts: 8
Joined: 2013-11-06 04:04


Return to Hardware

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable