Jack problems

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Jack problems

Post by aeb105 »

Just installed the new Tango Studio 3.2.0-4-realtime-amd64 and am having Jack issues. I have a quad-core 8gig ram, 2tb drive etc. I am using a Scarlet 2i2 usb interface. I suspect maybe some permissions issues since this Debian is different from Ubuntu which the prior version was built on. Here is the output from the Qjactl and then from the command arecord -l && aplay -l:

02:49:14.709 Patchbay deactivated.
02:49:14.713 Statistics reset.
02:49:14.714 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:49:14.721 ALSA connection graph change.
02:52:31.325 JACK is starting...
02:52:31.325 usr/bin/jackd -R -P70 -t5000 -dalsa -dhw:0 -r44100 -p512 -n3
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:52:31.343 Could not start JACK. Sorry.
02:52:37.527 JACK was stopped with exit status=255.

user@audioserv:~$ arecord -l && aplay -l
**** List of CAPTURE Hardware Devices ****
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Device [PnP Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
**** List of PLAYBACK Hardware Devices ****
card 1: USB [Scarlett 2i2 USB], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: Device [PnP Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Jack problems

Post by bluebell »

Please go to the command line.

See if jackd is already running:
ps aux | grep jackd | grep -v grep

Start jackd manually and see what it outputs:
/usr/bin/jackd -P95 -p512 -t2000 -dalsa -r44100 -p256 -n3 -M -Xseq -D -Chw:0 -Phw:0

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

user@audioserv:~$ ps aux | grep jackd | grep -v grep
user@audioserv:~$
user@audioserv:~$ /usr/bin/jackd -P95 -p512 -t2000 -dalsa -r44100 -p256 -n3 -M -Xseq -D -Chw:0 -Phw:0
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
no message buffer overruns
JACK server starting in realtime mode with priority 95
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|256|3|44100|0|0|nomon|hwmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Jack problems

Post by Pablo »

You are telling jack to use an inexistent hw:0 audio interface. The Scarlet is detected in your system as hw:1 or hw:USB

For testing purposes, I suggest you should shorten your jackd command to a minimum (the defaults are fine for the reminder parameters to get going)

Code: Select all

jackd -dalsa -dhw:1
or, better to avoid card numbering confusion, as numbers tend to not be consistent between reboots:

Code: Select all

jackd -dalsa -dhw:USB
(according to arecord and aplay, alsa calls the Scarlet with the short name hw:USB, go figure)

Of course, you can try directly in qjackctl, just change the interface field (the field es editable, so you can type down "hw:USB" if it doesn't show up in the drop-down menu)

Cheers, Pablo
aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

user@audioserv:~$ jackd -dalsa -dhw:1
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
no message buffer overruns
JACK server starting in realtime mode with priority 10
audio_reservation_init
Acquire audio card Audio1
creating alsa driver ... hw:1|hw:1|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback


Thanks Pablo! So I get in from the command line that way now, stilll not from Qjactl......and I am not running at 44100hz and all my files from the other version were recorded in the Low Latency kernel for that. I changed it to 44100 in Qjactl, but still cannot start from Qjactl. Here are my settings from Qjactl I changed the interface like you said:
Attachments
LMQjactl- JACK Audio Connection Kit-3.png
LMQjactl- JACK Audio Connection Kit-3.png (77.1 KiB) Viewed 2313 times
User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Jack problems

Post by bluebell »

I'd remove the "-R" from the prefix and keep only /usr/bin/jackd there.

On my system "interface" is greyed out and set with "default".

Input device should be hw:USB or hw:1, output device the same.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

Hi Bluebell thanks. After making those changes in Qjactl(see attached file) still getting errors below when try to start Qjactl:


12:59:13.840 JACK is starting...
12:59:13.840 /usr/bin/jackd -P70 -t5000 -dalsa -dhw:0 -r44100 -p512 -n3
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
12:59:13.912 JACK was started with PID=8877.
no message buffer overruns
no message buffer overruns
no message buffer overruns
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
JACK server starting in realtime mode with priority 70
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|512|3|44100|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
12:59:14.364 JACK was stopped with exit status=255.
12:59:16.107 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
12:59:18.835 JACK is starting...
12:59:18.835 /usr/bin/jackd -P70 -t5000 -dalsa -dhw:0 -r44100 -p512 -n3
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
no message buffer overruns
12:59:18.858 JACK was started with PID=8884.
no message buffer overruns
no message buffer overruns
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
JACK server starting in realtime mode with priority 70
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|512|3|44100|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
12:59:19.049 JACK was stopped with exit status=255.
12:59:21.017 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Attachments
Screenshot-Setup - JACK Audio Connection Kit.png
Screenshot-Setup - JACK Audio Connection Kit.png (67.85 KiB) Viewed 2310 times
User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Jack problems

Post by bluebell »

hw:0 is wrong. Use hw:1 or better hw:USB
q1.png
q1.png (37.58 KiB) Viewed 2305 times

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

Okay I chose both those options. hw:1 Scarlett on both and no dice. Then hw:1,0 USB on both and still no. See attached.

14:04:34.217 Patchbay deactivated.
14:04:34.232 Statistics reset.
14:04:34.234 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
14:04:34.241 ALSA connection graph change.
14:04:38.212 JACK is starting...
14:04:38.213 /usr/bin/jackd -P70 -t5000 -dalsa -r44100 -p512 -n3 -D -Chw:1 -Phw:1
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
no message buffer overruns
no message buffer overruns
14:04:38.238 JACK was started with PID=9766.
no message buffer overruns
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
JACK server starting in realtime mode with priority 70
audio_reservation_init
Acquire audio card Audio1
creating alsa driver ... hw:1|hw:1|512|3|44100|0|0|nomon|swmeter|-|32bit
sh: 1: lsof: not found
ATTENTION: The playback device "hw:1" is already in use. Please stop the application using it and run JACK again
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
14:04:38.426 JACK was stopped with exit status=255.
14:04:40.251 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel

jack server is not running or cannot be started
14:05:02.309 JACK is starting...
14:05:02.309 /usr/bin/jackd -P70 -t5000 -dalsa -r44100 -p512 -n3 -D -Chw:1,0 -Phw:1,0
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
no message buffer overruns
no message buffer overruns
14:05:02.332 JACK was started with PID=9774.
no message buffer overruns
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
JACK server starting in realtime mode with priority 70
audio_reservation_init
Acquire audio card Audio1
creating alsa driver ... hw:1,0|hw:1,0|512|3|44100|0|0|nomon|swmeter|-|32bit
sh: 1: lsof: not found
ATTENTION: The playback device "hw:1,0" is already in use. Please stop the application using it and run JACK again
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
14:05:02.535 JACK was stopped with exit status=255.
14:05:04.398 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Attachments
Screenshot-Setup - JACK Audio Connection Kit-1.png
Screenshot-Setup - JACK Audio Connection Kit-1.png (68.63 KiB) Viewed 2301 times
User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Jack problems

Post by bluebell »

> sh: 1: lsof: not found

Is there no lsof program on your system? Then install package lsof.

> ATTENTION: The playback device "hw:1" is already in use. Please stop the application using it and run JACK again

Some program already uses your audio device. Either you have another jackd running, an ALSA client uses it or something like pulseaudio is active. You sould stop all programs that could possible output audio.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

Okay, turning off other sources of audio makes it work. However, when I start up a file in Ardour, it sounds horrifically choppy and muddled with noise. Any ideas?
aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

I figured that Ardour issue is because of the plugins tied to the sessions I did on Tango Linux 1 which had an earlier version of Ardour 2.6. The new Tango Linux distro comes with 2.8. Now I have to figure out which ones they were and try and grab'em. Another issue I will be working on is the other issue I am getting after installing Ardour 3 which won't even open the old files. Maybe I will mosey over to the Ardour forum. Thanks for all your help guys.I
Sas
Established Member
Posts: 26
Joined: Wed Mar 26, 2014 6:28 pm

Re: Jack problems

Post by Sas »

I've had similar issues. I remember solving this by going into Cadence, and then change the Jack bridge/ALSA setting, then (force) restart Jack through Cadence. Not sure if it helps though...
User avatar
bluebell
Established Member
Posts: 2065
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 159 times
Been thanked: 178 times

Re: Jack problems

Post by bluebell »

Sas wrote:I've had similar issues. I remember solving this by going into Cadence, and then change the Jack bridge/ALSA setting, then (force) restart Jack through Cadence. Not sure if it helps though...
As you wrote you have a powerful PC. So probably you can tune your system:

- high realtime prio 95 for jackd (Priority)
- increase Frames/Period to 1024

Try jack output with other programs, e.g. Clementine audio player. Its output can be set to jack.
It's still possible that you have too many CPU consuming plugins in Ardour. Or your system begins to swap.

With realtime prio 95 and Frames/period of 256 I can have many plugins active in Qtractor without problems.
I have systems with Core i5 CPU and 16 GB RAM, and of course a Scarlett 2i2 :)

Even with 50% realtime CPU (displayed in Qjackctl) sound is perfect without any xruns.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

aeb105
Established Member
Posts: 196
Joined: Tue Feb 28, 2012 10:38 pm

Re: Jack problems

Post by aeb105 »

Thanks. I will work on tuning Jack very soon. Right now I notice that the volume doesn't turn up or down within the OS. I can click on the sound thing in Tango's desktop or any within any program and its unadjustable. Is that normal? In addition just tried starting Qjactl after a reboot and not able to start again. Permissions right? Do I need to add my user to the sudoers group and what is the best way?

22:38:26.076 Patchbay deactivated.
22:38:26.081 Statistics reset.
22:38:26.083 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
22:38:26.090 ALSA connection graph change.
22:38:28.781 JACK is starting...
22:38:28.782 /usr/bin/jackd -P70 -t5000 -dalsa -r44100 -p512 -n3 -D -Chw:1,0 -Phw:1,0
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
no message buffer overruns
22:38:28.799 JACK was started with PID=24887.
no message buffer overruns
no message buffer overruns
jackdmp 1.9.9.5
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 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
JACK server starting in realtime mode with priority 70
audio_reservation_init
Acquire audio card Audio1
creating alsa driver ... hw:1,0|hw:1,0|512|3|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 512 frames (11.6 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 3 periods for playback
ALSA: could not start playback (Broken pipe)
Cannot start driver
JackServer::Start() failed with -1
Failed to start server
Released audio card Audio1
audio_reservation_finish
22:38:29.010 JACK was stopped with exit status=255.
22:38:30.891 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Post Reply