How do I set the CPU Frequency Governor In Opensuse 13.1 ?

In Opensuse 13.1, How do I set the CPU Frequency Governor to ‘performance’ ?

Hi
As root user;


zypper in cpupower
cpupower --cpu 0-n frequency-set -g performance

Where n is the last core (if you want to set to all cores).

thanks,

I should have said it is just a single core athlon 64 2800 - an old one :wink:

thanks again

so i did…

cpupower --cpu 0 frequency-set -g performance

does that set it permanently? (it’s a desktop, only used occasionally.)

or will I have to do that every time I login?
I’ld like it to be set just the once, and have it just that way

Hi
It can be set with the pm-profiler command;


pm-profiler -e low_latency

Run the pm-profiler command by itself to see the options etc.

this good stuff, and I don’t want to be a pest, how do I confirm that governor is running now?

Hi
Run the command;


cpupower frequency-info

This will show the current policy is performance.

ok, so I rebooted then ran the check and got…

takeit2@neo:~> cpupower frequency-info
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 109 us.
  hardware limits: 1000 MHz - 1.80 GHz
  available frequency steps: 1.80 GHz, 1000 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 1000 MHz and 1.80 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1000 MHz.
  boost state support:
    Supported: no
    Active: no
takeit2@neo:~> 

but I kinda knew that would be the case. I have been through some parts of this over the past 2 weeks. I think you have to have pm-profiler running first. I’ve not tried undoing it all and testing it.

But what did work this time after starting pm-profiler in the old yast module “System Services (Runlevel)” was to go to the Yast module “/etc/sysconfig/ Editor” navigating to Hardware/Power/PM_Profiler_Profile and adding low_lantency there, saving, then rebooted.

I then checked, and it worked…

takeit2@neo:~> cpupower frequency-info
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 109 us.
  hardware limits: 1000 MHz - 1.80 GHz
  available frequency steps: 1.80 GHz, 1000 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 1000 MHz and 1.80 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.80 GHz.
  boost state support:
    Supported: no
    Active: no
takeit2@neo:~> 

Thanks for your help Malcome, I’m not good at all with the CL tools

On Mon 23 Jun 2014 11:26:02 PM CDT, TakeIT2 wrote:

ok, so I rebooted then ran the check and got…

Code:

takeit2@neo:~> cpupower frequency-info
analyzing CPU 0:
driver: powernow-k8
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 109 us.
hardware limits: 1000 MHz - 1.80 GHz
available frequency steps: 1.80 GHz, 1000 MHz
available cpufreq governors: ondemand, performance
current policy: frequency should be within 1000 MHz and 1.80 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 1000 MHz.
boost state support:
Supported: no
Active: no
takeit2@neo:~>


but I kinda knew that would be the case. I have been through some parts
of this over the past 2 weeks. I think you have to have pm-profiler
running first. I’ve not tried undoing it all and testing it.

But what did work this time after starting pm-profiler in the old yast
module “System Services (Runlevel)” was to go to the Yast module
“/etc/sysconfig/ Editor” navigating to
Hardware/Power/PM_Profiler_Profile and adding low_lantency there,
saving, then rebooted.

I then checked, and it worked…

Code:

takeit2@neo:~> cpupower frequency-info
analyzing CPU 0:
driver: powernow-k8
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 109 us.
hardware limits: 1000 MHz - 1.80 GHz
available frequency steps: 1.80 GHz, 1000 MHz
available cpufreq governors: ondemand, performance
current policy: frequency should be within 1000 MHz and 1.80 GHz.
The governor “performance” may decide which speed to use
within this range.
current CPU frequency is 1.80 GHz.
boost state support:
Supported: no
Active: no
takeit2@neo:~>


Thanks for your help Malcome, I’m not good at all with the CL tools

Hi
No problem, the other way is to create a simple systemd service;


# /etc/systemd/system/cpupower.service
#

[Unit]
Description=Set cpupower to performance for cpu0

[Service]
Type=oneshot
ExecStart=/bin/sh -c "/usr/bin/cpupower --cpu 0 frequency-set -g performance"

[Install]
WantedBy=multi-user.target

Save the above as /etc/systemd/system/cpupower.service

Then run as root user;


systemctl status cpupower.service
systemctl start cpupower.service
cpupower frequency-info
systemctl enable cpupower.service


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I turned off Intel SpeedStep in BIOS.


user@machine:~> 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: 0.97 ms.
  hardware limits: 800 MHz - 3.40 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 3.40 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  boost state support:
    Supported: no
Active: no

Howcome I don’t get “current CPU frequency is” ?


user@machine:~> powersave -c
POWERSAVE

Ok. Why isn’t it at PERFORMANCE as I turned off SpeedStep in BIOS?

On Thu 26 Jun 2014 08:56:01 AM CDT, DJViking wrote:

I turned off Intel SpeedStep in BIOS.

Code:

user@machine:~> 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: 0.97 ms.
hardware limits: 800 MHz - 3.40 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 3.40 GHz.
The governor “powersave” may decide which speed to use
within this range.
boost state support:
Supported: no
Active: no


Howcome I don’t get “current CPU frequency is” ?

Code:

user@machine:~> powersave -c
POWERSAVE


Ok. Why isn’t it at PERFORMANCE as I turned off SpeedStep in BIOS?

Hi
Disable the driver via the grub option;


intel_pstate=disable

The acpi-freq module should then allow you to set the max speed.

On this machine, it does switch to performance, however it’s still
speed stepping, probably since I don’t have it disabled.


# cpupower -c 0-1 frequency-set -g powersave
Setting cpu: 0
Setting cpu: 1
# powersave -c
POWERSAVE
# cpupower -c 0-1 frequency-set -g performance
Setting cpu: 0
Setting cpu: 1
# powersave -c
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: 0.97 ms.
hardware limits: 800 MHz - 1.90 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 1.90 GHz.
The governor "performance" may decide which speed to
use within this range.
current CPU frequency is 1.71 GHz (asserted by call to hardware).
boost state support:
Supported: no
Active: no
1900 MHz max turbo 4 active cores
1900 MHz max turbo 3 active cores
1900 MHz max turbo 2 active cores
1900 MHz max turbo 1 active cores
.CODE]

--
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-11-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!

I’m looking for the docs on this command. Found a man page, but I think it’s different software because it didn’t use this format…

Hi
A lot happens in a year… :wink:

What is not valid? You can either use all or 0-n still when n is the last core your wanting to set with --cpu? The governers a now only 2 if it’s an intel cpu, unless you disable the p_state kernel module, it may not work. For AMD (APU/CPU) it works, for boost on an APU you will need to install the fglrx driver.