[PlanetCCRMA] Problems startig jackd

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Tue May 4 11:12:01 2004

> I was referred to PlanetCCRMA by a recent article in Linux Journal on
> digital recording.  The Ardour application looked good to me, and so I
> installed it (and the dependencies).  However, I am unable to start jackd.
> When I use the following command:
> 	jackd -d alsa -d hw:0
> I get the following output:
> "[don@dauphin don]$ jackd -d alsa -d hw:0
> jackd 0.98.0
> Copyright 2001-2003 Paul Davis and others.
> jackd comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> loading driver ..
> creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
> control device hw:0
> configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
> Couldn't open hw:0 for 32bit samples trying 24bit instead
> Couldn't open hw:0 for 24bit samples trying 16bit instead
> Couldn't open hw:0 for 32bit samples trying 24bit instead
> Couldn't open hw:0 for 24bit samples trying 16bit instead
> **** alsa_pcm: xrun of at least 3.936 msecs
> **** alsa_pcm: xrun of at least 5.866 msecs
> **** alsa_pcm: xrun of at least 1.557 msecs
> **** alsa_pcm: xrun of at least 0.899 msecs
> jack main caught signal 2
> Segmentation fault"
> (terminated by ctrl-c, blank lines removed)
> Running qjackctl gives me the following output in the output window"
> "5:00:21.072 Statistics reset.
> 15:00:21.167 Startup script...
> 15:00:21.168 artsshell -q terminate
> 15:00:21.365 MIDI connection graph change.
> sound server terminated
> 15:00:22.403 Startup script terminated successfully.
> 15:00:22.460 JACK is starting...
> 15:00:22.460 /usr/bin/jackstart -R -t500 -dalsa -dhw:0 -r48000 -p1024 -n2
> 15:00:22.493 JACK was started with PID=7628 (0x1dcc).
> jackstart: cannot get realtime capabilities, current capabilities are:
>            =ep cap_setpcap-ep
>     probably running under a kernel with capabilities disabled,
>     a suitable kernel would have printed something like "=eip"
> 15:00:22.512 JACK was stopped with exit status=1.
> 15:00:24.716 Could not connect to JACK server as client."
> I am running a 2.6.5 kernel.  I tried to locate low-latency patches for the
> 2.6 kernels, but was unable to find any.  Some postings I found in Google
> indicated that this stuff should "already be in there", but I could not find
> which config option(s) should be enabled when compiling the kernel.

Which distro are you running? Why 2.6.x?

2.6.x is not yet (AFAIK) at the same level of low latency performance as
a patched 2.4.x kernel. There are a couple of critical patches that I
don't think have made it to the mainline kernel yet (by Takashi Iwai).
Also, the kernel should be built with the preemptible kernel option
turned on, that optimizes latency a bit more but supposedly at the cost
of stability (not all drivers are well tested with preempt on). 

Regarding the "capabilities" complain, that is jackstart trying to get
realtime capabilities from the kernel so that jack apps can run with
SCHED_FIFO even as a non-root user. 

You could patch the kernel to enable capabilities, but under 2.6.x a
better option is to use the LSM module. See:

> I get the above messages no matter which user I'm running under (user or
> root).  ALSA is up and running, and I'm able to play sound.  Currently I'm
> operating with a sound card on my motherboard (VIA82XXX chipset) though
> hopefully I will change that soon.
> Any thoughts on what to do, and/or what kernel parameters to change when
> compiling?

See above...
If you don't have a real need to be running 2.6.x you may be better off
(for the time being) running the patched Planet CCRMA 2.4.26 kernel...

-- Fernando