Tuesday, March 17, 2009

JACK Configuration

After checking that the Lexicon Omega was working under Ubuntu, it was time to configure JACK properly for realtime support and low latency.

If you don't already know, JACK is the system used for handing low latency, real-time audio in Linux. It can take a bit of trial and error to get it working OK...

When I first enabled the real-time option, JACK wouldn't start at all. It was throwing up an error:

cannot use real-time scheduling (FIFO at priority 10) [for thread -1210643584, from thread -1210643584] (1: Operation not permitted)
cannot create engine


After looking around, it seems this is a well known issue, and after reading the Ubuntu Studio guide, I needed to add a few settings to /etc/security/limits.conf, specifically:

sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - nice -19 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'


However, even though JACK now started, I was still getting lots of xruns and other errors, of the type:

delay of 21343.000 usecs exceeds estimated spare time of 21075.000; restart...


I tried in vain for hours to get rid of these errors, when I realised that at some point during the various reboots I was doing, the hardware device in the JACK copnfiguration had switched to the internal sound card, rather than the Omega. Although the same hardware device was still selected in JACK, the system had swapped the USB Omega to another device. I had also added the same configuration settings in /etc/security/limits.conf to my user name.

Now JACK is running with no xruns at all, except for when starting or exiting applications, which is normal. Now I need to start seriously playing around with the various sequencers/DAWs/plugins and see which works best for me.

No comments: