Page 1 of 1

Why does starting JACK as systemd also load Pulseaudio?

Posted: Sat Jul 29, 2023 3:32 pm
by ThatJackElliott

Ubuntu Studio 22.04

I notice that if I use QJackCtl to start JACK, my patchbays (raysession, QJackCtl's Graph) show the normal ALSA System Capture and Playback devices. But if I use systemd to start JACK then two pulseaudio entries appear, seemingly the same devices that ALSA was bringing in when QJackCtl is used to load JACK.

I'd like to get JACK auto-starting when the computer reboots but would prefer to do it without loading QJackCtl, and have it restart if it crashes. Systemd seems the way to go but what's up with these unnecessary pulseaudio bits?

Thank you!


Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Sat Jul 29, 2023 3:35 pm
by sysrqer

What's in the jack service file?


Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Sat Jul 29, 2023 4:01 pm
by ThatJackElliott

Hey, thank you for taking a look at this!

Code: Select all

[Unit]
Description=JACK 2
After=sound.target
BindsTo=sound.target
Requires=dbus.socket

[Service]
Type=dbus
BusName=org.jackaudio.Controller
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/jack_control start
ExecStop=/usr/bin/jack_control stop
ExecStopPost=/usr/bin/pkill -9 jackdbus
SuccessExitStatus=0
RemainAfterExit=true

[Install]
WantedBy=default.target

Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Sat Jul 29, 2023 6:09 pm
by sysrqer

I'd guess that it's sound.target then? You could try looking at that and changing it, or maybe remove the 'after' and 'bindsTo' in this file, probably will still work but you may need to let it sleep depending how quickly other things get loaded on boot.


Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Sun Jul 30, 2023 4:48 pm
by oddy.o.lynx

JACK does not load Pulseaudio. Pulseaudio is always running. The thing to do is to mask it.

you can mask Pulseaudio by doing the following

Code: Select all

systemctl --user mask pulseaudio.socket
systemctl --user mask pulseaudio.service

if you need or want to mask Pipewire

Code: Select all

systemctl --user mask pipewire.service
systemctl --user mask pipewire-pulse.service
systemctl --user mask pipewire.socket
systemctl --user mask pipewire-pulse.socket

you may have to do something similar with either wireplumber or pipewire-media-session

to stop Pipewire and Pulseaudio

Code: Select all

systemctl --user stop pulseaudio.socket && systemctl --user stop pulseaudio.service
systemctl --user stop pipewire.socket && systemctl --user stop pipewire.service
systemctl --user stop pipewire-pulse.socket && systemctl --user stop pipewire-pulse.service

Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Mon Jul 31, 2023 9:48 am
by folderol

I never want pulse audio, so delete the server. All the stuff that thinks it must beep and burp at you happily burbles to the client - which has nowhere to send it.
Blessed peace, and I only hear exactly what I want :D


Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Mon Jul 31, 2023 6:52 pm
by ThatJackElliott

Hey, thanks for the helpful information!

Seems that in QjackCtl > Setup > Parameters, setting the MIDI Driver to "None" made those pesky entries go away.

As for removing Pulse/Pipe . . . I hesitate to do that because I don't have enough experience to know whether ALSA/JACK will start whining or break.


Re: Why does starting JACK as systemd also load Pulseaudio?

Posted: Tue Aug 01, 2023 2:34 pm
by ThatJackElliott

I thank you all for the assistance. In the past I have looked at QjackCtl, and poked at QjackCtl, and tried to understand QjackCtl and every time I have given up trying to get it to work. This current project I bringing nearly to completion forced me to use JACK so, oh well, roll up sleeves and hack away at it. Yep, I do have a bit of pride that I now understand what's going. Time to fly? Well, at least the stumbling on the ground is over. I do have another ALSA/JACK-related question that is unrelated to this Topic so I'll make a new one. Again, my thanks! :D