Why are PA Jack Modules always loaded?

I run the Jack audio server using qjackctl as my control/settings manager etc.

I use the Pulse Audio source & sink modules, then have the command to open jackd as “pasuspsender – /usr/bin/jackd” so that all when PA is closed it doesn’t automatically reopen itself.

I can start other audio programs set to use the Jack driver and they correctly load in Jack and connect without also firing off the PA modules (eg Audacios and VLC with the Jack modules added. Mixxx using its default one seems to have a similar same bug as you do.)

Once playback is actually started then an extra pair of connections gets created, those for PortAudio, Surely not both the PortAudio and the PulseAudio Jack Modules need to be loaded!

So can we please stop PA getting triggered at all when Mixxx is opened? It does cause quite considerable overhead to latency and processing of audio.

Am I being stupid? I can’y see the edit function on this forum.

Posted then realised I had forgotten OS and version numbers (then had to wait for post to be moderated.)


Anyway:
OS Ubuntu Studio 16.04
Tried with the Ubuntu 2.1.2 version and then installed the Audcaity PPA which installed 2.2.0 and the behaviour seems the same in both.

I presume that you mean “Audacity” rather than “Mixxx”.

pasuspsender is not required for running Audacity. Why do you want to kill PulseAudio?

PulseAudio can run quite happily alongside Jack. If you read somewhere that it can’t then you are reading out of date information. Running PulseAudio adds no overhead or latency to applications that are directly using Jack. It does add a little overhead to applications that are not able to use Jack directly.

To use Audacity with Jack, set the “host” to “Jack Audio Connection Kit”.

Not required by Audacity, but I would recommend installing pulseaudio-module-jack and loading module-jack-sink and module-jack-source. This allows non-jack applications to use Jack.

Yeah sorry.

pasuspsender is not required for running Audacity. Why do you want to kill PulseAudio?

[quote=“kazakore”]
It does cause quite considerable overhead to latency and processing of audio.
[/quote]

PulseAudio can run quite happily alongside Jack. If you read somewhere that it can’t then you are reading out of date information. Running PulseAudio adds no overhead or latency to applications that are directly using Jack. It does add a little overhead to applications that are not able to use Jack directly.

To use Audacity with Jack, set the “host” to “Jack Audio Connection Kit”.

Not required by Audacity, but I would recommend installing pulseaudio-module-jack and loading module-jack-sink and module-jack-source. This allows non-jack applications to use Jack.

The modules I’m talking about creating this overhead are the exact same ones you are suggesting I install with pulseaudio-module-jack. What I don’t understand is why they get loaded when I start up Audacity when it shouldn’t be using them.

When the PA-Jack modules are loaded at all this put stress on Jack, on my old laptop this would push the CPU usage monitoring with qjackctl from being less than 1% at idle to somewhere around the 4% mark at idle and make the difference between getting xruns at 16ms rather than 8ms. This is a massive difference when trying to do something live in realtime. The effects are a little less on my newer laptop but I would still like it running at optimum really. Other Jack enabled apps don’t load this modules, why does Audacity?

Audacity does not load up any jack modules - that is left to the the sound system.

When Audacity is launched, it probes the computer’s sound system to see what is available. The user can then select, using the device toolbar, whatever options are available.

If you don’t ever want to use pulseaudio-module-jack, then you could uninstall it or disable it. However, if you do so, then you may find that some non-jack applications conflict with running Jack.

To temporarily unload or load modules:

See what modules are loaded

pactl list short modules

Unload a module:

pactl unload-module <name>

Reload the module:

pactl load-module <name>

It does appear to cause the PA module to load for some reason, whereas other Jack enabled programs do not.

If you don’t ever want to use pulseaudio-module-jack, then you could uninstall it or disable it. However, if you do so, then you may find that some non-jack applications conflict with running Jack.

I do want to use it at time though, eg sound from Firefox, but it get loaded as soon as any app requests it so should be being loaded when an app which doesn’t use PA is opened.

I have stopped Jack completely and started it via qjackctl. The only thing in the Connections window Is System on Input and System on output.

pactl list short modules

Once I run this code it adds the PA-Jack Sink/Source modules in the Connections window and CPU usage jumps up by a couple of percent! So just by probing it you are making them start up.

** Although I found that neither VLC or Audacious start up the PA-Jack modules when loading it seems even Ardour does and that is programmed by the same guy as Jack itself so seems it is a more widespread thing that I thought. I’m sure I managed to get it on my old laptop so that a program actually requesting to use PA had to be opened for the PA-Jack modules to load but I’ve been struggling to get it correct on this laptop. Maybe I should just live with it as hopefully this laptop is fast enough to cope with that small amount of extra overhead… **