You are not logged in.

#1 2023-02-28 13:05:22

a2r
Member
Registered: 2013-07-16
Posts: 24

CPU jumps only between 800MHz and 2.6GHz

Hi all,

so I've been using Arch in my desktop for a few years and also run it on my laptop since over a year. Right out-of-the-box, without configuring any power management, the system worked cool, quite and the battery lasted forever.
A few weeks ago, I wanted to dip my toes into the world of tumbleweed. So I installed it an a second partition and noticed, the CPU clock speeds are always jumping between 800MHz and 2.6GHz. See this screenshot for comparison.

I know, this is the Arch forum, and I wouldn't have asked, if a week later, Arch started to behave the same hmm See here.

Has anyone of you seen such curves before and how do I get back to the way the clock speeds behaved before?

Offline

#2 2023-02-28 13:22:40

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: CPU jumps only between 800MHz and 2.6GHz

What are the running kernels of both Tumbleweed and your current ArchLinux installation?
Do both distros use the same cpu governor(s) / driver(s)?

Can you please post here both Tumbleweed+ArchLinux journal output(s)?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2023-02-28 13:25:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: CPU jumps only between 800MHz and 2.6GHz

What are you expecting to see and why do you think this is a problem? Two different distributions behaving similarly will mostly be down to the kernel here, which kernel did you use while  "things worked out of the box" and which kernel are you using now.

Generally speaking most current processors are tuned for "race-to-idle" which simplified means if there's work to do, do it as quickly as possible so you can return to a low power/sleeping state sooner which will generally save more power.

Ah wait just saw the secondary screenshot. Looks like turbo boosting is disabled. As mentioned checking kernels is still something you'd want to do, sometimes there are also firmware bugs when leaving firmware in an undefined state, e.g. Dells are somewhat notorious for this, if kernel and governor checks turn up empty, you could try shutting down, removing the battery and the cable if possible for a few ~30ish seconds and hooking things up again.

Last edited by V1del (2023-02-28 13:29:06)

Offline

#4 2023-02-28 13:59:11

a2r
Member
Registered: 2013-07-16
Posts: 24

Re: CPU jumps only between 800MHz and 2.6GHz

First of all, thanks for the replies.

I should've mentioned, in an unscientific way, in search of the culprit I was also installing other distros, thus overwriting tumbleweed. But, the results are the same for, e.g., Debian sid.
I do however, still have the outputs of cpupower frequency-info from "when everything was okay":
Arch:

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 5.00 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 5.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 808 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

TW:

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 5.00 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 5.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 800 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

And I have these:
Arch:

/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost:0
/sys/devices/system/cpu/intel_pstate/max_perf_pct:100
/sys/devices/system/cpu/intel_pstate/min_perf_pct:16
/sys/devices/system/cpu/intel_pstate/no_turbo:0
/sys/devices/system/cpu/intel_pstate/num_pstates:43
/sys/devices/system/cpu/intel_pstate/status:active
/sys/devices/system/cpu/intel_pstate/turbo_pct:56
/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/base_frequency:2600000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:5000000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:800000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:0
/sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences:default performance balance_performance balance_power power 
/sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference:balance_performance
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:performance powersave
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:1875609
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:powersave
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:5000000
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:800000
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>

TW:

/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost:0
/sys/devices/system/cpu/intel_pstate/max_perf_pct:100
/sys/devices/system/cpu/intel_pstate/min_perf_pct:16
/sys/devices/system/cpu/intel_pstate/no_turbo:0
/sys/devices/system/cpu/intel_pstate/num_pstates:43
/sys/devices/system/cpu/intel_pstate/status:active
/sys/devices/system/cpu/intel_pstate/turbo_pct:56
/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/base_frequency:2600000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:5000000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:800000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:0
/sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences:default performance balance_performance balance_power power 
/sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference:balance_power
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:performance powersave
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:2600000
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:intel_pstate
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:powersave
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:5000000
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:800000
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>

Yes, energy_performance_preference differs between both, and TW was switching that setting depending if the power as plugged in or not, but it didn't change the graphs.

I also think it has to be something with the kernel. On Arch I am and was running linux-lts.

To clarify, I'm looking forword to having the cpu scale gradually again, like in the top of the first image. And not having half the cores sit at 2.6GHz and the rest at 800MHz. In both cases the system does clock above 2.6GHz when there is processing load.

sometimes there are also firmware bugs when leaving firmware in an undefined state, e.g. Dells are somewhat notorious for this, if kernel and governor checks turn up empty, you could try shutting down, removing the battery and the cable if possible for a few ~30ish seconds and hooking things up again.

It's an XPS15, so no (easy) battery removal for me. But either way, this wouldn't describe why it was at first "normal" on Arch when I've been switching between both systems regularly, wouldn't it?

Offline

#5 2023-02-28 14:16:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: CPU jumps only between 800MHz and 2.6GHz

firmware states can easily get affected depending on warm/cold reboots whether one or the other or both systems ever hibernated.  Since dells are somewhat notorious here, afaik another thing one could try is holding the power button for a while from a turned off state (also like 20/30 seconds)

linux-lts recently had the huge bump to 6.1 which means you basically got hit with a full year of feature and development effort at once. You  could test whether things "normalize" when downgrading linux-lts back to a 5.15 variant, and in case you'd be up for a big regression hunt. Assuming this actually is in error, the bit in my post about race to idle should generally still hold true, so unless you actually notice something off in your day to day, chances that this is actually normal and intended are very much present.

What are you doing when looking at those graphs? What happens if you start an actual/somewhat constant workload, like watching a streaming video or so?

Last edited by V1del (2023-02-28 14:41:47)

Offline

#6 2023-03-01 08:24:52

a2r
Member
Registered: 2013-07-16
Posts: 24

Re: CPU jumps only between 800MHz and 2.6GHz

V1del wrote:

What are you doing when looking at those graphs? What happens if you start an actual/somewhat constant workload, like watching a streaming video or so?

Here are some "tests". The first one shows the sequence of "Idle" i.e. no program is open. Then starting firefox and waiting for it's background processes to finish, then hitting play on Netflix.
What's interesting is, that it seems that clocks go down after hitting play. But if you look closely, it's just that after hitting play, all cores start clocking the same speeds instead of roughly half going up, half staying down.

Here is another picture of a paused-playing-paused-sequence.

V1del wrote:

Since dells are somewhat notorious here, afaik another thing one could try is holding the power button for a while from a turned off state (also like 20/30 seconds)

Since the laptop starts booting the moment you press the power button (instead of waiting on a release like usually), what I tried was: pressing the button, system starts booting, pressing it again so it immediately shuts down, holding the button, after ~15 seconds the system starts button again on it's own. But that didn't change anything.

V1del wrote:

You  could test whether things "normalize" when downgrading linux-lts back to a 5.15 variant, and in case you'd be up for a big regression hunt

Is there some kind of archive for old package? I keep only the last two versions in pacman cache and both are 6.1.x.

Offline

#7 2023-03-01 08:27:36

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: CPU jumps only between 800MHz and 2.6GHz

a2r wrote:

Is there some kind of archive for old package? I keep only the last two versions in pacman cache and both are 6.1.x.

https://wiki.archlinux.org/title/Arch_L … #/packages


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#8 2023-03-03 10:16:01

a2r
Member
Registered: 2013-07-16
Posts: 24

Re: CPU jumps only between 800MHz and 2.6GHz

So I've tried downgrading the kernel but I wasn't able to boot afterwards. I downgraded the kernel, the firmware and intel-ucode and recreated the initramfs and grub, but I got a kernel panic after grub. Therefore, I gave up on that path.

I missed the question for system logs, so here's an journal for the last boot

Offline

Board footer

Powered by FluxBB