How to fix the setting of "CPU governor" in Cadence

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
stamkorg
Established Member
Posts: 3
Joined: Tue Jul 07, 2015 7:09 am

How to fix the setting of "CPU governor" in Cadence

Post by stamkorg »

Hello,

I am a new user of KX Studio.

Every time a boot my computer, the CPU governor value returns to "on demand".
I would like to fix the CPU governor value to "performance".

Please, can you help and explain what I have to do for that?


Thanks in advance,


SK
DepreTux
Established Member
Posts: 135
Joined: Tue Jul 23, 2013 9:36 am

Re: How to fix the setting of "CPU governor" in Cadence

Post by DepreTux »

If cadence is able to execute scripts on startup, just have it run:

Code: Select all

cpufreq-set -g performance -c {0,1,..,n}
where n = #ofcputhreads - 1

qjackctl does allow you to run such scripts. If you want it back to ondemand on exit:

Code: Select all

cpufreq-set -g ondemand -c {0,1,..,n}
juki
Established Member
Posts: 92
Joined: Sun Mar 29, 2009 10:45 pm
Has thanked: 22 times
Been thanked: 6 times

Re: How to fix the setting of "CPU governor" in Cadence

Post by juki »

The solution i use is to install the package cpufrequtils and then adding what follows to the file /etc/default/cpufrequtils :
ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="0"
MIN_SPEED="0"
stamkorg
Established Member
Posts: 3
Joined: Tue Jul 07, 2015 7:09 am

Re: How to fix the setting of "CPU governor" in Cadence

Post by stamkorg »

juki wrote:The solution i use is to install the package cpufrequtils and then adding what follows to the file /etc/default/cpufrequtils :
ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="0"
MIN_SPEED="0"
Thanks,

I did that:

nano /etc/default/cpufrequtils

The file was empty. I copied and pasted
ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="0"
MIN_SPEED="0"

I wrote the file and went out.

But here is what happens: every time I boot, Cadence shows "performance" but after 3-4 seconds, it switches to "ondemand" again.

Any solution?

Thanks
stamkorg
Established Member
Posts: 3
Joined: Tue Jul 07, 2015 7:09 am

Re: How to fix the setting of "CPU governor" in Cadence

Post by stamkorg »

DepreTux wrote:If cadence is able to execute scripts on startup, just have it run:

Code: Select all

cpufreq-set -g performance -c {0,1,..,n}
where n = #ofcputhreads - 1

qjackctl does allow you to run such scripts. If you want it back to ondemand on exit:

Code: Select all

cpufreq-set -g ondemand -c {0,1,..,n}

Thanks,

Just to be sure I understood,

If my cpu has 4 threads, in the script I must write: cpufreq-set -g performance -c {0,1,2,3} ?

Thanks
DepreTux
Established Member
Posts: 135
Joined: Tue Jul 23, 2013 9:36 am

Re: How to fix the setting of "CPU governor" in Cadence

Post by DepreTux »

stamkorg wrote: If my cpu has 4 threads, in the script I must write: cpufreq-set -g performance -c {0,1,2,3} ?
Thanks
Right. Of course you need root privileges.
Post Reply