[LAU] OnDemand-performance was(OT: klang)

Len Ovens len at ovenwerks.net
Sun Aug 5 14:12:51 UTC 2012

On Sun, 5 Aug 2012, Ralf Mardorf wrote:

> On Thu, 2012-08-02 at 09:51 -0400, Brett McCoy wrote:
>> AFAIK, if you have your cpu governor set to 'performance', you
>> shouldn't have an issue with frequency scaling anyway. I have so much
stuff consuming power in my studio as it is, I doubt Jack is going to
make that much of an impact on it. :-)
> I guess the governor needs to be set up to a fixed frequency.
> Performance or any lower fixed frequency. FWIW measurements with an
elCheapo tool resulted in nearly no difference for my dual-core 2.1GHz
set to performance and ondemand.

If you are changing the governor setting in Ubuntu (12.04 anyway), be 
aware that OnDemand gets set 60 seconds after login. I assume the delay is
 to allow a speedier login... but the governor has already been set by
that  time anyway. At least cpufreq-info shows ondemand right after login.

The page http://wiki.linuxmusicians.com/doku.php?id=system_configuration 
suggests setting performance in /etc/rc.local but this results in 
performance when I first login and then it jumps back to ondemand. On the 
same page there is another suggestion to use: /etc/init.d/ondemand stop 
which doesn't work either as the stop command does nothing. However: sudo
update-rc.d ondemand disable
does get rid of the 60 second reset for ondemand and then setting 
performance in /etc/rc.local will work.

I don't know that this is the best solution. I have had no problems 
running at full speed even over night in my cheap atom based netbook, but 
I have heard of some laptops that have heat problems even in ondemand (or 
windows) if they are pushing it too hard. The fan on my netbook is noisier
 too. The idea of running at a lower constant speed would help. I seem to 
be able to do quite well at even 800Mhz and have a quiet machine.

I have another idea... I make use of the system runlevels. Ubuntu only 
uses runlevels 0,1,2 and 6. I think most distros don't use all the 
runlevels, last time I was running Slackware I think they used RL3 as 
well. Anyway I use RL3 for audio. RL3 is very quiet, I shut off:
- cron and friends (this gets rid of auto updates and log rolling for 
- mysql and other daemons I don't need (netmanger is a good candidate to 
if you are not using netjack)
- my wireless kernel module (ath9k) which gives me xrun/minute when 
running and xrun/5sec with netmanger turned off...
- some people would find this a good way to shut off pulse as well. (if 
they need it installed... for recording skype calls for podcasting for 

And I set cpufreq to performance.

I set up a bash script that has to be run as root to change runlevel to 
either 2 or 3 and  have added it to policy kit so it can be run with 
pkexec without a password screen. (same way as we already can  set 
runlevel 0 and 6) This can be run as part of the jackd startup or, I have 
an icon in systray for one click use.

It would be easy to set RL 3,4 and 5 to be three different cpu speeds 
depending on need.


Len Ovens

More information about the Linux-audio-user mailing list