Jack Refuses to Start - Help me not give up.

Still new to all of this? Feel free to post in any of the subforums on this site, but in this subforum newbie questions are especially encouraged!

Moderators: MattKingUSA, khz

Post Reply
caret
Established Member
Posts: 5
Joined: Sat Jun 12, 2021 1:43 am

Jack Refuses to Start - Help me not give up.

Post by caret »

After countless reboots, tons of limit.d edits and more hair pulling, I'm just about to give up so I thought I'd give this forum a try.

I'm currently trying to get Jack to run via Cadence on Arch Linux. I've run into an error with trying to get Jack to start:

Code: Select all

Fri Jun 11 19:37:45 2021: Starting jack server...
Fri Jun 11 19:37:45 2021: JACK server starting in realtime mode with priority 99
Fri Jun 11 19:37:45 2021: self-connect-mode is "Don't restrict self connect requests"
Fri Jun 11 19:37:45 2021: Acquired audio card Audio1
Fri Jun 11 19:37:45 2021: creating alsa driver ... hw:Generic,1|hw:Generic,0|16|2|44100|0|0|hwmon|swmeter|-|32bit
Fri Jun 11 19:37:45 2021: configuring for 44100Hz, period = 16 frames (0.4 ms), buffer = 2 periods
Fri Jun 11 19:37:45 2021: ALSA: final selected sample format for capture: 32bit integer little-endian
Fri Jun 11 19:37:45 2021: ALSA: use 2 periods for capture
Fri Jun 11 19:37:45 2021: ALSA: final selected sample format for playback: 32bit integer little-endian
Fri Jun 11 19:37:45 2021: ALSA: use 2 periods for playback
Fri Jun 11 19:37:50 2021: ERROR: JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Fri Jun 11 19:37:50 2021: ERROR: Driver is not running
Fri Jun 11 19:37:50 2021: ERROR: Cannot open client name = dbusapi
Fri Jun 11 19:37:50 2021: ERROR: failed to create dbusapi jack client
Fri Jun 11 19:37:50 2021: ERROR: Unknown request 4294967295
Fri Jun 11 19:37:50 2021: ERROR: CheckSize error size = 0 Size() = 12
Fri Jun 11 19:37:50 2021: ERROR: CheckRead error
Here are the jack versions I'm running:

Code: Select all

carrot@sys ~> pacman -Q|grep jack
adljack 1.2.0-2
jack-stdio 1.6-1
jack2 1.9.18-1
jack2-dbus 1.9.18-1
jack_capture 0.9.73-8
jack_delay 0.4.2-1
jack_mixer 16-1
jack_utils 0.0.1-1
jackmeter 0.4-2
jackminimix 0.2.1-2
jacktrip 1.3.0-1
lib32-jack2 1.9.18-1
pulseaudio-jack 1
Kernel info:

Code: Select all

Kernel: 5.12.9-arch1-1
Sound cards if this is even needed, IDK anymore:

Code: Select all

carrot@sys ~> cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfc080000 irq 92
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc400000 irq 94
 2 [Snowball       ]: USB-Audio - Blue Snowball
                      BLUE MICROPHONE Blue Snowball at usb-0000:02:00.0-6.7, full speed
tl;dr Jack doesn't start because of some connection time out error and I'm about to give up I haven't found any help on any site anywhere, and the two linux music production discords I'm in are too dead.
WforWoollyMammoth
Established Member
Posts: 118
Joined: Thu Oct 24, 2019 4:32 pm
Has thanked: 3 times
Been thanked: 16 times

Re: Jack Refuses to Start - Help me not give up.

Post by WforWoollyMammoth »

Your JACK frame rate appears to be very low for an integrated sound device. Raise it to 256, 512 or 1024 on Cadence as the first measure and also make sure the input and output devices on Cadence are the same - and then report back.
Last edited by WforWoollyMammoth on Sat Jun 12, 2021 5:42 am, edited 1 time in total.
WforWoollyMammoth
Established Member
Posts: 118
Joined: Thu Oct 24, 2019 4:32 pm
Has thanked: 3 times
Been thanked: 16 times

Re: Jack Refuses to Start - Help me not give up.

Post by WforWoollyMammoth »

Edit mistake.
caret
Established Member
Posts: 5
Joined: Sat Jun 12, 2021 1:43 am

Re: Jack Refuses to Start - Help me not give up.

Post by caret »

I found a script that could help give more detail on the issue.
Script:

Code: Select all

#!/bin/bash
jack_control start
jack_control ds alsa
jack_control dps device hw:HD2
jack_control dps rate 48000
jack_control dps nperiods 2
jack_control dps period 64
sleep 10
a2j_control --ehw
a2j_control --start
sleep 10
qjackctl &
Error:

Code: Select all

--- start
ERROR:dbus.proxies:Introspect error on :1.151:/org/jackaudio/Controller: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
DBus exception: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
--- driver select "alsa"
User avatar
TAERSH
Established Member
Posts: 455
Joined: Mon Feb 03, 2020 6:48 pm
Has thanked: 27 times
Been thanked: 21 times

Re: Jack Refuses to Start - Help me not give up.

Post by TAERSH »

@caret
Why don't you just try/follow suggestions made by @WforWoollyMammoth ?
In your script there's still very low settings.
Try 44100/48000, 1024, 2 (Sample Rate, Buffer Size, Periods).
And then return the results, please.
User avatar
Loki Harfagr
Established Member
Posts: 267
Joined: Thu Aug 02, 2018 1:28 pm
Has thanked: 151 times
Been thanked: 53 times

Re: Jack Refuses to Start - Help me not give up.

Post by Loki Harfagr »

Same as above, start with some realistic expectations re. buffer size et al.
Besides there is something in your log that shouts "over the top of the overtop":

Code: Select all

Fri Jun 11 19:37:45 2021: Starting jack server...
Fri Jun 11 19:37:45 2021: JACK server starting in realtime mode with priority 99
I don't know where it is misconfigured in your setup but let's try something that may give a chance to other stuff to have a priority especially hardware, like soundcards for instance ;)
caret
Established Member
Posts: 5
Joined: Sat Jun 12, 2021 1:43 am

Re: Jack Refuses to Start - Help me not give up.

Post by caret »

I'm not sure what part of the script there is to put the Buffer Size (or is this a limits.conf thing?). I also noticed I need to log out in order for Cadence to ever let me edit its settings after it crashes. (Testing the Cadence settings right after I post this cause I need to reboot and firefox is now broken because of some font bug idk what im doing aaaaaaaaaaaaaaaaaaa).
caret
Established Member
Posts: 5
Joined: Sat Jun 12, 2021 1:43 am

Re: Jack Refuses to Start - Help me not give up.

Post by caret »

None of the info you all gave is helping. I don't know what setting to change in cadence. I'd attach a screenshot but Cadence crashed once so I need to restart in order to try again. I feel like this issue is deeper than simply just the settings but hopefully I'm wrong and theres an easy fix. It's been 2 weeks I've had this problem and maybe the best option is just installing Manjaro. :cry:
caret
Established Member
Posts: 5
Joined: Sat Jun 12, 2021 1:43 am

Re: Jack Refuses to Start - Help me not give up.

Post by caret »

Thats it. I've officially broke. I'm installing manjaro.
User avatar
sunrat
Established Member
Posts: 907
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 238 times

Re: Jack Refuses to Start - Help me not give up.

Post by sunrat »

99% sure it's your settings. JACK priority should be more like 90 rather than 99. Buffer/periods should be 512/2 at least, 1024/2 better to start.
Manjaro is not going to help fix your settings.
Personally I ditched Cadence for Qjackctl ages ago. It is slightly less just "click n' go" but more capable IMO. In particular you are getting a DBus error, in Qjackctl you can select for JACK to not use DBus.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 91 times

Re: Jack Refuses to Start - Help me not give up.

Post by khz »

This is general, possibly useful, information about jackd/Cadence/...: Demystifying JACK – A Beginners Guide to Getting Started with JACK >> https://linuxaudio.github.io/libremusic ... -jack.html.
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
WforWoollyMammoth
Established Member
Posts: 118
Joined: Thu Oct 24, 2019 4:32 pm
Has thanked: 3 times
Been thanked: 16 times

Re: Jack Refuses to Start - Help me not give up.

Post by WforWoollyMammoth »

Ok, in Cadence the "frames/periods" field seems to be named "buffer size". Sorry about that - I had forgotten about it. I built a new PC about a month ago and didn't install Cadence on it (I feel it's starting to get a bit outdated with the bridging options). I've been using Cadence on my previous systems for years though.

You should be able to change the setting from a sub page that looks like this:
https://wiki.linuxaudio.org/wiki/jack_configuration

Also killing pulseaudio before starting Jack could help if you get dbus related error messages. Do you know how to kill pulseaudio? I personally use

Code: Select all

pulseaudio -k &
systemctl --user stop pulseaudio.socket &
systemctl --user stop pulseaudio.service
That's only for testing purposes though. It might help in some cases and simplify the tests. For a system that works like it should there should be no need to kill pulseaudio before starting JACK. (Pulseaudio can be restarted with "pulseaudio --start", after which you'd might want to restart the bridge by using Cadence, or just logout / reboot if you feel it all gets too complicated.)

The script you've posted above does nothing that you are not able to do with Cadence, QjackCtl (or Ubuntu Studio Controls if you happen to use Ubuntu). For that matter, I'm not sure if the device being referred to as "HD2" has anything to do with what you have on your system.
ag123
Established Member
Posts: 4
Joined: Tue Jun 15, 2021 9:54 am
Been thanked: 1 time

Re: Jack Refuses to Start - Help me not give up.

Post by ag123 »

reposting here just in case it helps
i just got jack working, it turns out there are 2 common 'audio servers' for linux distributions
- pulse audio
- jack
they can apparently co-exist. (for them to co-exist u'd tend to see /usr/bin/jackdbus i.e. jack started by dbus in the process list, accordingly that is part of jack2)

both of them feed into alsa as the underlying 'driver' layer.

if sound is working for other apps, look in /etc/asound.conf, there may be an entry like such

Code: Select all

pcm.!default {
type hw
card 0
device 7
}
then in qjackctl when specifying the driver parameters, it needs to be
hw:0,7

there is also a different problem about ulimits that needs to be fixed for jack to work
viewtopic.php?t=14699
https://jackaudio.org/faq/linux_rt_config.html
hope this helps

original post
viewtopic.php?p=134153#p134153
User avatar
sunrat
Established Member
Posts: 907
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 151 times
Been thanked: 238 times

Re: Jack Refuses to Start - Help me not give up.

Post by sunrat »

Good you got it working, it's definitely a learning experience the first time. Most of what you did is documented in the guide at - https://wiki.linuxaudio.org/wiki/system_configuration Read it well, several times.
There are actually 3 audio systems, PulseAudio, JACK, and ALSA which is the underlying one the other 2 work on top of.
Pulseaudio > JACK does not need DBus (and I prefer not to use it as it forces some default parameters which do not suit my useage) but as default PA will start it automatically when the bridge module is activated.
JACK sets up the security limits automatically on Debian when installed. Are you still on Arch or is it Manjaro now?
Post Reply