Page 1 of 1

KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Sun Jun 26, 2011 8:46 am
by leisuresuitgreg
Hi all

I have been playing around for a while with a few distros, and installs, and I can say I am finally happy running Ubuntu 11.04 with KXStudio over the top. My only problem is that I cannot seem to get my latency down around what others report without huge numbers of Xruns.

Running: AMD TurionX2 - 64 bit with 4 GB ram
Kernel: 2.6.38-8-lowlatency
Sound input: M-Audio Fast Track Pro

So... The best setup I have found is
sample rate: 44100
Buffer size: 4096
Periods/ buffer: 3
Dithering mode: none
Not running in real time.

This gives me a latency of 92.8ms, with the odd xrun here and there (around 1 /min). I run Harrison Mixbus 2, and when I have around 10 tracks, I end up with a DSP load of about 70-80%. Even with 1 track, the DSP load is about 60%.

Any thing glaringly obvious I am doing wrong? Any help would be hugely appreciated!!!!

Thanks in advance

Greg

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Sun Jun 26, 2011 3:13 pm
by Pablo
Why not realtime mode? Afaik, jack is designed to be run in realtime mode, normally. Just make sure you have rtprio and memlock privileges. Check with:

ulimit -r -l

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Mon Jun 27, 2011 10:04 pm
by leisuresuitgreg
Hi Pablo, thanks for the reply.

ulimit -r -l gives

Code: Select all

real-time priority              (-r) 95
max locked memory       (kbytes, -l) unlimited
When i run in realtime mode, the tracks in mixbus play really fast (like double speed) for like 5 seconds, then very slow.

As far as I was aware, realtime mode was only useful when running the -realtime or -rt kernet, which I am not...

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Tue Jun 28, 2011 4:58 am
by Pablo
As far as I was aware, realtime mode was only useful when running the -realtime or -rt kernet, which I am not...
Realtime mode is the way to go, regardless of the kernel. See http://www.jackaudio.org/realtime_vs_realtime_kernel

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Tue Jun 28, 2011 6:20 am
by leisuresuitgreg
Okay cool thanks

However, when running in realtime mode, I get the odd output mentioned above, where the audio plays fast (doulble time) for around 5 seconds then runs slow (half time ish)... I will have to have more of a play with the real time settings.

Cheer

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Tue Jun 28, 2011 8:31 am
by leisuresuitgreg
Okay

I so installed the package indicator-cpufreq from the ppa ppa:artfwo/ppa, and that seems to have fixed some of the issues

With that package I can now set my CPU to performance (2.1 ghz for each CPU), and that has stopped most of the xruns. However I get huge numbers of xruns when I run with the realtime option turned on in Jack

Maybe that is the best I can do

Cheers

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Tue Jun 28, 2011 8:41 am
by leisuresuitgreg
Scratch that. Sorted.

Realtime now works (dunno what was going on before), and the latency is down to 23ms, which is bearable

Thanks for the help Pablo!

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Wed Jun 29, 2011 9:19 am
by leisuresuitgreg
Thanks for the reply FalkTX, but I have already done both of those.

I think I have finally come to the root of my problem. There is an issue with the HP 6734s laptop, where it gets very clogged up with dust. My CPU temp is often running at over 70 degrees, and when running a larger Mixbus session, the temp skyrockets over 80-90 degrees. This is causing the xruns, and I can't get the temp down without pulling the laptop to pieces to get at the fan and remove the dust.

I can run "cold" with a latency of 11.6ms in realtime mode, so that is definitely good enough. But when I starting driving my CPU hard, e.g. processing a lot of tracks simultaneously; the system over heats and I get way too many xruns.

So I will pull it all apart this weekend and see how I go! fingers crossed

Thanks for all your help

Re: KXStudio 11.04 -How to minimise xruns / lower latency

Posted: Wed Jun 29, 2011 10:41 pm
by Pablo
Then you should increase the period size, especially if/when you don't do software monitoring or when you are not recording at all (only editing and mixing). Don't you think so? :)

Cheers, Pablo