LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   CPU frequency governor configuration (https://www.linuxquestions.org/questions/linux-software-2/cpu-frequency-governor-configuration-4175557848/)

yanf81 11-03-2015 04:55 AM

CPU frequency governor configuration
 
Hi,
I would like to change the governor to "performance", but I don't even have the directory "cpufreq" under /sys/devices/system/cpu/cpuX/.

The only reason that made me believe that I work with "ondemand" governor is the fact that my kernel (4.1.6-200.fc22.x86_64) is configured with the below flag:
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y

Is there a way to change the governor type without recompiling the kernel?

Any suggestions will be highly appreciated.

Thanks
Yan

Keruskerfuerst 11-03-2015 05:15 AM

Have a look here:

https://wiki.archlinux.org/index.php...quency_scaling

yanf81 11-03-2015 07:14 AM

I already read this page, but unfortunately there is no explanation regarding what should be done if the cpufreq dir is missing.

Keruskerfuerst 11-03-2015 10:08 AM

You have to install cpufreq utils.

What distro are you using?

yanf81 11-03-2015 01:09 PM

I am using Fedora 22. Actually I already installed the cpu freq utills but the directory still didn't show up.

yanf81 11-04-2015 08:55 AM

Quote:

Originally Posted by Keruskerfuerst (Post 5444099)
You have to install cpufreq utils.

What distro are you using?

hi,
could you please comment on my answer.
Thanks

RockDoctor 11-05-2015 04:20 PM

Have you looked at this?

yanf81 11-05-2015 11:12 PM

Sure, it simply doesnt work. It prints CPU0 with empty info and thats all.

RockDoctor 11-06-2015 03:50 PM

Interesting. I'm running Rawhide (kernel 4.3.0-1.fc24.x86_64), and I get
Code:

~$ cpupower frequency-info --governors
analyzing CPU 0:
conservative userspace powersave ondemand performance
~$ cpupower frequency-set --governor ondemand
Subcommand frequency-set needs root privileges
~$ sudo cpupower frequency-set --governor ondemand
Setting cpu: 0
Setting cpu: 1
~$

However, I don't know if anything actually changed. I also get
Code:

~$ sudo cpupower info
System does not support Intel's performance bias setting
analyzing CPU 0:
~$

CPU is an AMD Athlon X2 5400+

yanf81 11-08-2015 08:05 AM

So, perhaps its a Linux bug and looks like not in a single distro.

metaschima 11-08-2015 12:18 PM

Post more info about your system. Do you have any of the x86 CPU frequency scaling drivers in the kernel ?

I wrote a small howto here:
http://docs.slackware.com/howtos:har...quency_scaling

The directory won't show up unless you have the drivers that support your system.

yanf81 11-09-2015 02:07 AM

Hi here is some more info. First, below I paste the kernel flags related to FREQ configuration.
Next, I show the related modules I have. BTW, when I tried loading any of the modules (using modprobe) I didn't get any errors but ! I didnt get any change either.

I really want to work with a standard kernel without any additional compilations etc...

Thanks in advance..

[root@magma14 ~]# cat /boot/config-4.1.6-200.fc22.x86_64 | grep FREQ
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_X86_PCC_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_AMD_FREQ_SENSITIVITY=m
CONFIG_PM_DEVFREQ=y
# DEVFREQ Governors
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m
# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
# CONFIG_DEVFREQ_GOV_USERSPACE is not set
# DEVFREQ Drivers
# CONFIG_PM_DEVFREQ_EVENT is not set



[root@magma14 ~]# /sbin/modinfo /lib/modules/$(uname -r)/kernel/drivers/cpufreq/* | grep "^[fd]"
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/acpi-cpufreq.ko.xz
description: ACPI Processor P-States Driver
depends:
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/amd_freq_sensitivity.ko.xz
description: AMD frequency sensitivity feedback powersave bias for the ondemand governor.
depends:
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/cpufreq_stats.ko.xz
description: Export cpufreq stats via sysfs
depends:
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/p4-clockmod.ko.xz
description: cpufreq driver for Pentium(TM) 4/Xeon(TM)
depends: speedstep-lib
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/pcc-cpufreq.ko.xz
description: Processor Clocking Control interface driver
depends:
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/powernow-k8.ko.xz
description: AMD Athlon 64 and Opteron processor frequency driver.
depends:
filename: /lib/modules/4.1.6-200.fc22.x86_64/kernel/drivers/cpufreq/speedstep-lib.ko.xz
description: Library for Intel SpeedStep 1 or 2 cpufreq drivers.
depends:

metaschima 11-15-2015 12:03 PM

What about the 'X86_INTEL_PSTATE' driver ?

Also, what processor do you have Intel/AMD make, model ?

Also, check your UEFI/BIOS settings and make sure cpu frequency scaling is enabled.


All times are GMT -5. The time now is 01:17 PM.