[RESPONDED] Kernel 6.2, some CPUs at 2.5 GHz even when idle

Ubuntu 22.04.3 LTS, kernel 6.2.0-34-generic

A picture worth a thousand words, so:

You can see that even when idle, some cores continiously run at 2.5 GHz, which can be seen as a flat line on the middle graph. This is very different from kernel 5.15 where idle cores remain somewhere near 700-800 Mhz.

I’ve seen this behaviour for quite a while, so I normally use 5.15. Today I rebooted to 6.2 only to find that the issue is still here.

Any ideas on the issue?

Wild guess:

Might it be that its a reporting error, the cpu only has 8 logical cores right, so the other 8 are hyperthreading or whatever it called. No clue where to go with that as only 7 of yours are not running with 2,5 GHz.

I’m curious why some people prefer to use non-LTS kernels on LTS distributions, using Fedora/Debian Sid/Arch theoretically has fewer problems, just some personal opinions.

Hi @Korvin ,

Is the 2.5 GHz idle consistent even with fedora 37 and 38?

Well, kernel 5.15 is working just fine, so it probably has nothing to do with that. Also the thing is, the cores running at 2.5 are changing all the time. It could be P core or E core.

I didn’t try other distros, only (K)Ubuntu, but apparently I’ve experienced the same behavior even on 5.19 half a year ago.

A couple of thoughts:

  • What CPU model is that?
  • What’s the source of data for these graphs? turbostat? If not, I would first verify with that command-line tool that it sees at least roughly the same frequencies (in the Bzy_MHz column).
  • Are you using TLP? If so, what are the CPU_ENERGY_PERF_POLICY_ON_BAT/CPU_ENERGY_PERF_POLICY_ON_AC settings?
  • Can you execute in the terminal: cat /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference to verify the current settings?
  • I would also verify the current settings of /sys/devices/system/cpu/intel_pstate/min_perf_pct, /sys/devices/system/cpu/intel_pstate/max_perf_pct, /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq, /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq, and, for a good measure, /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
  • It wouldn’t surprise me if you see some of these settings being different between the two kernels…
1 Like

12th Gen Intel(R) Core™ i7-1260P

It’s standard KDE sensor applets. I’m pretty sure they’re accurate. As I mentioned before, kernel 5.15 shows correct readings.

Just in case here’s the output of KSysGuard

And here’s htop

korvin@sigma:~$ cat /etc/tlp.conf | grep CPU_ENERGY_PERF_POLICY_ON_BAT
#CPU_ENERGY_PERF_POLICY_ON_BAT=balance_power
korvin@sigma:~$ cat /etc/tlp.conf | grep CPU_ENERGY_PERF_POLICY_ON_AC
#CPU_ENERGY_PERF_POLICY_ON_AC=balance_performance

Everything is balance_performance.

korvin@sigma:~$ cat /sys/devices/system/cpu/intel_pstate/min_perf_pct
10
korvin@sigma:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
400000
400000
..
(others are the same)
korvin@sigma:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
4700000
3400000
3400000
3400000
3400000
3400000
3400000
4700000
4700000
4700000
4700000
4700000
4700000
4700000
3400000
3400000
korvin@sigma:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
..
(others are the same)

On 6.2 kernel, even when I run on battery, some CPUs still clocked at 2.5 GHz.

Thank you for supplying the additional info. I have to admit that it’s a bit of a mystery as I don’t see any obvious culprit in your data.

I have a 13th Gen i5-1340P which is just like yours when it comes to the number of P/E cores and I don’t see anything like this: on my system the cores idle at 400 MHz (as evidenced using cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq).

Looking back at your first image from your top post, there appears to be a strong correlation between cores being idle and reporting running at 2.5 GHz (it’s not perfect though: cores 9 and 15 are exceptions).

I can’t help wondering if the kernel 6.2 might be simply misreporting the CPU frequency of idle cores for some reason? I would expect CPU cores running at 2.5 GHz to be hotter than reported in your picture; is the reported power draw consistent with an idle CPU or with one running at 2.5 GHz?

Is there any chance you could try booting an even newer kernel, like 6.4 or 6.5, to see if that helps? For what it’s worth, I’m running 6.5.2 here (on a Gentoo Linux system).

1 Like

I also think this is a bug in the kernel. Nearly half of the cores constantly running at such a high freq should negatively affect the power draw, which apparently they don’t (especially when battery powered).

Ok, will try newer kernels to see if it helps.

Ok, I’ve just installed the 6.5.0-1004-oem kernel and it was partially successful.

The good news is the core frequencies are now back to normal:

The bad news are:

  1. backport-iwlwifi-dkms no longer builds for the OEM kernel, so my wifi is dead now.
  2. Once put to S2 sleep, it’s impossible to bring it back to life — looks like the keyboard and all peripherals were shut down completely.

Alas. Welp, at least now we know that newer kernels do indeed solve the issue.