CPU frequency scaling tool not changing governor on my i5-4200M processor

Moderator: Forum moderators

Post Reply
User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by Dingo »

Woof Woof!

It seems that changing governor with frequency scaling tool is not working on my Lenovo L440 processor (i5-4200M)

lscpu output

Code: Select all

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz
Stepping:              3
CPU MHz:               3066.406
CPU max MHz:           3100,0000
CPU min MHz:           800,0000
BogoMIPS:              4993.26
Virtualization:        VT-x
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts

default settings for this CPU is performance

Code: Select all

root# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
performance
capture11990.png
capture11990.png (36.82 KiB) Viewed 775 times

I change to powersave,

capture13064.png
capture13064.png (31.94 KiB) Viewed 775 times

reboot and...

Code: Select all

root# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
performance

governor is still settled to performance

I'm currently trying to change governor with other tools

Code: Select all

root#  cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
cat: /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies: No such file or directory

Code: Select all

root#  cat /sys/devices/system/cpu/intel_pstate
cat: /sys/devices/system/cpu/intel_pstate: Is a directory

available governors on this CPU seem to be only two:

Code: Select all

root# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors
performance powersave

maybe I will have more luck with cpupower or other tools

User avatar
mikewalsh
Moderator
Posts: 5610
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 582 times
Been thanked: 1703 times

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by mikewalsh »

@Dingo :-

I can't remember who first mentioned this, but the info IS floating around the new forum somewhere.

I made exactly the same mistake myself. Years of running an AMD system and using the frequency scaling governor had led ME to believe it should be used with any and EVERY processor, regardless. Not so....

This new HP Pavilion is utilising a Pentium 'Gold' G5400 'quad-core' (dual to be precise, but with HyperThreading that allows it to act like a quad-core). My last Intel CPU was a Pentium 4.....and 'SpeedStep' didn't even exist in those far-off days.

Apparently, Intel's 'p_state' governor works far better on its own than the CPU scaling governor ever will; in fact, if you try to use the scaling governor on any Intel 'Core' CPU - regardless of generation - it'll lock the CPU into the low-power state, and you won't be able to get out of it. (Obviously, there must BE a way to 'reset' that stuff, but I don't happen to know which files need deleting; when it happened to me, I was at an early enough stage of the install that it was simpler just to start over again.....) Somebody is bound to know.

The G5400 has just two governer 'states'; 800 MHz, and 3.7 GHz. In reality (if you have pmcputemp running in the tray, you can actually watch this by hovering the cursor over it), the 'p_state' governor has multiple 'steps' to its implementation; mostly up in the top half of the scale, it's true.....but they ARE there.

I just let well alone these days, and leave it to its own devices.....!! :shock: :lol: It never gets much above the high 30s/low 40s C, temperature-wise, so that'll do me.

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
norgo
Posts: 253
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 5 times
Been thanked: 93 times
Contact:

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by norgo »

@Dingo
intel_pstate has never worked for me independent what governor.

Here is what I am using:
I boot with option intel_pstate=disable
and run the slightly modified start_cpu_freq script. ( /etc/init.d/start_cpu_freq )
additional I disable CPU turbo boost.
Try it out to comparison, hope the kernelmodules are present in your kernel version.

Code: Select all

[ -f /sys/devices/system/cpu/cpufreq/boost ] && echo 0 > /sys/devices/system/cpu/cpufreq/boost

if [ ! -d /proc/acpi ] ; then
 FLAGEXIT='yes'
else
 [ `dmidecode -s "bios-release-date" | cut -f 3 -d '/' | rev | cut -c 1,2 | rev` -lt 7 ] && FLAGEXIT='yes'
fi
if [ "$FLAGEXIT" = "yes" ] ; then
 exit
fi

FREQMODS="acpi-cpufreq"

case "$1" in
 start)
  for ONEMOD in $FREQMODS
  do
   modprobe $ONEMOD
   if [ $? -eq 0 ];then
    modprobe cpufreq_conservative
    if [ $? -eq 0 ];then
     for CPUNUM in `ls -1 /sys/devices/system/cpu/ | grep 'cpu[0-9]' | tr '\n' ' '`
     do
      echo conservative >/sys/devices/system/cpu/$CPUNUM/cpufreq/scaling_governor
     done
     break
    else
     rmmod $ONEMOD
    fi
   fi
  done
 ;;
esac
User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by Dingo »

I have an USB install, so, pstate paramer should be putted somewhere, maybe in syslinux.cfg

To revert the behavior of governor can I simply delete the script and enable again pstate?

User avatar
mikewalsh
Moderator
Posts: 5610
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 582 times
Been thanked: 1703 times

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by mikewalsh »

@norgo , @Dingo :-

I would guess the scaling governor stuff is more important if you're running a laptop.....or, indeed, any kind of battery-powered device, since it would affect the battery charge levels directly.

When you're running a desktop - which is, of course, mains only - it's nowhere near as critical. And since the other aspect of frequency scaling - control of heat-production - seems (at least for me) to be well under control, that's WHY I leave it to its own devices.....

-------------------------------------

Dingo:-

Whichever bootloader you use, the

Code: Select all

intel_pstate=disabled

....parameter would want to go on the kernel line (where all the other Puppy 'p' parameters go....like 'pfix=fsck', 'pfix=ram', 'pfix=atahd/usbhd/whatever', etc, etc. All THAT stuff...) Just tack it on the end (after a space, of course).

If you then wanted to go back to the standard 'pstate' behaviour, you'd just delete that parameter again.

Shouldn't make a scrap of difference if you use this from a USB 'frugal', or a hard drive install. This is 'boot-time' stuff, before Puppy even begins to get underway.

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by Dingo »

@norgo
@mikewalsh
Thanks to you. I disabled intel pstate at boot. Disabling intel pstate, CPU power is managed by driver
acpi-cpufreq

And its default governor is on demand that, with my CPU, provides frequencies from 800 Mhz to 2,5 Ghz and that is far more than enough for my daily tasks. Temperatures also sensibly descended, before, with performance governor, temps on my laptop thnkpad L440 stayed around 45-46 c°, now temps seem to stay around 37-40 c°

I'll try to modify default settings for on demand (modifying actual max - 2500, to 3100, max for my CPU) in order to have more power in case of intensive tasks, e.g. compiling, otherwise, for now, I'm happier with. acpi-cpufreq than with intel_pstate

User avatar
norgo
Posts: 253
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 5 times
Been thanked: 93 times
Contact:

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by norgo »

@Dingo
governor conservative is the better choice

User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: CPU frequency scaling tool not changing governor on my i5-4200M processor

Post by Dingo »

norgo wrote: Sat Jan 16, 2021 2:56 pm

@Dingo
governor conservative is the better choice

I only made a quick test before the lunch, these days I'll try with conservative

EDIT

YUUUP! conservative is far more better! temps stay cooler than with ondemand and I have no slowdown for simple daily tasks like web browsing

Post Reply

Return to “Xenial”