You are not logged in.

#1 2012-05-29 11:44:39

dukeha
Member
Registered: 2012-04-11
Posts: 5

cpufreq not loading governor nor changing frequency

Hi there,
I have an ASUS N55SF and I want to have control over my CPU frequency but I just cant get it to work.

I followed the cpufreq tutorial on ArchWiki but no success.

Here is my setup:

ArchLinux with KDE on ASUS N55SF
I installed cpufrequtils from the official database

/etc/rc.conf

MODULES=(acpi-cpufreq cpufreq_powersave cpufreq_userspace)
DAEMONS=(syslog-ng !network  dbus networkmanager @alsa @crond @cpufreq @bumblebeed)

/etc/conf.d/cpufreq

#configuration for cpufreq control

# valid governors:
#  ondemand, performance, powersave,
#  conservative, userspace
governor="ondemand"

# valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="800MHz"
max_freq="1000MHz"

#userspace frequency
freq=800MHz


but when I ask cpufreq-info with root I get this info for every core

analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 1000 MHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 1.80 GHz (asserted by call to hardware).

Here is the problem, I get the governor "userspace" and the current CPU frequency is 1.80 GHz but it should be "ondemand" within 800-1000MHz.

So whats the deal???

Offline

#2 2012-05-29 12:08:32

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,363

Re: cpufreq not loading governor nor changing frequency

You are running the ondemand governer but haven't added it to your MODULES in rc.conf


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#3 2012-05-29 12:23:10

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: cpufreq not loading governor nor changing frequency

@Roken: ondemand isn't a module, it's in the kernel, so no need to add it to MODULES. It'd the default actually, so no need to do anything but load the acpi_cpufreq module. And starting with kernel 3.4, not even that will be necessary, as auto-detection for scaling modules has been added.

@dukeha: Have you tried switching manually? As root:

for i in `seq 0 7`; do 
  echo ondemand > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor
done

You can check which governors are available with

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

Last edited by Gusar (2012-05-29 12:26:01)

Offline

#4 2012-05-29 13:28:11

dukeha
Member
Registered: 2012-04-11
Posts: 5

Re: cpufreq not loading governor nor changing frequency

@Roken - thank you for your hint to add the ondemand governor, but like Gusar said there is no need to do that because it is already implemented.

@Gusar - I tried now this commands as root

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor

and here the output of cpufreq-info as root

analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 1000 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.80 GHz (asserted by call to hardware).

So the governor changed for all cores to "ondemand" but the cpu frequency is still the same at 1.8 GHz

then I did your second command

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

and got this output

userspace powersave ondemand performance

thx for helping
;-)

Offline

#5 2012-05-29 13:55:40

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: cpufreq not loading governor nor changing frequency

I'm not familiar with cpufreq-utils, but it's possible it's showing that the freq is 1.8GHz *literally* as it says - currently. But with ondemand, the freq changes in millisecond intervals.

Check this

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

It should give you mostly the top and bottom freqs, and a little bit everything in between. On my machine right now:

2926000 571590
2793000 22
2660000 22
2527000 5
2394000 19
2261000 146
2128000 24
1995000 152
1862000 155
1729000 155
1596000 316
1463000 568
1330000 497
1197000 2108838

Offline

#6 2012-05-29 16:09:17

z0id
Member
From: Romania
Registered: 2010-02-02
Posts: 122

Re: cpufreq not loading governor nor changing frequency

You also set your max_freq="1000MHz", while your CPU seems to be able to do 2.20Ghz. Also, you can try cpupower, which is not deprecated, unlike cpufreq.


/usr/bin/drinking

Offline

#7 2012-05-29 16:54:00

dukeha
Member
Registered: 2012-04-11
Posts: 5

Re: cpufreq not loading governor nor changing frequency

@Gusar

thx again, I tried your command

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

but it tells me No such file or directory

about your question that the 1.8GHz is just displayed *literally*, I can say no because I also have i7z running to check the frequency and it tells the same


@z0id

I think your suggestion to switch to cpupower seems a good idea. I just read that it should work very good with intel i7

I found the official package in the ArchDatabase but I can not find any tutorial about how to set the frequencys or how to work with cpupower.

Can somebody give me an update on how to use cpupower please!!!

Offline

#8 2012-06-01 14:45:03

dukeha
Member
Registered: 2012-04-11
Posts: 5

Re: cpufreq not loading governor nor changing frequency

like I said, I have no idea how to work with cpupower and I could not find any tutorial for it so I switched back to cpufreq.

As of now I can set everything correct. The right governor is loaded with system boot, but why is the current frequency not working correct. It is always around 1.7-1.8 GHz...

cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 2:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 3:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 4:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 4
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 5:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 5
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 6:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 6
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).
analyzing CPU 7:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
  CPUs which need to have their frequency coordinated by software: 7
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.70 GHz (asserted by call to hardware).

Offline

#9 2012-06-02 06:38:03

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: cpufreq not loading governor nor changing frequency

Try 'cat /proc/cpuinfo | grep MHz' instead cpufreq-info.

Offline

Board footer

Powered by FluxBB