Bug 269929 - audio/cadence won't connect to jack
Summary: audio/cadence won't connect to jack
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-03 02:45 UTC by Luc
Modified: 2023-03-07 09:59 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
Cadence in FreeBSD with no proper driver tab (50.09 KB, image/png)
2023-03-03 04:51 UTC, Luc
no flags Details
Cadence in Linux with ALSA driver tab (79.74 KB, image/png)
2023-03-03 04:53 UTC, Luc
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luc 2023-03-03 02:45:54 UTC
I spent a long time trying to troubleshoot jack, believing that it is not working.

It finally occurred to me to run 'ps aux | grep jack' and that seems to indicate that yes, jack is running.

But cadence can never connect to it.
Neither can catia (bundled with cadence), qjackctl or qtractor.

Are you really sure those applications are connecting to jack correctly?

Can you make any of them connect?
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 03:08:05 UTC
Both qjackctl and qtractor connect to Jack. qjackctl shows that qtractor is fully connected.

Do you have jackd_user="{your-user}" in /etc/rc.conf ?
Comment 2 Luc 2023-03-03 03:14:21 UTC
Yes, I do.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 03:16:57 UTC
(In reply to Luc from comment #2)

Is there a socket like /tmp/jack_default_1001_0 owned by your user?
Comment 4 Luc 2023-03-03 03:25:08 UTC
Yes, there is.

# ls -la /tmp/jack_default_1001_0
srwxr-xr-x  1 luc  wheel  0 Mar  3 00:22 /tmp/jack_default_1001_0

But if you can connect it then it's probably not a bug. I will have to troubleshoot it elsewhere.

Sorry for the trouble.
Comment 5 Luc 2023-03-03 04:51:18 UTC
Created attachment 240551 [details]
Cadence in FreeBSD with no proper driver tab

Cadence in FreeBSD with no proper driver tab
Comment 6 Luc 2023-03-03 04:53:24 UTC
Created attachment 240552 [details]
Cadence in Linux with ALSA driver tab

Please take a look at the two attachments, two screenshots. Cadence in FreeBSD has no proper driver tab while in Linux it has an ALSA tab. Is the FreeBSD correct? Is it supposed to lack the driver tab?
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 07:00:23 UTC
(In reply to Luc from comment #6)

The author enabled ALSA only on linux, see here: https://github.com/falkTX/Cadence/blob/master/src/catia.py#L55

It can probably be enabled on FreeBSD with a custom patch. But from my perspective Jack is superior to ALSA, so it's ok as long as it works with Jack.

ALSA is Linux's native audio interface that is emulated on FreeBSD.
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 07:01:40 UTC
(In reply to Luc from comment #4)

When you say that programs fail to connect to Jack - do they fail with some particular error message?
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 07:06:36 UTC
Luc,

As a point of reference, my complete Jack setup in /etc/rc.conf is:
> jackd_enable="YES"
> jackd_user="yuri"
> jackd_rtprio="YES"
> jackd_args="-R -doss -r48000 -p1024 -n3 -w16 --capture /dev/dsp7 --playback /dev/dsp3"

Is any of these parts missing in your setup?

I use Jack forever and have never seen the problem that you describe.


Yuri
Comment 10 Luc 2023-03-03 07:08:56 UTC
(In reply to Yuri Victorovich from comment #8)

Catia gives me this terminal output:

-------------------------
catia
Cannot read socket fd = 14 err = Socket is not connected
CheckRes error
JackSocketClientChannel read fail
Cannot open catia client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
-------------------------


Cadence has this in the log:

-------------------------
Fri Mar  3 00:45:59 2023: ------------------
Fri Mar  3 00:45:59 2023: Controller activated. Version 1.9.22 ([]) built on Sat Feb 18 07:28:18 2023
Fri Mar  3 00:45:59 2023: ERROR:
Fri Mar  3 00:45:59 2023: ERROR: jack_get_descriptor returns null for 'jack_inprocess.so'
Fri Mar  3 00:45:59 2023: ERROR:
Fri Mar  3 00:45:59 2023: ERROR: jack_get_descriptor returns null for 'jack_intime.so'
Fri Mar  3 00:45:59 2023: ERROR:
Fri Mar  3 00:45:59 2023: ERROR: jack_get_descriptor returns null for 'jack_internal_metro.so'
Fri Mar  3 00:45:59 2023: Loading settings from "/home/luc/.config/jack/conf.xml" using expat_2.5.0 ...
Fri Mar  3 00:45:59 2023: setting parameter 'engine':'driver':'(null)' to value "dummy"
Fri Mar  3 00:45:59 2023: setting parameter 'drivers':'dummy':'rate' to value "48000"
Fri Mar  3 00:45:59 2023: Listening for D-Bus messages
Fri Mar  3 00:47:42 2023: Starting jack server...
Fri Mar  3 00:47:42 2023: ERROR: `default' server already active
Fri Mar  3 00:47:42 2023: ERROR: Failed to open server
-------------------------


This is the content of /home/luc/.config/jack/conf.xml:

-------------------------
<?xml version="1.0"?>
<!--
JACK settings, as persisted by D-Bus object.
You probably don't want to edit this because
it will be overwritten next time jackdbus saves.
-->
<!-- Fri Mar  3 00:51:04 2023 -->
<jack>
 <engine>
  <option name="driver">dummy</option>
 </engine>
 <drivers>
  <driver name="dummy">
  </driver>
  <driver name="oss">
  </driver>
  <driver name="loopback">
  </driver>
  <driver name="net">
  </driver>
  <driver name="netone">
  </driver>
  <driver name="proxy">
  </driver>
 </drivers>
 <internals>
  <internal name="netmanager">
  </internal>
  <internal name="audioadapter">
  </internal>
  <internal name="profiler">
  </internal>
  <internal name="netadapter">
  </internal>
 </internals>
</jack>
-------------------------

I noticed the "dummy" driver is selected instead of "oss."
Comment 11 Luc 2023-03-03 07:09:45 UTC
(In reply to Yuri Victorovich from comment #9)

My /etc/rc.conf is very similar to yours. Except mine is /dev/dsp0.
Comment 12 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 07:11:47 UTC
(In reply to Luc from comment #10)

Try removing /.config/jack/conf.xml
I don't have such file. I am not sure who writes it and why.
Comment 13 Luc 2023-03-03 07:20:21 UTC
This is the log in qjackctl:

04:18:19.521 JACK is starting...
04:18:19.522 /usr/local/bin/jackd -doss
Cannot read socket fd = 23 err = Socket is not connected
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
jack_get_descriptor returns null for 'jack_inprocess.so'
jack_get_descriptor returns null for 'jack_intime.so'
jack_get_descriptor returns null for 'jack_internal_metro.so'
`default' server already active
Failed to open server
jackdmp 1.9.22
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2023 Filipe Coelho.
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
04:18:19.560 JACK was started with PID=1084.
04:18:19.563 JACK was stopped
04:18:26.890 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
Cannot read socket fd = 23 err = Socket is not connected
CheckRes error
JackSocketClientChannel read fail
Cannot open qjackctl client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Comment 14 Luc 2023-03-03 07:26:36 UTC
(In reply to Yuri Victorovich from comment #12)

I deleted /home/luc/.config/jack/conf.xml and the problem remains.

I ran cadence, catia and qjackctl. None of them connected and the conf.xml file was not recreated.
Comment 15 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 07:42:52 UTC
I added dev@submerge.ch, the maintainer of the audio/jack port.
Maybe he will have some insight into this Jack problem.
Comment 16 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-03 07:47:55 UTC
I also created the Jack bug report with the question about your problem: https://github.com/jackaudio/jack2/issues/922

Maybe somebody would have an insight why this is happening.
Comment 17 Luc 2023-03-03 07:54:46 UTC
Thank you, very much!
Comment 18 Tatsuki Makino 2023-03-03 08:33:42 UTC
(In reply to Yuri Victorovich from comment #12)

I've been stuck with JACK for the past few weeks, so I'll share a bit :)

Well, first...
There is something strange about jacks run by /usr/local/etc/rc.d/jackd .
So unless the JACK needs to be a real-time process, this should be discarded :)

> ~/.config/jack/conf.xml
This seems to be what jackdbus would make.

It seems that jackdbus is closer to reaching the goal of getting sound out.
Just start it in a terminal on X as follows

jack_control start

The default seems to be that a dummy is selected as the initial driver, so switch to oss.

jack_control ds oss
jack_control dg

This should be all that is needed to get the sound.
When the software that uses the jack is launched, we will get the following message

> Cannot lock down 107341340 byte memory area (Cannot allocate memory)

This is the end of memory allocation, but since mlock seems to have failed, no action is required.
If nothing is done about it, it is only that the memory may be moved to swap.

Since the started jackdbus uses dbus, the termination of X will terminate it, but it can be terminated with the following command.

jack_control exit


...and well, I've searched high and low for this usage on FreeBSD, so I hope it will be useful for someone else's shortcut :)
Comment 19 Florian Walpen 2023-03-03 11:42:18 UTC
(In reply to Luc from comment #13)

Hi Luc, as stated in the pkg message there are two methods to start JACK, the rc service and the more modern DBUS variant. You can only use one at a time, and it looks like you get a mixup. Unfortunately none of the GUI tools can produce FreeBSD-compatible settings at the moment. And some of them try to start or change the DBUS variant on their own, since that is widely used on Linux.

If you want to keep using the rc service, you should be able to stop the DBUS one with 'jack_control exit'. But I suppose there was no 'jackdbus' process running? Does the socket in /tmp/jack_default_1001_0 disappear if you 'service jackd stop'?

Things you could check:
- Logs in /var/log/jackd.log (service) and .log/jack/jackdbus.log (DBUS).
- Only one of them should be written to (timestamps).
- Start jackd service, new login, no GUI tools and try the hydrogen app.
- Disable any settings or autostart features in QJackctl, Cadence, Catia.

Please note that the whole ecosystem seems to transition to DBUS, and it may be easier to go that route in the long run. But you have to configure the setup manually with 'jack_control'. See
https://github.com/0EVSG/freebsd_jack_notes#dbus-or-rc-service
Comment 20 Florian Walpen 2023-03-03 12:03:54 UTC
(In reply to Tatsuki Makino from comment #18)

Hi Tsatsuki, just some clarifications:

> So unless the JACK needs to be a real-time process, this should be discarded :)

From FreeBSD 13.1 onwards there is a 'realtime' group / MAC policy. Privileged users can run both jackdbus and clients with realtime priority, which is preferable. See
https://github.com/0EVSG/freebsd_jack_notes#realtime-priority

Regarding 'jack_control' setup, you probably should adapt the oss backend settings with 'jack_control dp' to your hardware, see
https://github.com/0EVSG/freebsd_jack_notes#jack-settings

And if you want to get rid of the memory locking message, there is
https://github.com/0EVSG/freebsd_jack_notes#memory-locking

Hope that helps.
Comment 21 Luc 2023-03-04 01:03:36 UTC
Many thanks for all the help!

After reading everything and making experimentations, I seem to have solved most of the problem.

At first, I couldn't follow Tatsuki's instructions:

--------------------------------------------
fsd1@ /u/h/luc> jack_control start
--- start
DBus exception: org.jackaudio.Error.Generic: Failed to open server


root@fsd1:/usr/home/luc # jack_control start
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # ps uax | grep jack
root        967   0.0  0.1   12848   2200  -  I<s  20:38   0:00.00 daemon: /usr/local/bin/jackd[968] (daemon)
luc         968   0.0  6.3  149684 129296  -  I<s  20:38   0:00.14 /usr/local/bin/jackd -doss -r48000 -p1024 -n1 -w16 --capture /dev/dsp0 --playback /dev/dsp0
luc        1083   0.0  0.3   18244   5772  -  Ss   20:41   0:00.02 /usr/local/bin/jackdbus auto
root       1094   0.0  0.0     436    252  1  R+   20:42   0:00.00 grep jack

root@fsd1:/usr/home/luc # jack_control ds oss
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.
--------------------------------------------



The jackd.log file only had many lines like this:

[Fri Mar  3 04:10:58 -03 2023] Starting the daemon, user=luc rtprio=YES args="-R -doss -r48000 -p1024 -n1 -w16 --capture /dev/dsp0 --playback /dev/dsp0"

The jackdbus.log file had very similar content to cadence or qjackctl's logs.


So I had the idea to disable something. I began with dbus. I removed this line from my rc.conf:

dbus_enable="YES"

Or rather changed it to "NO"

When I rebooted, some error dialog popped-up complaining about something. It was extremely vague and I couldn't identify what application was complaining. And the problems with jack remained.

So I channged it back to dbus_enable="YES" and changed my rc.conf file from this:

jackd_enable="YES"
jackd_user="luc"
jackd_rtprio="YES"
jackd_args="-R -doss -r48000 -p1024 -n1 -w16 --capture /dev/dsp0 --playback /dev/dsp0"

to this:

jackd_enable="NO"
jackd_user="luc"
jackd_rtprio="YES"
jackd_args="-R -doss -r48000 -p1024 -n1 -w16 --capture /dev/dsp0 --playback /dev/dsp0"

Then I rebooted and saw that jack was no longer running at startup, but I could finally start it with cadence just like I do on Linux. Catia and Qjackctl also work fine.

So I guess that's it. It's solved.

Again, many thanks!

It's interesting because jackd_enable="NO" goes against the grain of all the recipes I've found. Even Yuri uses jackd_enable="YES". Maybe maintainers should have a longer look at this? I honestly don't know.

Only Qtractor is still not working. It says:

"The audio/MIDI engine could not be started.
Make sure the JACK audio server (jackd) and alsa-seq-server (installed by audio/alsa-seq-server) are up and running and then restart the session."

According to ps aux, no. It seems that alsa-seq-server is not running.

I have this line in my rc.conf:

alsa_seq_server_enable="YES"

But it seems it's not enough.

If anybody wants to help me with that as a bonus, I'll appreciate it too.
Comment 22 Tatsuki Makino 2023-03-04 06:10:39 UTC
(In reply to Florian Walpen from comment #20)

Thank you.
This place is so good that alone I don't need to read the Ar*hLinux wiki :)

(In reply to Luc from comment #21)

I can reproduce that dbus sessionbus error in my environment.
It is to rewrite the environment variable DBUS_SESSION_BUS_ADDRESS to bullshit :)

It seems to me that if jackdbus is used, then that of dbus must also match in all processes.
An explanation of it can be found in EXAMPLES of man dbus-launch.
Comment 23 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-04 06:10:53 UTC
(In reply to Luc from comment #21)

> According to ps aux, no. It seems that alsa-seq-server is not running.

alsa-seq-server needs to be installed separately, and started as a service (/etc/rc.conf).
Comment 24 Florian Walpen 2023-03-04 18:42:07 UTC
(In reply to Luc from comment #21)

In principle, JACK clients should accept an already running jackd server started by rc service. But one of the applications you use insists on starting another server via DBUS, which fails. Thus completely switching to the DBUS method as you did is certainly the easiest solution.

To change some settings like the audio hardware used or the number of channels, use 'jack_control dp', and _not_ any of the GUI tools,

If you want to get serious about quality of the audio output, latency (for recordings), or have timing problem like pops and crackles, all my knowledge about it is written in notes I linked to.

> It's interesting because jackd_enable="NO" goes against the grain of all the recipes I've found.

The possibility of using DBUS for this only appeared in the last year or so, which means many recipes on the web will be outdated. If you came across any official or semi-official documentation that should be updated, please report it there.


Some ideas about alsa-seq-server:

man alsa-seq-server

> TROUBLESHOOTING
>     Check that the permissions are correct for your MIDI devices and that the
>     cuse kernel module is loaded.

man cuse

>     To load the required kernel module at boot time, place the following line
>     in loader.conf(5):
>
>           cuse_load="YES"

Also it looks like it only works with USB audio/MIDI devices - what hardware do you have?
Comment 25 Florian Walpen 2023-03-04 18:45:40 UTC
(In reply to Tatsuki Makino from comment #22)

I remember having troubles with DBUS after suspend / resume. Thanks for the pointer to dbus-launch - don't know yet where the culprit is, have to read up a bit first.
Comment 26 Florian Walpen 2023-03-04 18:48:50 UTC
(In reply to Yuri Victorovich from comment #23)

> alsa-seq-server needs to be installed separately, and started as a service (/etc/rc.conf).

Is there reason that alsa-seq-server isn't a runtime dependency of QTractor? Sounds like it can't be used without it?
Comment 27 Tatsuki Makino 2023-03-05 06:00:25 UTC
I understand a little.
Probably the jack side and the dbus side are not a problem.

The problem is that there is no oss on https://bugs.freebsd.org/bugzilla/attachment.cgi?id=240551 screen.
And that touching the line with dummy, Loopback, Net and NetOne also switches the driver selection.
so it is always necessary to use jack_control ds oss to return to oss.

There is nothing in ${WRKSRC}/resources/ui/settings_jack.ui about displaying OSS there.
Some addition to ${WRKSRC}/src/jacksettings.py may also be needed.
I will not touch it any more as there appears to be a bomb buried in it that will rewrite my current configuration without my permission 🤣

If the ALSA option in audio/jack is enabled and jack is installed, then maybe we can use this with jack via alsa.
Comment 28 Luc 2023-03-05 20:33:14 UTC
Hello everyone. I made a little more progress. Just not quite there yet.

After a few more attempts and experimentations, I could make Qtractor work with Florian's tip: cuse_load="YES" in loader.conf.

Now Qtractor won't complain and will let me compose. Good.

Except that I can't hear anything. For example, I loaded the Yoshimi synth. I could press the keys on a virtual piano keyboard and I could graphic see sound meters jump up. That means the synth is sending audio signal somewhere, but I can't hear it.

So I tried ZynAddSubFX outside of Qtractor. There are four ZynAddSubFX versions in the application menu:

ZynAddSubFX - ALSA
ZynAddSubFX - JACK
ZynAddSubFX - JACK (multi channel)
ZynAddSubFX - OSS

Only OSS produces sound. All others are mute.

I also tried a synth called amsynth. I can't hear it either and the driver/sound architecture selection in the configuration is a little confusing. Well, in fact it's too simple, so simple I can't believe it's just that. Since it isn't working, I am not to happy with the simplicity.

One thing that calls my attention is the "JACK Bridges" in the first screen of cadence. The first tab is ALSA audio and there is a drop-down menu. One of the options, ALSA -> Loop -> JACK has to be enabled in my Linux machine. Disabled, there is no sound. Well, it's disabled in FreeBSD and I can't enable it. I click it multiple times and get this output in the logging tool:

Sun Mar  5 17:25:10 2023: ERROR: Cannot read socket fd = 12 err = Socket is not connected
Sun Mar  5 17:25:10 2023: New client 'cadence-aloop-daemon' with PID 1471
Sun Mar  5 17:25:11 2023: Client 'cadence-aloop-daemon' with PID 1471 is out
Sun Mar  5 17:25:12 2023: ERROR: Cannot read socket fd = 12 err = Socket is not connected
Sun Mar  5 17:25:12 2023: New client 'cadence-aloop-daemon' with PID 1473
Sun Mar  5 17:25:12 2023: Client 'cadence-aloop-daemon' with PID 1473 is out
Sun Mar  5 17:25:14 2023: ERROR: Cannot read socket fd = 12 err = Socket is not connected
Sun Mar  5 17:25:14 2023: New client 'cadence-aloop-daemon' with PID 1475
Sun Mar  5 17:25:14 2023: Client 'cadence-aloop-daemon' with PID 1475 is out
Sun Mar  5 17:25:15 2023: ERROR: Cannot read socket fd = 12 err = Socket is not connected
Sun Mar  5 17:25:15 2023: New client 'cadence-aloop-daemon' with PID 1477
Sun Mar  5 17:25:15 2023: Client 'cadence-aloop-daemon' with PID 1477 is out

Meanwhile, Audacious can play sound using the OSS4 output option. But there is no JACK option. That's strange because I think every one of my large number of audio applications in Linux has the JACK option. I use ALSA in Audacious (Linux), but there is a JACK option. Audacious in FreeBSD doesn't have ALSA or JACK options. It seems to expect OSS or PulseAudio. So it seems that audio is just as complicated in FreeBSD as it is in Linux.
Comment 29 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-05 20:39:18 UTC
(In reply to Luc from comment #28)

> Except that I can't hear anything.

Does qjackctl show that Jack clients are connected to the output?
Comment 30 Luc 2023-03-05 20:44:12 UTC
I use Catia to check that.
Yes, everything is connected as expected.

I believe that ALSA -> Loop -> JACK bridge is the critical missing ppart.
Comment 31 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-05 21:06:06 UTC
(In reply to Luc from comment #30)

Yoshimi works on my system - sounds are audible when keys are pressed.

Do any Jack apps play sound?
For example, does Jamulus play sound?

If not, it is possible that Jack routs audio to a wrong OSS device (/dev/dspN).
Comment 32 Luc 2023-03-05 21:22:23 UTC
I'm not sure I used Jamulus correctly. I connected to a few servers and saw what seemed to be connection statistics, but never heard a sound.

On Linux, I can run cadence-aloop-daemon, but not on FreeBSD:

fsd1@ /u/h/luc> cadence-aloop-daemon
Traceback (most recent call last):
  File "/usr/local/share/cadence/src/cadence_aloop_daemon.py", line 185, in <module>
    os.mknod(checkFile)
OSError: [Errno 22] Invalid argument

fsd1@ /u/h/luc> su root
Password:

root@fsd1:/usr/home/luc # cadence-aloop-daemon 
Cannot connect to server socket err = Connection refused
Cannot connect to server request channel
Connection Error (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.)
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
cadence-aloop-daemon is already running, delete "/tmp/.cadence-aloop-daemon.x" to close it
Comment 33 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-05 21:26:18 UTC
(In reply to Luc from comment #32)

Jamulus should play sound without anything else, once you connect to a channel and it is connected in Jack.

It looks like Jack isn't connected to a correct OSS device.
What does /dev/dsp* show?

Does 'cp /dev/random /dev/dspN' play sound for the OSS device that Jack uses for playback?
Comment 34 Tatsuki Makino 2023-03-05 21:32:30 UTC
Cadence is expected to write out a configuration that gives no consideration to OSS.
Therefore, it is better not to use it on FreeBSD, where the final output interface to hardware is OSS.

As already noted, the jackdbus driver may no longer be oss, and ~/.asoundrc may contain settings that don't reach OSS.
Comment 35 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-05 22:00:02 UTC
https://github.com/falkTX/Cadence/issues/360
Comment 36 Luc 2023-03-05 22:43:53 UTC
(In reply to Yuri Victorovich from comment #33)

root@fsd1:~ # ls -la /dev/dsp*
crw-rw-rw-  1 root  wheel  0x7a Mar  5 18:31 /dev/dsp0.0
crw-rw-rw-  1 root  wheel  0x7c Mar  5 18:31 /dev/dsp1.0
crw-rw-rw-  1 root  wheel  0x7e Mar  5 18:31 /dev/dsp2.0

Does 'cp /dev/random /dev/dspN' play sound for the OSS device that Jack uses for playback?

I don't know.
cp /dev/random /dev/dsp0 produces noise. (pink noise?)
cp /dev/random /dev/dsp1 produces noise.
cp /dev/random /dev/dsp2 produces noise.

What OSS device does jack use though? I don't know. I can't find that anywhere.

But I made another progress.
I run cadence. I click Stop. Then I run qjackctl and click Start.
Then sound works in Qtractor. Finally!

However, when I click Stop and Start again in qjackctl, jack sound is dead again.

It seems, I am not sure, but it seems the following recipe works:
Run cadence and make sure it is stopped. Then I run qjackctl and click Start. Sound works in Qtractor again. It seems that whenever I click Start in cadence, jack dies. The fix is to stop both cadence and qjackctl then click Start in qjackctl only. That seems to fix it.

The only problem is I can't use Catia, but qjackctl also has a decent patch bay called "Graph." (And the "Patch Bay" button contains another kind and a bad kind of patch bay - shrug.)

Yes, looks like I will have to ditch cadence (and catia and others). It doesn't really work in FreeBSD. It even breaks jack.
Comment 37 Luc 2023-03-05 22:46:29 UTC
Oh, just another problem. If I run Qtractor while jack is turned off, it no longer complains. It turns jack on on its own!
But it always picks the bad jack, the poisonous, killer jack.

I wonder if there is something I can/should uninstall to clean up this mess.
Comment 38 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-05 22:56:36 UTC
(In reply to Luc from comment #37)

I am not sure, but it might be that the DBUS interface isn't stable. Jack shouldn't be stopped and started. I only use RC-started Jack, and it is rock-solid.

DBUS is mostly for the situation of a multi-user setup, which many people don't need.
Comment 39 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-05 23:48:03 UTC
Multi-user setups usually have users logging through VNC and alike. Usually audio isn't important in such setups. If you run an individual workstation you should start Jack through RC script for stability.

IMO you shouldn't use experimental setups and then struggle with them.
Comment 40 Florian Walpen 2023-03-06 01:52:17 UTC
(In reply to Luc from comment #36)

Unfortunately we still don't know what hardware you want to use. Maybe

# dmesg | grep -B 5 pcm

will give you a clue which device is needed. Or try the different devices with a sound player that lets you choose the OSS device, like VLC.
In any case, please post the output of

# sysctl hw.snd.verbose=2
# cat /dev/sndstat

for us.


About JACK, please stop using GUI tools like QJackCtl, Cadence et al for now - you can still try to use them for start/stop and routing later on, but first you need some known working setup with the 'jack_control' CLI.

Open a terminal and in your home directory do:

tail -F .log/jack/jackdbus.log

Then in another terminal have a look at the settings as described here
https://github.com/0EVSG/freebsd_jack_notes#jack-settings

You probably only have to change the driver to "oss" and set the hardware device, since you already had successful sound output before.

Now try to run the server with "jack_control start", watch for errors in the logs, and stop again with "jack_control exit". If it seems to work, try a simple application like hydrogen to test sound output. If successful, remember the settings so you can observe and reset them should any of your applications mess it up.

And yes, clients like Qtractor will start a server via DBUS if they don't find one running already. That's the idea. They shouldn't mess with your settings though.
Comment 41 Tatsuki Makino 2023-03-06 02:15:18 UTC
(In reply to Yuri Victorovich from comment #35)

It may not be the right time?


Cadence seems to be a configuration tool for jackdbus.
So this will be about jackdbus...

I replaced JACK with one that has the ALSA option turned on, but as it turns out, this is not available either.

Before jack_control start, the driver must be switched to alsa by
jack_control ds alsa
and the device must be switched to null by
jack_control dps device null

By doing this, the JACK works.
ALSA appears as the Linux one in the attachment here.
However, nothing can be done as there are only items that configure the hardware.
Is there something in ALSA that makes OSS look like hardware?
~/.asoundrc will also be rewritten by cadence, and settings will be written in it that point to the hardware.
It seems that fixed settings must be made on the /usr/local/etc/asound.conf side.

It is possible that ALSA options of JACK is something that should not be used.
Comment 42 Tatsuki Makino 2023-03-06 03:32:14 UTC
(In reply to Yuri Victorovich from comment #23)

I feel like this is the place to identify all the problems with setting up audio software... :)

I looked at pkg-message of qtractor, but it seems better to write required_modules="cuse" in ${LOCALBASE}/etc/rc.d/alsa_seq_server instead of adding supplementary information there.
Comment 43 Luc 2023-03-06 18:16:34 UTC
(In reply to Florian Walpen from comment #40)

Florian,

root@fsd1:~ # dmesg | grep -B 5 pcm
ZFS storage pool version: features support (5000)
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
hdacc0: <Sigmatel STAC9221 HDA CODEC> at cad 0 on hdac0
hdaa0: <Sigmatel STAC9221 Audio Function Group> at nid 1 on hdacc0
pcm0: <Sigmatel STAC9221 (Analog 5.1/4ch)> at nid 12,11,15 and 14,21 on hdaa0
pcm1: <Sigmatel STAC9221 (Front Analog Headphones)> at nid 10 on hdaa0
pcm2: <Sigmatel STAC9221 (Rear Digital)> at nid 16 and 17 on hdaa0


root@fsd1:~ # sysctl hw.snd.verbose=2
hw.snd.verbose: 0 -> 2
root@fsd1:~ # cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <Sigmatel STAC9221 (Analog 5.1/4ch)> on hdaa0  (1p:1v/1r:1v) default
        snddev flags=0xee2<AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC,EQ,EQ_ENABLED>
        [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000014
        interrupts 1042, underruns 0, feed 1041, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {userland} -> feeder_mixer(0x00200010) -> feeder_eq(0x00200010) -> {hardware}
        pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
        interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:8192/1024/8]
        channel flags=0x10000000<VIRTUAL>
        {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
        [pcm0:record:dsp0.r0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000005
        interrupts 4072, overruns 0, feed 8144, hfree 512, sfree 512 [b:512/256/2|bs:512/256/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
        pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
        interrupts 0, overruns 0, feed 0, hfree 0, sfree 32768 [b:0/0/0|bs:32768/256/128]
        channel flags=0x10000000<VIRTUAL>
        {hardware} -> feeder_root(0x00200010) -> feeder_rate(0x00200010 q:1 48000 -> 44100) -> feeder_volume(0x00200010) -> {userland}
pcm1: <Sigmatel STAC9221 (Front Analog Headphones)> on hdaa0  (1p:1v/0r:0v)
        snddev flags=0xee3<SIMPLEX,AUTOVCHAN,BUSY,MPSAFE,REGISTERED,VPC,EQ,EQ_ENABLED>
        [pcm1:play:dsp1.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000014
        interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x2100<BUSY,HAS_VCHAN>
        {userland} -> feeder_mixer(0x00200010) -> feeder_eq(0x00200010) -> {hardware}
        pcm1:play:dsp1.p0[pcm1:virtual:dsp1.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
        interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:8192/1024/8]
        channel flags=0x10000000<VIRTUAL>
        {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
pcm2: <Sigmatel STAC9221 (Rear Digital)> on hdaa0  (1p:1v/1r:1v)
        snddev flags=0x2e6<AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,VPC>
        [pcm2:play:dsp2.p0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000004
        interrupts 0, underruns 0, feed 0, ready 0 [b:2048/1024/2|bs:2048/1024/2]
        channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
        {userland} -> feeder_mixer(0x00200010) -> {hardware}
        pcm2:play:dsp2.p0[pcm2:virtual:dsp2.vp0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
        interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:8192/1024/8]
        channel flags=0x10000000<VIRTUAL>
        {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> feeder_rate(0x00200010 q:1 44100 -> 48000) -> {hardware}
        [pcm2:record:dsp2.r0]: spd 48000, fmt 0x00200010, flags 0x00006100, 0x00000005
        interrupts 3822, overruns 0, feed 7644, hfree 512, sfree 512 [b:512/256/2|bs:512/256/2]
        channel flags=0x6100<BUSY,HAS_VCHAN,VCHAN_PASSTHROUGH>
        {hardware} -> feeder_root(0x00200010) -> feeder_mixer(0x00200010) -> {userland}
        pcm2:record:dsp2.r0[pcm2:virtual:dsp2.vr0]: spd 44100/48000, fmt 0x00200010, flags 0x10000000, 0x00000029
        interrupts 0, overruns 0, feed 0, hfree 0, sfree 32768 [b:0/0/0|bs:32768/256/128]
        channel flags=0x10000000<VIRTUAL>
        {hardware} -> feeder_root(0x00200010) -> feeder_rate(0x00200010 q:1 48000 -> 44100) -> feeder_volume(0x00200010) -> {userland}
No devices installed from userspace.
---------------------------------------------------------------------

My installation is messy.
I booted. Checked ps aux, jackd was not running.
I started it with jack_control start.
I ran Qtractor. No sound.
I knew what happened. I opened cadence and the Start button was disabled, the Stop button was enabled. Jackdbus was running. Qtractor must have started it. Whatever I started with jack_control start was not good enough for Qtractor.
So I clicked Stop in cadence and Start on qjackctl.
Ran Qtractor again, sound was OK.
It's messy.
Comment 44 Luc 2023-03-06 18:18:18 UTC
Here is the .log/jack/jackdbus.log for the session I just described.


Mon Mar  6 15:06:31 2023: ------------------
Mon Mar  6 15:06:31 2023: Controller activated. Version 1.9.22 ([]) built on Sat Feb 18 07:28:18 2023
Mon Mar  6 15:06:31 2023: [1m[31mERROR: [0m
Mon Mar  6 15:06:31 2023: [1m[31mERROR: jack_get_descriptor returns null for 'jack_inprocess.so'[0m
Mon Mar  6 15:06:31 2023: [1m[31mERROR: [0m
Mon Mar  6 15:06:31 2023: [1m[31mERROR: jack_get_descriptor returns null for 'jack_intime.so'[0m
Mon Mar  6 15:06:31 2023: [1m[31mERROR: [0m
Mon Mar  6 15:06:31 2023: [1m[31mERROR: jack_get_descriptor returns null for 'jack_internal_metro.so'[0m
Mon Mar  6 15:06:31 2023: Loading settings from "/home/luc/.config/jack/conf.xml" using expat_2.5.0 ...
Mon Mar  6 15:06:31 2023: setting parameter 'engine':'driver':'(null)' to value "dummy"
Mon Mar  6 15:06:31 2023: setting parameter 'drivers':'dummy':'rate' to value "44100"
Mon Mar  6 15:06:31 2023: setting parameter 'drivers':'dummy':'period' to value "2048"
Mon Mar  6 15:06:31 2023: Listening for D-Bus messages
Mon Mar  6 15:06:31 2023: Starting jack server...
Mon Mar  6 15:06:31 2023: JACK server starting in realtime mode with priority 10
Mon Mar  6 15:06:31 2023: self-connect-mode is "Don't restrict self connect requests"
Mon Mar  6 15:06:31 2023: [1m[31mERROR: Cannot use real-time scheduling (RR/10) (1: Operation not permitted)[0m
Mon Mar  6 15:06:31 2023: [1m[31mERROR: AcquireSelfRealTime error[0m
Mon Mar  6 15:06:32 2023: graph reorder: new port 'system:capture_1'
Mon Mar  6 15:06:32 2023: New client 'system' with PID 0
Mon Mar  6 15:06:32 2023: graph reorder: new port 'system:capture_2'
Mon Mar  6 15:06:32 2023: graph reorder: new port 'system:playback_1'
Mon Mar  6 15:06:32 2023: graph reorder: new port 'system:playback_2'
Mon Mar  6 15:06:32 2023: [1m[31mERROR: Cannot read socket fd = 8 err = No error: 0[0m
Mon Mar  6 15:06:32 2023: New client 'Qtractor' with PID 1160
Mon Mar  6 15:06:34 2023: Connecting 'system:capture_1' to 'Qtractor:Master/in_1'
Mon Mar  6 15:06:34 2023: Connecting 'system:capture_2' to 'Qtractor:Master/in_2'
Mon Mar  6 15:06:34 2023: Connecting 'Qtractor:Master/out_1' to 'system:playback_1'
Mon Mar  6 15:06:34 2023: Connecting 'Qtractor:Master/out_2' to 'system:playback_2'
Mon Mar  6 15:06:37 2023: Disconnecting 'system:capture_1' from 'Qtractor:Master/in_1'
Mon Mar  6 15:06:37 2023: Disconnecting 'system:capture_2' from 'Qtractor:Master/in_2'
Mon Mar  6 15:06:37 2023: Disconnecting 'Qtractor:Master/out_1' from 'system:playback_1'
Mon Mar  6 15:06:37 2023: Disconnecting 'Qtractor:Master/out_2' from 'system:playback_2'
Mon Mar  6 15:06:37 2023: Client 'Qtractor' with PID 1160 is out
Mon Mar  6 15:06:37 2023: [1m[31mERROR: Cannot read socket fd = 8 err = No such file or directory[0m
Mon Mar  6 15:06:37 2023: New client 'Qtractor' with PID 1160
Mon Mar  6 15:06:41 2023: Connecting 'system:capture_1' to 'Qtractor:Master/in_1'
Mon Mar  6 15:06:41 2023: Connecting 'system:capture_2' to 'Qtractor:Master/in_2'
Mon Mar  6 15:06:41 2023: Connecting 'Qtractor:Master/out_1' to 'system:playback_1'
Mon Mar  6 15:06:41 2023: Connecting 'Qtractor:Master/out_2' to 'system:playback_2'
Mon Mar  6 15:07:16 2023: Disconnecting 'system:capture_1' from 'Qtractor:Master/in_1'
Mon Mar  6 15:07:16 2023: Disconnecting 'system:capture_2' from 'Qtractor:Master/in_2'
Mon Mar  6 15:07:16 2023: Disconnecting 'Qtractor:Master/out_1' from 'system:playback_1'
Mon Mar  6 15:07:16 2023: Disconnecting 'Qtractor:Master/out_2' from 'system:playback_2'
Mon Mar  6 15:07:16 2023: Client 'Qtractor' with PID 1160 is out
Mon Mar  6 15:07:25 2023: [1m[31mERROR: Cannot read socket fd = 8 err = No such file or directory[0m
Mon Mar  6 15:07:25 2023: New client 'a2j' with PID 1172
Mon Mar  6 15:07:27 2023: Client 'a2j' with PID 1172 is out
Mon Mar  6 15:07:27 2023: Stopping jack server...
Mon Mar  6 15:07:27 2023: Client 'system' with PID 0 is out
Mon Mar  6 15:07:35 2023: Starting jack server...
Mon Mar  6 15:07:35 2023: JACK server starting in realtime mode with priority 10
Mon Mar  6 15:07:35 2023: self-connect-mode is "Don't restrict self connect requests"
Mon Mar  6 15:07:35 2023: [1m[31mERROR: Cannot use real-time scheduling (RR/10) (1: Operation not permitted)[0m
Mon Mar  6 15:07:35 2023: [1m[31mERROR: AcquireSelfRealTime error[0m
Mon Mar  6 15:07:35 2023: graph reorder: new port 'system:capture_1'
Mon Mar  6 15:07:35 2023: New client 'system' with PID 0
Mon Mar  6 15:07:35 2023: graph reorder: new port 'system:capture_2'
Mon Mar  6 15:07:35 2023: graph reorder: new port 'system:playback_1'
Mon Mar  6 15:07:35 2023: graph reorder: new port 'system:playback_2'
Mon Mar  6 15:07:35 2023: [1m[31mERROR: Cannot read socket fd = 8 err = No error: 0[0m
Mon Mar  6 15:07:35 2023: New client 'a2j' with PID 1172
Mon Mar  6 15:07:36 2023: [1m[31mERROR: Cannot read socket fd = 10 err = No error: 0[0m
Mon Mar  6 15:07:36 2023: New client 'Qtractor' with PID 1173
Mon Mar  6 15:07:38 2023: Connecting 'system:capture_1' to 'Qtractor:Master/in_1'
Mon Mar  6 15:07:38 2023: Connecting 'system:capture_2' to 'Qtractor:Master/in_2'
Mon Mar  6 15:07:38 2023: Connecting 'Qtractor:Master/out_1' to 'system:playback_1'
Mon Mar  6 15:07:38 2023: Connecting 'Qtractor:Master/out_2' to 'system:playback_2'
Mon Mar  6 15:07:41 2023: Disconnecting 'system:capture_1' from 'Qtractor:Master/in_1'
Mon Mar  6 15:07:41 2023: Disconnecting 'system:capture_2' from 'Qtractor:Master/in_2'
Mon Mar  6 15:07:41 2023: Disconnecting 'Qtractor:Master/out_1' from 'system:playback_1'
Mon Mar  6 15:07:41 2023: Disconnecting 'Qtractor:Master/out_2' from 'system:playback_2'
Mon Mar  6 15:07:41 2023: Client 'Qtractor' with PID 1173 is out
Mon Mar  6 15:07:41 2023: [1m[31mERROR: Cannot read socket fd = 10 err = No such file or directory[0m
Mon Mar  6 15:07:41 2023: New client 'Qtractor' with PID 1173
Mon Mar  6 15:07:43 2023: Connecting 'system:capture_1' to 'Qtractor:Master/in_1'
Mon Mar  6 15:07:43 2023: Connecting 'system:capture_2' to 'Qtractor:Master/in_2'
Mon Mar  6 15:07:43 2023: Connecting 'Qtractor:Master/out_1' to 'system:playback_1'
Mon Mar  6 15:07:43 2023: Connecting 'Qtractor:Master/out_2' to 'system:playback_2'
Mon Mar  6 15:07:51 2023: Disconnecting 'system:capture_1' from 'Qtractor:Master/in_1'
Mon Mar  6 15:07:51 2023: Disconnecting 'system:capture_2' from 'Qtractor:Master/in_2'
Mon Mar  6 15:07:51 2023: Disconnecting 'Qtractor:Master/out_1' from 'system:playback_1'
Mon Mar  6 15:07:51 2023: Disconnecting 'Qtractor:Master/out_2' from 'system:playback_2'
Mon Mar  6 15:07:52 2023: Client 'Qtractor' with PID 1173 is out
Mon Mar  6 15:08:01 2023: Client 'a2j' with PID 1172 is out
Mon Mar  6 15:08:01 2023: Stopping jack server...
Mon Mar  6 15:08:01 2023: Client 'system' with PID 0 is out
Comment 45 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-06 18:20:14 UTC
(In reply to Tatsuki Makino from comment #42)

Hi Tatsuki,

> I looked at pkg-message of qtractor, but it seems better to write required_modules="cuse" in ${LOCALBASE}/etc/rc.d/alsa_seq_server instead of adding supplementary information there.

I also suggested this for alsa_seq_server: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269984

Best,
Yuri
Comment 46 Luc 2023-03-06 18:38:15 UTC
More tests:

conf.rc:

1. Changed from 
dbus_enable"YES"
jackd_enable="NO"

To
dbus_enable="NO"
jackd_enable="YES"

After boot, lxpolkit displays a very vague complaint about something missing.
Qtractor won't start.
I can't start jackd from the command line, cadence or qjackctl.

------------------
2. Changed from 
dbus_enable="NO"
jackd_enable="YES"

To
dbus_enable="YES"
jackd_enable="YES"

After boot, Qtractor won't start.
I can't start jackd from the command line, cadence or qjackctl.

------------------
3. Changed from 
dbus_enable="YES"
jackd_enable="YES"

To
dbus_enable="YES"
jackd_enable="NO"

After boot, run Qjackctl and press Start. Qtractor will start and has sound.

Only procedure 3 works. But it may stop working randomly. I've seen it happen.
Comment 47 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-06 18:46:13 UTC
(In reply to Luc from comment #46)

You don't need to reboot for this.
You need to permanently leave dbus_enable="YES" in /etc/rc.conf

These commands should start/stop Jack via DBUS:
$ jack_control start
$ jack_control stop

These commands should start/stop Jack via RC:
$ sudo service jackd onestart
$ sudo service jackd onestop

This command:
$ ps ax | grep jackd
should show what options the RC service is using.

This command:
$ jack_control dp
shows what options Jack started from DBUS is using.

playback and capture devices should be the same in both.
Comment 48 Luc 2023-03-06 19:06:26 UTC
(In reply to Yuri Victorovich from comment #47)

None of that works. I get errors in the output and Qtractor has no sound.

fsd1@ /u/h/luc> su root
Password:

root@fsd1:/usr/home/luc # jack_control start
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control start
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control dp
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control dp
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # service jackd onestop
jackd not running?

root@fsd1:/usr/home/luc # service jackd onestart
Starting jackd.

jack_get_descriptor returns null for 'jack_inprocess.so'

jack_get_descriptor returns null for 'jack_intime.so'

jack_get_descriptor returns null for 'jack_internal_metro.so'
`default' server already active
Failed to open server
jackdmp 1.9.22
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2023 Filipe Coelho.
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

root@fsd1:/usr/home/luc # service jackd onestop
jackd not running?

root@fsd1:/usr/home/luc # service jackd onestop
jackd not running?

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.

root@fsd1:/usr/home/luc # jack_control stop
Traceback (most recent call last):
  File "/usr/local/bin/jack_control", line 414, in <module>
    sys.exit(main())
  File "/usr/local/bin/jack_control", line 397, in main
    bus = dbus.SessionBus()
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 209, in __new__
    return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
  File "/usr/local/lib/python3.9/site-packages/dbus/_dbus.py", line 99, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/local/lib/python3.9/site-packages/dbus/bus.py", line 120, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
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.
------------------------------------


What works:
Run cadence. Click Stop. Run qjackctl. Click Start. Qtractor has sound.
Comment 49 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-06 19:08:37 UTC
(In reply to Luc from comment #48)

'jack_control start' should be run as a regular user.
It would start the Jack server for your user.
Comment 50 Luc 2023-03-06 19:18:55 UTC
(In reply to Yuri Victorovich from comment #49)

OK. Regular user:

fsd1@ /u/h/luc> jack_control start
--- start
fsd1@ /u/h/luc> ps aux | grep jack
luc        1069   0.0  6.3  150136 130048  -  Ss   16:10   0:00.17 /usr/local/bin/jackdbus auto
luc        1083   0.0  0.2   14164   3228  0  S+   16:11   0:00.00 grep --color=auto jack (ggrep)
fsd1@ /u/h/luc> jack_control stop
--- stop
fsd1@ /u/h/luc> ps aux | grep jack
luc        1069  0.0  6.3  150520 130228  -  Ss   16:10   0:00.25 /usr/local/bin/jackdbus auto
luc        1086  0.0  0.0     724    476  0  R+   16:12   0:00.00 grep --color=auto jack (ggrep)
fsd1@ /u/h/luc> jack_control start
--- start

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

Qtractor starts, but has no sound.
I run jack_control stop while Qtractor is running and it complains immediately.
I run jack_control start and Qtractor stops complaining. But still has no sound.

So let's try the magic trick again.
Run cadence and press Stop.
It stops, but jackd will turn back on again.
Because Qtractor is running. It turns jackd on by itself.
Close Qtractor.
Press Stop in cadence.
It won't turn back on this time because Qtractor is not running.
I run qjackctl and press Start.
Run Qtractor.
Yes, it has sound again.
Comment 51 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-06 19:26:19 UTC
(In reply to Luc from comment #50)

$ ps aux | grep jack
- only shows jack options when it was started as RC service.

You need to compare Jack options for the RC service ($ ps aux | grep jack) and DBUS Jack instance ($ jack_control dp). playback and capture devices should be same.
Comment 52 Florian Walpen 2023-03-06 19:31:08 UTC
(In reply to Luc from comment #50)

You don't get sound because you never did the settings with jack_control as I told you. And you could have saved yourself a lot of time by doing a 5 minutes read. Again:

https://github.com/0EVSG/freebsd_jack_notes#jack-settings

Then you can start the server, and probably also Qtractor will be fine.
Comment 53 Florian Walpen 2023-03-06 19:38:37 UTC
(In reply to Luc from comment #43)

You probably want to set /dev/dsp0 (analog output) or /dev/dsp1 (headphones) - in case of the headphones you should only set the "playback" device, no "capture", there's no recording channel on that hardware.
Comment 54 Luc 2023-03-06 21:12:31 UTC
(In reply to Florian Walpen from comment #52)

Well, I did this. Did I miss something?

fsd1@ /u/h/luc> ps aux | grep jack
luc        1065  0.0  0.0     724    476  0  R+   18:05   0:00.00 grep --color=auto jack (ggrep)

fsd1@ /u/h/luc> jack_control start
--- start

fsd1@ /u/h/luc> jack_control dp
--- get driver parameters (type:isset:default:value)
             capture: Number of capture ports (uint:notset:2:2)
            playback: Number of playback ports (uint:notset:2:2)
                rate: Sample rate (uint:set:48000:44100)
             monitor: Provide monitor ports for the output (bool:notset:False:False)
              period: Frames per period (uint:set:1024:2048)
                wait: Number of usecs to wait between engine processes (uint:notset:21333:21333)

fsd1@ /u/h/luc> jack_control ds oss
--- driver select "oss"

fsd1@ /u/h/luc> jack_control dp
--- get driver parameters (type:isset:default:value)
                rate: Sample rate (uint:notset:48000:48000)
              period: Frames per period (uint:notset:1024:1024)
            nperiods: Number of periods to prefill output buffer (uint:notset:1:1)
          wordlength: Word length (sint:notset:16:16)
          inchannels: Capture channels (uint:notset:2:2)
         outchannels: Playback channels (uint:notset:2:2)
                excl: Exclusive and direct device access (bool:notset:False:False)
             capture: Input device (str:notset:/dev/dsp:/dev/dsp)
            playback: Output device (str:notset:/dev/dsp:/dev/dsp)
              device: OSS device name (str:notset:/dev/dsp:/dev/dsp)
         ignorehwbuf: Ignore hardware period size (bool:notset:False:False)
       input-latency: Extra input latency (uint:notset:0:0)
      output-latency: Extra output latency (uint:notset:0:0)

fsd1@ /u/h/luc> jack_control dps rate 44100
--- driver param set "rate" -> "44100"

fsd1@ /u/h/luc> jack_control dp
--- get driver parameters (type:isset:default:value)
                rate: Sample rate (uint:set:48000:44100)
              period: Frames per period (uint:notset:1024:1024)
            nperiods: Number of periods to prefill output buffer (uint:notset:1:1)
          wordlength: Word length (sint:notset:16:16)
          inchannels: Capture channels (uint:notset:2:2)
         outchannels: Playback channels (uint:notset:2:2)
                excl: Exclusive and direct device access (bool:notset:False:False)
             capture: Input device (str:notset:/dev/dsp:/dev/dsp)
            playback: Output device (str:notset:/dev/dsp:/dev/dsp)
              device: OSS device name (str:notset:/dev/dsp:/dev/dsp)
         ignorehwbuf: Ignore hardware period size (bool:notset:False:False)
       input-latency: Extra input latency (uint:notset:0:0)
      output-latency: Extra output latency (uint:notset:0:0)

fsd1@ /u/h/luc> ps aux | grep jack
luc        1068   0.0  6.3  150128 130408  -  Ss   18:06   0:00.14 /usr/local/bin/jackdbus auto
luc        1075   0.0  0.0     724    476  0  R+   18:07   0:00.00 grep --color=auto jack (ggrep)
-------------------------------------------------------------

Still no sound in Qtractor.

So I open cadence and press Stop, open qjackctl and press Start, launch Qtractor and yes, there is the sound again.
Comment 55 Luc 2023-03-06 22:04:12 UTC
I saw there was an upgrade for dbus so I upgraded dbus plus another package I don't remember, something involving dbus and qt5.

Now it seems that all my Qt-based applications are broken:

> Cannot mix incompatible Qt library (5.15.8) with this library (5.15.7)
Comment 56 Tatsuki Makino 2023-03-06 22:17:13 UTC
Good morning in my TZ :)

(In reply to Florian Walpen from comment #40)
> please stop using GUI tools like QJackCtl, Cadence et al for now

CLI will be easier to troubleshoot now that virtual cables seem to be tangled :)

I have tried using QjackCtl and it is good.
The A*chLinux wiki directs me to uninstall QjackCtl and use Cadence.
However, on FreeBSD there is no conflict with PulseAudio, which is the reason for uninstalling QjackCtl.
Therefore, QjackCtl should be strongly recommended as the GUI tool to use on FreeBSD.
And audio/cadence should be marked as broken :)

However, QjackCtl adds even more matters for Yuri and us to turn our head to.
QjackCtl can be used for both jackd and jackdbus.
It has an option to decide which one to use, but it does not seem to be able to determine which one is the already started JACK.


On a separate note, in very rare cases, there are jackdbus that are not stopped by jack_control exit.
In this case, I try to stop it with a signal, but for some reason SIGTERM does not work.
It seems better to use a signal that does not normally trap than SIGKILL.
For example, killall -XCPU jackdbus
If for some reason a jackd* appears whose settings do not work, try it :)
Comment 57 Luc 2023-03-06 22:21:02 UTC
I can't try anything anymore. All my Qt apps are broken and I don't know how to fix that.
Comment 58 Tatsuki Makino 2023-03-06 22:40:15 UTC
(In reply to Luc from comment #57)
What are the tools that put us in that condition?
I had a feeling portmaster would not....

First, rebuild and reinstall qt5-qmake and per qt5-buildtools.
There may be others yet to be done first, but unspecified :)

The following command will tell you qt5-* reinstalled within a day, so rebuild reinstall all but the one reinstalled earlier above.
pkg query -e "%t >= `date -v -1d -- +%s` && %n ~ qt5-*" -- "%t %n-%v"

and I sometimes do this kind of recovery, is there a better way? :)
Comment 59 Luc 2023-03-06 22:53:34 UTC
(In reply to Tatsuki Makino from comment #58)

I used Octopkg.

The command line you suggested gave me this:

# pkg query -e "%t >= `date -v -1d -- +%s` && %n ~ qt5-*" -- "%t %n-%v"
1678137439 qt5-dbus-5.15.8p157

Can I just remove that package and install an older one? And how?
Comment 60 Tatsuki Makino 2023-03-06 23:52:05 UTC
(In reply to Luc from comment #59)

It is a tool I did not know about :)
But since it is using Qt, does that mean that if the Qt version is in a mismatched state, it is also no longer started?

OctoPkg installs packages.
And there are Qt5 packages that have not yet been upgraded.
It is presumed to be in that condition.

Can that be restored with the following command?

1. Look for packages that have not been upgraded in the pkg version.
pkg version -R -l \<

2. Upgrade all the results of the above commands, especially those that contain qt5.
pkg upgrade qt5-something qt5-foo # <- I have never used this so I don't know if this is correct :)
Comment 61 Florian Walpen 2023-03-07 09:42:30 UTC
(In reply to Luc from comment #55)

> Cannot mix incompatible Qt library (5.15.8) with this library (5.15.7)

That looks like a partial upgrade to me. I think a "pkg upgrade -f" should fix it unless you build packages yourself or the package repo is broken. This will download and reinstall all packages, may take some time.
Comment 62 Florian Walpen 2023-03-07 09:59:21 UTC
(In reply to Luc from comment #54)

> Well, I did this. Did I miss something?

We're getting there. From my comments:

> You probably only have to change the driver to "oss" and set the hardware device, since you already had successful sound output before.

You didn't set the capture and playback device.

> You probably want to set /dev/dsp0 (analog output) or /dev/dsp1 (headphones) - in case of the headphones you should only set the "playback" device, no "capture", there's no recording channel on that hardware.

> Now try to run the server with "jack_control start", watch for errors in the logs, and stop again with "jack_control exit". If it seems to work, try a simple application like hydrogen to test sound output.

We need to have a look at the logs in ".log/jack/jackdbus.log" when you do "jack_control start". Make sure there is no other instance of jack running.

BTW, your hardware may have a fixed sample rate of 48kHz, so there will be conversion and more latency if you run at 44.1kHz.