2

I want to limit my CPU clock speed, but it ignores all the settings I apply. I tried using cpufreq and cpupower and the following commands:

sudo sh -c 'echo 1500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq'
sudo sh -c 'echo 1500000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq'
sudo sh -c 'echo 1500000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq'
sudo sh -c 'echo 1500000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq'

I've tried all governors, but it still goes over the limit I set. it was working fine with windows 10 (by setting the maximum state to 60-70%)

cpu: i5-2410m

popey
  • 24,607
  • 1
    Your shell command should have worked, but maybe something else in the backgroung is changing it back. Have a look, and let us know, grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq and show us the actual CPU frequency, grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq. And show us which CPU frequency scaling driver, grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver. And it's details, grep . /sys/devices/system/cpu/intel_pstate/* if it is the intel_pstate driver, for example. – Doug Smythies Oct 18 '24 at 23:40
  • /sys/devices/system/cpu/cpu/cpufreq/scaling_max_freq' $ grep . /sys/devices/system/cpu/cpu/cpufreq/scaling_max_freq 1500000 (all cores) $ grep . /sys/devices/system/cpu/cpu/cpufreq/scaling_driver intel_cpufreq (all cores) $ grep . /sys/devices/system/cpu/intel_pstate/ max_perf_pct: 100 min_perf_pct: 27 no_turbo: 0 num_pstates: 22 status: passive turbo_pct: 28 – newlinuxuser Oct 19 '24 at 05:56
  • its using the intel_cpufreq scaling driver – newlinuxuser Oct 19 '24 at 06:08
  • 1
    Everything looks fine for a max CPU frequency of 1.5 GHz. I made a mistake in my comment for what are you actually seeing? It should be grep . cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq – Doug Smythies Oct 19 '24 at 14:26
  • vaio@vaio-vpcca15fa:~$ grep . cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq grep: cat: No such file or directory /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:798743 /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq:1078542 /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq:851213 /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:1229554 vaio@vaio-vpcca15fa:~$ – newlinuxuser Oct 20 '24 at 10:10
  • it says that its max frequency is 1.5Ghz. but when there is actual load it acts like if there is no limit. i checked grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq while there is load. it still says 1500000 – newlinuxuser Oct 20 '24 at 10:13
  • running grep . cat /sys/devices/system/cpu/cpu/cpufreq/scaling_cur_freq while under load: vaio@vaio-vpcca15fa:~$ grep . cat /sys/devices/system/cpu/cpu/cpufreq/scaling_cur_freq grep: cat: No such file or directory
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:2693895 /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq:2693751 /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq:2693880 /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:2693880
    – newlinuxuser Oct 20 '24 at 10:21
  • 1
    try this: echo 51 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct. The two methods for setting the max CPU frequency are supposed to be coupled, but for some kernel versions they weren't. What kernel version? – Doug Smythies Oct 20 '24 at 14:50
  • echo 51 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct doesnt work. should i change my kernel? – newlinuxuser Oct 21 '24 at 12:07
  • my kernel version is 6.8.0-47-generic – newlinuxuser Oct 21 '24 at 14:35
  • just upgraded to 24.10 with the 6.11 kernel. still nothing works. – newlinuxuser Oct 21 '24 at 17:50
  • 1
    I am running out of ideas. As far as I can determine, your maximum CPU frequency should be limited to what you have asked for. – Doug Smythies Oct 21 '24 at 18:55
  • maybe i forgot to restart it after updating because i tried it today and it WORKED PERFECTLY!. thank you SO MUCH for the help. i can finally browse peacefully without my laptop cosplaying as a desktop furnace – newlinuxuser Oct 22 '24 at 10:04

0 Answers0