Xruns with Cadence KXstudio (Linux).

Official support for: bitwig.com
RELATED
PRODUCTS

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hello everybody !

Sorry for my english I m French and google trad is my friend !

I have install Bitwig Studio Demo in KXstudio and sometimes i have Xruns in Cadence with this Log :

Mon Mar 16 12:32:23 2015: ERROR: JackEngine::XRun: client = Bitwig Studio was not finished, state = Running
Mon Mar 16 12:32:23 2015: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Mar 16 12:32:23 2015: ERROR: JackEngine::XRun: client = Bitwig Studio was not finished, state = Triggered
Mon Mar 16 12:32:23 2015: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Mar 16 12:32:24 2015: ERROR: JackEngine::XRun: client = Bitwig Studio was not finished, state = Running
Mon Mar 16 12:32:24 2015: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Mar 16 12:38:54 2015: ERROR: JackEngine::XRun: client = Bitwig Studio was not finished, state = Running
Mon Mar 16 12:38:54 2015: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error


Most of the time it happens when I apply a pluging (equalizer, ...) on a record track. But not every time !

I use Allen & Heath z10fx mixer/USB sound card : http://www.allen-heath.com/ahproducts/zed-10fx/ (http://www.allen-heath.com/ahproducts/zed-10fx/)

Here my computer's configuration :

KXstudio 64bit
Intel® Core™ i3-4130 CPU @ 3.40GHz
8Go Ram

And Cadence's configuration :

Realtime : 89
Port max : 2048
Duplex Mode : "Input : hw:CODEC,0 [USB Audio]" and "Output : hw:CODEC,0 [USB Audio]" (My mixer/USB sound card)
Sample rate : 44100
Buffer Size : 512
Periods/buffer : 2

Cpu Scaling : performance

Current Kernel : 3.13.0 Lowlatency
User in audio group : yes

Latency : 11.6 ms


If you have an idea of where my problem come ?

Thank...

Post

Perhaps try raising your latency in Cadence ( This is a frontend for Jack ? ) try Buffer size : 256 and Periods/buffer : 3 ( some sound cards work better with 3 periods per buffer). I also have a similar problem where I get Xruns in " Jack " , but I don't think it is specific to Bitwig.
Xruns can be caused by several other things too.. I would start by googling these terms " jack proc interrupts " and " linux irq " To start with and you may just find some useful information there.

Post

Yeah, first thing to try is to raise periods count.
In my case 6 or even 8 buffers are causing less xruns down to 64 buffer size

There are couple things that contributing to stable system:
1. Hard realtime kernel. (lowlatency is not rt kernel)
2. Proper jack settings
3. Force jack to use hpet timer
4. No pulseaudio
5. rtirq config for usb priority
6. SSD

Post

4. No pulseaudio
This can be achieved either temporarily or as a system default. I find it easier to do this as a temporary measure like this:-

Create a file named client.conf and save contents autospawn = no and save it in your hidden file .pulse which is in your /home/username folder.

Now in the command line/ terminal run command killall pulseaudio , now the Pulseaudio daemon wont restart as we have told it not to respawn with the above mentioned file.

To have pulseaudio back to normal just delete the client.conf file and restart pulseaudio by either logging out/in or by running the command pulseaudio . EDIT: I'm not actually sure that we even have to delete the client.conf file, iirc manually restarting pulseaudio will work again regardless.

There is probably an easy way to have this run as a script , maybe even from Jack itself?
Last edited by mikoatkvr on Tue Mar 17, 2015 10:56 am, edited 1 time in total.

Post

mikoatkvr wrote:
4. No pulseaudio
There is probably an easy way to have this run as a script , maybe even from Jack itself?
Yep.
In qjackctl there are options:
Execute script after Startup: pulseaudio --start
Execute script on Shutdown: pulseaudio -k

Post

Execute script after Startup: pulseaudio --start
Execute script on Shutdown: pulseaudio -k
Should these not be reversed i.e kill the daemon on jackstart and restart on jack quit?

Execute script after Startup: pulseaudio -k

Execute script on Shutdown: pulseaudio --start :)

Post

Yes it should)

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Hello ! Thank for lot of answer.

@mikoatkvr : Cadence is a frontend for jack integrate in KXstudio : http://kxstudio.sourceforge.net/Documen ... troduction (http://kxstudio.sourceforge.net/Documentation:Manual:cadence_introduction)


I don't have Pulse audio.

I'll take the time to read and translate your answers. Again, thank you...

Post

ooops
Last edited by Lump on Tue Mar 17, 2015 7:26 pm, edited 1 time in total.
[del]AudioLinux sucks.[/del]

Post

1. Hard realtime kernel. (lowlatency is not rt kernel)
I've just tested this http://capocasa.net/realtime-kernels RT kernel, because I wasn't satisfied with the performance of the Ubuntu 14.04 low latency kernel.

So I followed this advise to try hard realtime; It looks nice for a moment, no xruns, but then the GUI freezes a few moments after starting BWS. :dog:

hard realtime means in a way hard crashes...
[del]AudioLinux sucks.[/del]

Post

Current rt kernels are not supporting btrfs file system causing random hangs and freezes. Maybe that's your problem.
Btw, better to compile rt kernel by yourself.

Post

Another thing to note when using Jack in realtime ( this may or may not apply when using a hard RT-kernel ) you can limit the amount of locked memory to say 90% or 95% of you RAM, which is supposed to stop system lock ups here is an example https://wiki.archlinux.org/index.php/Re ... management . Renoise has an inbuilt function which limits the amount of CPU usage for a certain length of time, which seems to work well on cpu spikes ( which is what I think is happening in Lumps case )
RNS-cpu.png
You do not have the required permissions to view the files attached to this post.

Post

Try to change CPU governor to the "performance" (you should execute this each time after boot):

Code: Select all

sudo cpupower frequency-set -g performance
It helped me a lot.

Post

[quote="phantom-one"]Try to change CPU governor to the "performance" (you should execute this each time after boot):

Code: Select all

sudo cpupower frequency-set -g performance
It helped me a lot.[/]

Thanks for reminding me about this, I had set my freq using cpufreq-set but didn't realise that it was reset on each new bootup. I will create a startup script for this. ( I will have to google around a bit as I forget how to run sudo/su commands without the need for password input )

Post

Greetings,

The OP might also change the sample rate and period settings for the device. 48000 with a period of 3 works better with some USB audio devices, e.g the HDA chipset in my laptop.

Best,

dp

Post Reply

Return to “Bitwig”