Page 1 of 1

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

Posted: Tue Jul 07, 2015 7:14 am
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

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

Posted: Tue Jul 07, 2015 1:03 pm
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}

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

Posted: Tue Jul 07, 2015 1:19 pm
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"

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

Posted: Tue Jul 07, 2015 6:24 pm
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

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

Posted: Tue Jul 07, 2015 6:28 pm
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

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

Posted: Wed Jul 08, 2015 1:42 pm
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.