2

I'm trying to have a setup where JACK interfaces directly to ALSA and pulseaudio communicates to JACK. This setup worked OK (I had to manually start things a few times) but as I understood the Ubuntu daemon setup and perfected things jackd stopped working completely. I'm running 10.10.

If I run something through ALSA I get sound no problem. However, when I run jack with realtime: /usr/bin/jackd -v -R -ch -Z -t2000 -d alsa -P I get the following error:

jackd watchdog: timeout - killing jackd

Conversely, if I run without realtime: /usr/bin/jackd -v -r -ch -Z -t2000 -d alsa -P I get:

ALSA: poll time out, polled for 32032138 usecs
DRIVER NT: could not run driver cycle

Jack was working just fine before I made these changes; while I don't have an exact copy of my original configuration I recall running the bare minimum of options worked fine. I've seen some articles saying the problem is with ALSA capture. In fact, I tried enabling capture in alsamixer once and everything worked! On reboot that success was not repeated and I haven't been able to get jack working since. That shouldn't matter because specifying -P should obviate any capture issues.

Short summary: I can't get jackd to work under any circumstances (unless I specify -d dummy). Sound works with other programs with ALSA, but when I run JACK the daemon opens the card but times out and dies. JACK worked fine before but I can't figure out what changed (or where to even look).

I should mention I am running with CPU speed throttling on, but I'm using HPET to mitigate this (and I've run jack with no issue before). Thanks!

EDIT: It looks like it might have to do with the nvidia modules I've loaded; references here and here

1 Answer 1

3

The nVidia modules are known to behave oddly when interacting with realtime processes, with unpredictable effects on other processes on the system, but the most common issue with starting JACK is not having configured the limits to allow JACK to consume more resources than regular processes. One solution is to install ubuntustudio-settings and configure the limits therein. The other is to add your user to the audio group, and create a file /etc/security/limits.d/audio.conf containing the following:

@audio - memlock unlimited
@audio - rtprio 99

Once you log out, and log in again, you should be able to run JACK in realtime (unless the nVidia drivers are indeed the cause of your issues). Note that both methods to address the issue are identical in final configuration, although the means of achieving that result differs slightly. Smaller values for memlock are known to work, but the specific value required seems to differ depending on the underlying hardware, the JACK routing map, and the number of filters being applied: if "unlimited" seems too high for you, there are any number of suggestions for specific values on any number of linux audio forums, but I have yet to see any clear guide for calculating the correct value for a given environment.

Be aware that by default pulseaudio-module-jack does not attach to any output devices: when testing, be sure to check your audio routing in JACK to ensure that output is being rendered in a way you can notice (to working audio out or some graphical visualisation tool) before thinking it doesn't work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .