Why are PA Jack Modules always loaded?

Help for Audacity 2.x.x on GNU/Linux.

ImageThis forum is for Audacity 2.x.x on GNU/Linux and Unix-like operating systems.
Please state which version of Linux you are using, the exact three-section version number of Audacity from Help > About Audacity... and whether you installed your distribution's release or daily version of Audacity or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.

Why are PA Jack Modules always loaded?

Permanent link to this post Posted by kazakore » Mon Nov 06, 2017 4:39 pm

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.
kazakore
 
Posts: 4
Joined: Mon Nov 06, 2017 4:37 pm
Operating System: Linux *buntu

Re: Why are PA Jack Modules always loaded?

Permanent link to this post Posted by kazakore » Mon Nov 06, 2017 5:19 pm

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.
kazakore
 
Posts: 4
Joined: Mon Nov 06, 2017 4:37 pm
Operating System: Linux *buntu

Re: Why are PA Jack Modules always loaded?

Permanent link to this post Posted by steve » Mon Nov 06, 2017 6:01 pm

kazakore wrote:So can we please stop PA getting triggered at all when Mixxx is opened?

I presume that you mean "Audacity" rather than "Mixxx".

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

kazakore wrote:It does cause quite considerable overhead to latency and processing of audio.

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45315
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Why are PA Jack Modules always loaded?

Permanent link to this post Posted by kazakore » Mon Nov 06, 2017 6:13 pm

steve wrote:
kazakore wrote:So can we please stop PA getting triggered at all when Mixxx is opened?

I presume that you mean "Audacity" rather than "Mixxx".


Yeah sorry.

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

kazakore wrote:It does cause quite considerable overhead to latency and processing of audio.

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?
kazakore
 
Posts: 4
Joined: Mon Nov 06, 2017 4:37 pm
Operating System: Linux *buntu

Re: Why are PA Jack Modules always loaded?

Permanent link to this post Posted by steve » Mon Nov 06, 2017 7:04 pm

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
Code: Select all
pactl list short modules


Unload a module:
Code: Select all
pactl unload-module <name>


Reload the module:
Code: Select all
pactl load-module <name>
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45315
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Why are PA Jack Modules always loaded?

Permanent link to this post Posted by kazakore » Mon Nov 06, 2017 8:22 pm

steve wrote: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.


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.

Code: Select all
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.... **
kazakore
 
Posts: 4
Joined: Mon Nov 06, 2017 4:37 pm
Operating System: Linux *buntu


Return to GNU/Linux and Unix-like



Who is online

Users browsing this forum: No registered users and 3 guests