CPU clock run on minimum while being set to 'Performance'

hello
not sure if it’s since i changed to the 6.1 Kernel,
but i just checked the cpu clock speed with these commands:
watch -n1 "grep \"^[c]pu MHz\" /proc/cpuinfo"
watch -n1 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
and i get the minimum speed on all clocks(2200 MHz)with random spikes on different cores to the Max speed(4200MHz).

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor                                                                          

performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
performance
cpupower frequency-info
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 - 4.10 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 4.10 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.20 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

I’d like all cores to run at full speed all the time like it was before.

inxi -Fazy --no-host

System:
Kernel: 6.1.7-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
root=UUID=a445c87d-e6a9-47fd-9601-614f3b3e7781 rw quiet apparmor=1
security=apparmor resume=UUID=29e42246-1548-46dd-91f5-17d1f76c7bfd
udev.log_priority=3
Desktop: KDE Plasma v: 5.26.5 tk: Qt v: 5.15.8 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Laptop System: ASUSTeK product: TUF Gaming FX705GD_FX705GD v: 1.0
serial:
Mobo: ASUSTeK model: FX705GD v: 1.0 serial:
UEFI: American Megatrends v: FX705GD.306 date: 05/25/2020
Battery:
ID-1: BAT0 charge: 54.1 Wh (100.0%) condition: 54.1/64.1 Wh (84.4%)
volts: 15.5 min: 15.6 model: Simplo SDI ICR18650 type: Li-ion
serial: status: full cycles: 41
CPU:
Info: model: Intel Core i7-8750H bits: 64 type: MT MCP arch: Coffee Lake
gen: core 8 level: v3 note: check built: 2018 process: Intel 14nm family: 6
model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xF0
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
L3: 9 MiB desc: 1x9 MiB
Speed (MHz): avg: 2200 min/max: 800/4100 scaling: driver: intel_pstate
governor: performance cores: 1: 2200 2: 2200 3: 2200 4: 2200 5: 2200 6: 2200
7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200 bogomips: 52815
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
Type: retbleed mitigation: IBRS
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
sanitization
Type: spectre_v2 mitigation: IBRS, IBPB: conditional, RSB filling,
PBRSB-eIBRS: Not affected
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK
driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:3e9b
class-ID: 0300
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: ASUSTeK
driver: nvidia v: 525.85.05 alternate: nouveau,nvidia_drm non-free: 525.xx+
status: current (as of 2022-12) arch: Pascal code: GP10x process: TSMC 16nm
built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3
speed: 8 GT/s ports: active: none empty: HDMI-A-1 bus-ID: 01:00.0
chip-ID: 10de:1c8d class-ID: 0300
Device-3: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo
bus-ID: 1-11:4 chip-ID: 13d3:56a2 class-ID: 0e02 serial:
Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7
compositor: kwin_x11 driver: X: loaded: modesetting,nvidia dri: iris
gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: eDP-1 model: AU Optronics 0x429d built: 2018 res: 1920x1080
hz: 60 dpi: 128 gamma: 1.2 size: 382x215mm (15.04x8.46") diag: 438mm (17.3")
ratio: 16:9 modes: 1920x1080
API: OpenGL v: 4.6 Mesa 22.3.3 renderer: Mesa Intel UHD Graphics 630 (CFL
GT2) direct render: Yes
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK
driver: sof-audio-pci-intel-cnl
alternate: snd_hda_intel,snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
chip-ID: 8086:a348 class-ID: 0403
Sound API: ALSA v: k6.1.7-1-MANJARO running: yes
Sound Server-1: JACK v: 1.9.21 running: no
Sound Server-2: PulseAudio v: 16.1 running: yes
Sound Server-3: PipeWire v: 0.3.64 running: yes
Network:
Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
IF: wlo1 state: down mac:
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac:
Bluetooth:
Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
driver: btusb v: 0.8 bus-ID: 1-14:5 chip-ID: 8087:0aaa class-ID: e001
Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: see --recommends
Drives:
Local Storage: total: 476.94 GiB used: 54.38 GiB (11.4%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: RBUSNS8154P3512GJ
size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s
lanes: 2 type: SSD serial: rev: E8FK11.C temp: 45.9 C scheme: GPT
Partition:
ID-1: / raw-size: 467.84 GiB size: 459.43 GiB (98.20%)
used: 54.38 GiB (11.8%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
System Temperatures: cpu: 54.0 C pch: 47.0 C mobo: N/A
Fan Speeds (RPM): cpu: 0
Info:
Processes: 265 Uptime: 29m wakeups: 1 Memory: 15.48 GiB
used: 2.68 GiB (17.3%) Init: systemd v: 252 default: graphical
tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
pkgs: 1475 libs: 403 tools: pamac pm: flatpak pkgs: 0 Shell: Zsh v: 5.9
running-in: konsole inxi: 3.3.24

Thanks.

EDIT:
i don’t have TLP.

should in add intel_pstate=active to Grub?
or is it just a case of wrong reporting buy those two commands mentioned above?

Cpupower confirms performance scaling governor is using CPU frequencies 800 MHz - 4.10 GHz.

To set the CPU to run at a single frequency:

sudo cpupower frequency-set -f 4.10GHz

This setting is not persistent and will be reset when system is reboot

CPU frequency changes can be made permanent by using cpupower systemd service

The maximum and minimum frequencies can be set in /etc/default/cpupower

sudo nano +7 /etc/default/cpupower

Uncomment and edit minimum and maximum frequencies from this:

#min_freq="3.5GHz"
#max_freq="3GHz"

to this:

min_freq="4.10GHz"
max_freq="4.10GHz"

save changes and exit text editor
and enable and start cpupower.service

systemctl enable --now cpupower.service

cpupower frequency-info should now report: “frequency should be within 4.10 GHz and 4.10 GHz”

CPU frequency scaling - Setting maximum and minimum frequencies - ArchWiki

1 Like

Thanks
I’m a bit concerned about forcing the CPU to a certain speed and would have preferred it being done automatically.

i may give it a try later on,so thanks for the detailed steps to follow.

what does +7 means?

From the man page.

When giving a filename on the command line, the cursor can be put on a specific line by adding the line number with a plus sign (+) before the filename, and
even in a specific column by adding it with a comma. (Negative numbers count from the end of the file or line.) The cursor can be put on the first or last
occurrence of a specific string by specifying that string after +/ or +? before the filename. The string can be made case sensitive and/or caused to be in‐
terpreted as a regular expression by inserting c and/or r after the + sign. These search modes can be explicitly disabled by using the uppercase variant of
those letters: C and/or R. When the string contains spaces, it needs to be enclosed in quotes. To give an example: to open a file at the first occurrence
of the word “Foo”, you would do:
nano +c/Foo file

1 Like

Post #1 requested all cores to run at full speed all the time

To revert to using performance scaling governor temporarily

systemctl stop cpupower.service

If the service is still enabled it will be restarted when system is rebooted

If you want to try different configurations for cpupower you might prefer to install cpupower-gui from AUR instead of editing configuration in text editor

indeed,and i was able to achieve that by editing /etc/default/cpupower with the Performance option and enabling cpupower.service, which worked fine until a sometime ago.
(by your suggestion: Too silent fans? - #5 by nikgnomic )

Post #6 of previous discussion includes a link to a stack exchange question from 2018 with a good explanation of changes for CPU drivers and governors

What are the implications of setting the cpu governor to performance

Back in the old cpufreq driver days, there were two kinds of governors: dynamic ones and static ones. The difference was that dynamic governors (ondemand and conservative) could switch between CPU frequencies based on CPU utilization whereas static governors (performance and powersave) would never change the CPU frequency.

However, as you have noticed, with the new driver

this is clearly not the case.

This is because the new driver, which is called intel_pstate, operates differently. The p-states aka operation performance points involve active power management and race to idle which means scaling voltage and frequency.

The stack exchange question was also re-posted in another topic in Dec 2020
About the cpu scaling governor/performance policy and TLPUI

running the following command yields this message:

sudo cpupower frequency-set -f 4.10GHz                                                                            237 ✘  5s  
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?

Try this to change minimum clock frequency to same value as maximum frequency

sudo cpupower frequency-set -d 4.10GHz 

i went to /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq and checked all the cores and they all seem to be running at around 3900000; so maybe the reading of this command watch -n1 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq is not acurate.

I was trying to find more information about CPU frequencies for i7-8750H and found this on Dell website

https://www.dell.com/community/XPS/Why-does-the-i7-8750H-processor-not-work-at-full-power/m-p/6184981#M18006

4.2 GHz is achieved ONLY with a single core active. It cannot be achieved with multiple cores running.
With more than one core active 3.9 GHz is the max.

Intel’s specs page for this CPU here indicates that the max CPU frequency is 4.1 GHz, not 4.2 GHz – but note that that’s the “Turbo Frequency”. Turbo frequencies are only meant to be achieved under certain conditions in terms of how many cores are loaded, CPU temp, etc., and even then often only for bursts of time. Some systems don’t have enough thermal capacity to ever achieve the max turbo frequency. By comparison, the base frequency shown on that same specs page is 2.2 GHz. THAT’S what you should expect to see on a pretty regular basis when your system is working on a CPU-intensive workload

Thank you for looking into that.
as i mentioned it was possible for me to see all cores reporting 4.2 GHz until some time ago.
i’m not sure what happened; is it a Kernel issue, or something in one of the latest updates,or is it just a false reading of the core clock with the commands i mentioned,
but browsing manually to the location of each core and checking scaling_cur_freq shows 3.9~ MHz which is good enough.
at some point i’ll try editing the :

min_freq="4.10GHz"
max_freq="4.10GHz"

like you suggested.

also i’m not sure how accurate is what they’re saying on the forum you linked to,since on Windows you can set the Power plan to Performance which will make the clocks run at full speed all the time,as opposed to Balanced .

The Comment on Dell forum has a link to Intel specifications showing the Max Turbo Frequency for a single core is 4.1 GHz
No previous mention of 4.2 GHz in this post
And inxi data from your previous posts shows CPU frequency range min/max: 800/4100 MHz

I suggest you post response to this command sequence to show all available power states for core 0, 2 and 10

sudo systemctl -c 0 frequency-info;  sudo systemctl -c 2 frequency-info; sudo systemctl -c 10 frequency-info

I would expect response for core 0 to show maximum frequency Pstate-Pb0: 4100MHz (boost state), but response for core 2 and 10 to show a lower maximum frequency for Pstate-Pb0

If responses also confirm other CPUs are running at the same hardware frequency it may be possible to deduce the frequencies for all other cores

i get this when trying to run this command:
systemctl: invalid option -- 'c'

Apologies. I got the commands mixed up

sudo cpupower -c 0 frequency-info;  sudo cpupower -c 2 frequency-info; sudo cpupower -c 10 frequency-info