Do I need to bother with Jack on Debian 12?

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

blockflute
Established Member
Posts: 41
Joined: Thu Apr 01, 2021 8:58 am
Has thanked: 6 times
Been thanked: 2 times

Do I need to bother with Jack on Debian 12?

Post by blockflute »

I tried to get Ardour working on Deb Bookworm a couple of years ago when it was still the Testing version. Various things went wrong despite help from kind people on this forum, and in the end I didn't have time to muck about and have been using Ubuntu Studio ever since. However, Deb 12 was recently released, which happens to coincide with getting a new(ish) laptop, so I'm trying out Deb 12 on the old one.

My audio requirements are very simple. I use Ardour and I have a Behringer UMC22 that handles mic/headphones input/output. This all works well with Ubuntu Studio, but was the setup that caused difficulties with Deb Testing.

I have a completely clean installation of Deb 12 on laptop. I installed the jackd2 package. I then tried installing Studio Controls (see https://ovenwerks.github.io/studio-controls/ because it seems to work well and be easy to use on Ubuntu). No problem with the installation but when it runs it gives an error saying "No module named jack". I tried qjackctl instead but it also gave an error message about failing to find jack. I removed both of them and installed Ardour on its own. And it works! When I start it, the UMC22 is listed as both an input and an output device and I chose it. I vaguely remember that this completely failed to do anything in the past, but now it works without any problem as far as I can tell. The version of Ardour is more recent than the one in Ubuntu Studio LTS.

I have no idea what is going on in the background here. I presume it might be that Deb 12 has firewire sound? This, I gather, is supposed to "solve all audio problems" in Linux - just like many of its predecessors were supposed to. I've read some fairly negative comments about it here and there, but maybe it solves enough of the problems for what I want.

Given the old adages of "if it aint broke..." and "kiss" it seems that everything works ootb and there is nothing else to be done. Am I missing something? Or has audio on Linux actually improved?

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Do I need to bother with Jack on Debian 12?

Post by j_e_f_f_g »

Do you have Ardour set to use Jack as a backend? Or Alsa as a backend?

Just out of curiosity, what happens if you open a terminal window and type the following while ardour is running:

Code: Select all

systemctl is-enabled pipewire

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

folderol
Established Member
Posts: 2083
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 232 times
Been thanked: 400 times
Contact:

Re: Do I need to bother with Jack on Debian 12?

Post by folderol »

Difficult to say.
Ardour is pretty sophisticated these days. It might be running pure ALSA, or it might be running pipewire, or jack might actually be there but wasn't being seen for some reason. It might even have some jack elements built-in (both were originally designed by the same person).

The Yoshimi guy {apparently now an 'elderly'}
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Do I need to bother with Jack on Debian 12?

Post by j_e_f_f_g »

That's the thing. Debian 12 comes shipped with pipewire. But as I recall, no jack installed (neither the real jack, nor the pipewire emulation "module"). In order to get jack working under pipewire, you're supposed to install that jack emulation module. But instead it appears he installed real jack2.

So I'm wondering if somehow he uninstalled pipewire first (before installing real jack2). I'm running deb 12 with jack installed, and pipewire uninstalled, so I know that if you install deb 12's jack1 or jack2 packages, you do get real jack.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: Do I need to bother with Jack on Debian 12?

Post by Impostor »

Or has audio on Linux actually improved?

Looks like it sure as hell got a lot more confusing.

blockflute
Established Member
Posts: 41
Joined: Thu Apr 01, 2021 8:58 am
Has thanked: 6 times
Been thanked: 2 times

Re: Do I need to bother with Jack on Debian 12?

Post by blockflute »

Sorry, pipewire not firewire.

I didn't uninstall pipewire (if you can). I installed jackd2 and then unistalled it, so Ardour is working with whatever is "just there".

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Do I need to bother with Jack on Debian 12?

Post by j_e_f_f_g »

Yes you can definitely uninstall pipewire from Debian 12. It will tell you that it needs to uninstall some meta packages, but what folks forget is that meta-packages are just for convenience. Just because a meta-package is uninstalled doesn't mean that every package within that meta-package will be uninstalled. (Let's just call a package within that meta-package a "sub-package"). If some other package has a dependency on a sub-package, then that sub-package won't be uninstalled along with the other sub-packages.

so you can do a

apt-get purge pipewire

to get it off your system. That's what I did.

Then I installed jack and pulseaudio to restore my sound back to how it was (before pipewire prevented all my apps directly set to alsa from running)

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
d.healey
Established Member
Posts: 611
Joined: Fri Sep 22, 2017 8:33 pm
Has thanked: 279 times
Been thanked: 101 times

Re: Do I need to bother with Jack on Debian 12?

Post by d.healey »

I don't use JACK. Pipewire and pipewire-jack do just fine. Except in Ardour where I use ALSA otherwise the rendering is sometimes glitchy.

David Healey
YouTube - Free HISE scripting and sample library dev tutorials
Libre Wave - Freedom respecting instruments and effects.
User avatar
sunrat
Established Member
Posts: 925
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 152 times
Been thanked: 247 times

Re: Do I need to bother with Jack on Debian 12?

Post by sunrat »

Debian Bookworm doesn't necessarily come with Pipewire, it depends on the DE. In Gnome PW is default. I installed KDE Plasma from netinstall and PulseAudio is still the default. YMMV. I still haven't configured it much for audio as I'm still using Bullseye as daily driver; pretty sure a KDE Plasma test setup from a little while ago worked fine with JACK.

In other news, Debian 12.1 was just released. :wink:

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Do I need to bother with Jack on Debian 12?

Post by j_e_f_f_g »

sunrat wrote:

Debian Bookworm doesn't necessarily come with Pipewire, it depends on the DE. In Gnome PW is default.

I see. I can confirm that it's default for Mate.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

blockflute
Established Member
Posts: 41
Joined: Thu Apr 01, 2021 8:58 am
Has thanked: 6 times
Been thanked: 2 times

Re: Do I need to bother with Jack on Debian 12?

Post by blockflute »

j_e_f_f_g wrote: Sat Jul 22, 2023 5:48 pm

Do you have Ardour set to use Jack as a backend? Or Alsa as a backend?

Just out of curiosity, what happens if you open a terminal window and type the following while ardour is running:

Code: Select all

systemctl is-enabled pipewire

When Ardour starts, the default audio system listed in the setup window is ALSA. It also lists JACK and PulseAudio as options. If I stick with ALSA, input and output options with my Behringer unit connected include USB Audio CODEC and with those selected, everything appears to work. I can't test this, but I'm fairly sure that when I tried this a couple of years ago (Bookworm Testing, older version of Ardour), it did not work.

If I choose JACK it says it's not running. Autostart is on. Ardour starts, but there is no audio connection so I assume that JACK in not installed so can't be started. If I choose PulseAudio the USB options disappear and, as with the JACK option, Ardour starts but there is no sound.

I checked for pipewire via systemctl as you suggest and get an error message (Failed to get unit file state for pipewire.service: No such file or directory) which presumably indicates that pipewire is not present on the system. I'm running KDE which sunrat says still uses Pulse as the default.

As I said at the outset, all I really want is for Ardour to work, and it does, so maybe I should just stop there.

User avatar
sunrat
Established Member
Posts: 925
Joined: Wed Jul 22, 2020 2:08 pm
Has thanked: 152 times
Been thanked: 247 times

Re: Do I need to bother with Jack on Debian 12?

Post by sunrat »

If using ALSA as backend and you see the device in Ardour, maybe it is just muted. Check levels and mute status in alsamixer in a terminal. You may need to install alsa-utils package to have alsamixer. Use arrow keys to navigate and change levels and M key to mute/unmute. Hit F6 to select your sound card, then F5 to show all levels or F4 for just inputs.
In Ardour you need to make sure the correct inputs are routed to the record channel, and record enable that channel.

It's also possible if PulseAudio is running it may block ALSA connections (not sure about this, I use JACK). Try starting Ardour with

Code: Select all

pasuspender ardour &

After writing this it sounds harder than it is, but all straightforward really. :wink:

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: Do I need to bother with Jack on Debian 12?

Post by j_e_f_f_g »

sunrat wrote:

If using ALSA as backend... maybe it is just muted.

Wait sun. He said he's using the ALSA backend in Ardour, and it works.

Here's what I think he's asking:

I'm using the ALSA backend in Ardour, and it works. I'm happy with this setup. I don't have jack installed. Is not having jack installed going to be a problem getting sound to work in other programs like maybe firefox, and my voice chat program etc? Must I install jack to get sound working there? And if I do install jack, is that going to now give me problems using the ALSA backend in Ardour? It's really important to me to use the ALSA backend in Ardour, so should I just not bother trying to get sound working in other apps, lest it causes trouble with my Ardour setup?

The answer is:

You don't need to install jack. Jack is used only by music creation apps like wave editors, sequencers, DAWs, etc. Most of these programs are like Ardour, and allow you to choose a different backend than jack. So you should be able to get by without jack.

But most ordinary programs, like firefox, uses PulseAudio. Some of them are like Ardour, and also give you an ALSA option for audio play/record. But there are some that are limited to PA only. So you pretty much need PA on your system.

As sun points out, if you install PA, and you find that it interferes with your Ardour setup, then you can use the pasuspender utility to run Ardour. This will first turn off PA before running Ardour, run ardour, and then turn PA back on after exiting Ardour.

You can run the command sun shows you in a terminal window.

Or you can create a desktop Launcher with that command.

it sounds harder than it is, but all straightforward really.

I'd say...
It sounds harder than it needs to be, but in reality it's even harder than that.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
wjl
Established Member
Posts: 224
Joined: Fri Mar 17, 2017 12:27 pm
Location: near Frankfurt, Germany
Has thanked: 48 times
Been thanked: 26 times
Contact:

Re: Do I need to bother with Jack on Debian 12?

Post by wjl »

@blockflute,

you could check with dpkg - mine says:

Code: Select all

wjl@handa-6:~$ dpkg -l pipe*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                              Version      Architecture Description
+++-=================================-============-============-===============>
ii  pipewire:amd64                    0.3.65-3     amd64        audio and video>
ii  pipewire-alsa:amd64               0.3.65-3     amd64        PipeWire ALSA p>
ii  pipewire-audio                    0.3.65-3     all          recommended set>
un  pipewire-audio-client-libraries   <none>       <none>       (no description>
ii  pipewire-bin                      0.3.65-3     amd64        PipeWire multim>
ii  pipewire-jack:amd64               0.3.65-3     amd64        PipeWire JACK p>
un  pipewire-media-session            <none>       <none>       (no description>
un  pipewire-media-session-pulseaudio <none>       <none>       (no description>
ii  pipewire-pulse                    0.3.65-3     amd64        PipeWire PulseA>
wjl@handa-6:~$ 

In case you don't have pipewire-jack, pipewire-alsa, and pipewire-pulse, install them. Then try starting Ardour (or any other program which depends on Jack) like this:

Code: Select all

wjl@handa-6:~$ PIPEWIRE_LATENCY=128/48000 pw-jack ardour

You can of course use other latency and sample rate settings, try what's best for you.

Hope that helps?
Cheers,
Wolfgang

more about me on my blog
User avatar
Linuxmusician01
Established Member
Posts: 1548
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland (Europe)
Has thanked: 784 times
Been thanked: 144 times

Re: Do I need to bother with Jack on Debian 12?

Post by Linuxmusician01 »

blockflute wrote: Sun Jul 23, 2023 7:21 am

[...] As I said at the outset, all I really want is for Ardour to work, and it does, so maybe I should just stop there.

Maybe, maybe not. I see that you are an enthousiastic Linux user (you have it on more than one machine and you make music with it: I call that serious, :wink:). If, in the future, you have to upgrade your distribution and if you do not want to pray the the computers Gods that it'll work out of the box you might want to learn a minimal amount of stuff on Linux audio driver/audio servers.

Very, very roughly:

  • ALSA is the audio driver. Enables you to use Midi too (= Alsa sequencer).

  • Alsa cannot enable more than one application at the time to play audio. So no audio out of Firefox if you're plying back sound in Ardour.

  • Enter audio-servers to "serve" audio to more than one app at the time: PulseAudio, JackAudio & (nowadays) PipeWire.

  • PA was the defacto standard. Google Chrome won't give me audio without it.

  • Jack gives you more control over audio. Has "it's own" version of Midi, sigh... So some apps use Alsa Midi some use Jack Midi (e.g. Reaper).

  • PW is invented to mitigate the SNAFU. It's an audio-server and it can "act" like it's PA or Jack for (older) apps that want to work w/ PA or Jack.

  • PW is new. It looks like the latency is not optimal yet (for power-users?). It's in development: some ways to set it up change from version to version.

To complicate things, like you noticed, it's sometimes not immediately clear what your favourite audio app (Ardour) is configured to use: Jack, PW, plain ALSA or PA. You can choose wisely in many audio apps' settings screen: they'll usually happily work Alsa, Jack or whatever. Apparently you "chose" (not very willingly though) to use plain ALSA in Ardour. I'd use PW or Jack, but if you're satisfied you don't have to of course! :)

P.S. Since you haven't started Jack yourself (manually or by Studio Controls) Ardour might have been smart enough to use plain ALSA or Ardour is configured out of the box to use it (seems more likely). So things, IMHO, haven't gotten easier, you were just lucky if you ask me... :wink:

Post Reply