Page 1 of 1

jack audio

Posted: Fri May 20, 2011 10:29 pm
by chuning
Hello -

First of all, many apologies if I'm posting this to the wrong place.

I'm going absolutely crazy trying to get Jack Audio working -

I've been using Linux (Ubuntu) for a couple of years, and have recently upgraded to Ubuntu Studio and Ubuntu 11.04. I specifically want to get to grips with Rosegarden, but cannot get any sound out of it. I've googled like mad, and tried to follow every tutorial I can find, but no luck. Can anyone help?

Many thanks in advance

Chris

Re: jack audio

Posted: Fri May 27, 2011 9:40 pm
by c_cinq
I have found DP's articles to be useful.
http://www.linuxjournal.com/node/1004080
http://www.linuxjournal.com/node/1000244

And here's one more, via wiki.linuxmusicians.
http://www.64studio.com/manual/audio/rosegarden

Re: jack audio

Posted: Sun May 29, 2011 10:11 am
by Shadow_7
It's more than JUST jack audio. If you don't have a card with native midi (most don't these days), you have to emulate that with timidity or fliudsynth. And then and only then does rosegarden make sound on my systems.

Start jack however you do.

$ jackd -R -d alsa -d hw:0

Start fluidsynth however you do.

$ fluidsynth -C no -R no -o audio.periods=2,audio.driver='oss',midi.driver='oss',synth.sample-rate=48000 /usr/share/sounds/sf2/FluidR3_GM.sf2

Then start rosegarden. (or open octave / or muse / or .....)

$ rosegarden

-----

But not the only option.

$ timidity -Os -iA
$ rosegarden

But your distro might not have compiled the needed applications with the right options to allow them to just work. Or the versioning is not compatible and other quirks. Ubuntu studio or otherwise should be mostly current enough to just work. But debian can be quite dated and other road blocks. Like not compiling timidity with sequencer support. So don't be affraid to get your hands dirty if you need to.

Re: jack audio

Posted: Sun May 29, 2011 2:37 pm
by chuning
Thanks very much - finally got it working!

Re: jack audio

Posted: Mon Jul 25, 2011 9:16 am
by Keith_EE
Hi, I hope someone can help me get JACK to work. One week ago it briefly worked after I installed it but for whatever reason stopped. I don't know what to check now. :idea: Thanks for any help.

It's a new installation with openSUSE 11.4 KDE for my system and I used it's package manager yast to install JACK and qjackctl. This install I think is JACK2 because jackdmp is listed in the command line output.

Sound is CK804 AC'97 Controller. My sound is on my motherboard which is an MSI M9N4 Ultra, AMD Athlon dual core CPU, NVidia NForce 500 series chipset.

When I boot qjackctl here is what is listed in the message window:

04:25:52.120 Patchbay deactivated.
04:25:52.139 Statistics reset.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started

-----------------

I tried the command someone here listed and this is what I get for that:

gkh@alpha:~> jackd -R -d alsa -d hw:0
jackdmp 1.9.6
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2010 Grame.
jackdmp 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
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
Cannot lock down memory area (Cannot allocate memory)
Cannot lock down memory area (Cannot allocate memory)
Engine profiling activated, beware 247 MBytes are needed to record profiling points...
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
Using ALSA driver NFORCE running on card 0 - NVidia CK804 with ALC655 at irq 22
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
AcquireSelfRealTime error
alsa_driver_xrun_recovery
JackAudioDriver::ProcessAsync: read error, skip cycle
alsa_driver_xrun_recovery
JackAudioDriver::ProcessAsync: read error, skip cycle
alsa_driver_xrun_recovery
JackAudioDriver::ProcessAsync: read error, skip cycle...................

Re: jack audio

Posted: Mon Jul 25, 2011 1:19 pm
by Capoeira
search this forum for "limits.conf" and/or "Realtime kernel"

Re: jack audio

Posted: Mon Jul 25, 2011 3:14 pm
by raboof
Keith_EE wrote:Cannot lock down memory area (Cannot allocate memory)
Cannot lock down memory area (Cannot allocate memory)
Does this mean he's missing the 'memlock' configuration in limits.conf?

Re: jack audio

Posted: Mon Jul 25, 2011 10:32 pm
by Pablo
Does this mean he's missing the 'memlock' configuration in limits.conf?
Yes, I think so.

Keith, you (or better said, the user who runs the jack server) need rtprio and memlock privileges (you don't need an rt kernel, at least not just yet). To gain these privileges, you have to edit /etc/security/limits.conf. This is documented all over the internet. Also, make sure that jack is using the right interface.

Re: jack audio

Posted: Tue Jul 26, 2011 6:39 am
by Keith_EE
Thanks for helping, I found and added this to the limits.conf file:

Code: Select all

@audio   -  rtprio         99
@audio   -  memlock        unlimited
But unfortunately that didn't fix it. You know it worked for a day after the install, I wonder what could have changed. :?:

I still get:
02:33:22.271 Patchbay deactivated.
02:33:22.276 Statistics reset.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started

Re: jack audio

Posted: Tue Jul 26, 2011 9:21 am
by Pablo
Hi,

Did you add your user to the audio group? ("sudo adduser your_user_name audio" and reboot).

Check if you have said privileges with:

ulimit -r -l

Now, what soundcards do you have and what are your jackd settings?:

cat /proc/asound/cards ~/.jackdrc
arecord -l && aplay -l

Re: jack audio

Posted: Tue Jul 26, 2011 7:20 pm
by raboof
Perhaps the output of http://code.google.com/p/realtimeconfigquickscan/ might tell us something too

Re: jack audio

Posted: Wed Jul 27, 2011 11:27 pm
by Keith_EE

Code: Select all

ulimit -r -l
real-time priority              (-r) 99
max locked memory       (kbytes, -l) unlimited

Code: Select all

cat /proc/asound/cards ~/.jackdrc
 0 [CK804          ]: NFORCE - NVidia CK804
                      NVidia CK804 with ALC655 at irq 22
/usr/bin/jackd -m -p 128 -R -P 60 -u -T -d alsa -n 2 -r 48000 -p 1024 -d hw:0,0

Code: Select all

arecord -l && aplay -l
**** List of CAPTURE Hardware Devices ****
card 0: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CK804 [NVidia CK804], device 1: Intel ICH - MIC ADC [NVidia CK804 - MIC ADC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
**** List of PLAYBACK Hardware Devices ****
card 0: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CK804 [NVidia CK804], device 2: Intel ICH - IEC958 [NVidia CK804 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0