[Jackaudio] Jack & systemd on RPI4

David Runge dave at sleepmap.de
Tue May 12 19:36:37 CEST 2020

Hi Phil,

On 2020-05-08 18:10:16 (+0200), pfl wrote:
> I want jack to start at bood via systemd on a RPI4
> but when I run qjackctl it does not see jack running (while it is)

This is because you run jackd as root.

> if I start jack from the command line , qjackctl sees jack running

This is because you start jackd as your unprivileged user.

> I tried sudo qjackctl, it crashed the RPI4

This may have several reasons, but also it is absolutely not recommended
to do that.

> any help appreciated
> Phil

It seems (but I'm not sure), that you are starting jackd in a
systemd **system** service. This means, that you run jackd as root
(which is not recommended) and naturally an instance of qjackctl, run by
your unprivileged user can not interact with it.
To read up on the differences, please refer to upstream documentation

> [Unit]
> Description=Jack audio server
> After=sound.target
> [Install]
> WantedBy=multi-user.target
> [Service]
> Type=simple
> PrivateTmp=true
> #ExecStart=/usr/bin/jackd -T -ndefault -dalsa -dhw:0 -r48000 -p1024 -n2
> ExecStart=/usr/bin/jackd -R -P20 -dalsa -dhw:0,1 -r49000 -p1024 -n2

You can have a look at the default systemd **user** service [1], that is
available in the jack2 repository (and depending on your distro is
installed with jack2 or not).
When installed (or copied to a user service location and modified to
cope with the templating strings), you are able to start it with
settings provided in one of the configuration files mentioned in
`EnvironmentFile`.  So, if you have `~/.config/jack/something.conf` with
whatever configuration you want to use, you can start the service with

systemctl --user start jack at something

If you want to have this service start with your user session, enable

systemctl --user enable jack at something

If you want to automatically start the session of your user, on boot of
the machine (might require elevated privileges to activate):

loginctl enable-linger <your-username-or-uid>

After reboot your user service (this is a **system** service running as
your user) `user@<your-username>` should be started automatically (even
**before** you log in with a graphical session).
Below your `user at .service`, you should see a jack at something **user**

If you want to have a look at this in the cgroups available on your


If you want to see jackd's stdout/stderr, you can use the user journal:

journalctl --user -b0 -u jack at something

or just the plain status of the service:

systemctl --user status jack at something

I hope this was of help.


[1] https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[2] https://github.com/jackaudio/jack2/blob/develop/systemd/jack%40.service.in
[3] https://github.com/jackaudio/jack2/blob/develop/systemd/example.conf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.linuxaudio.org/archives/jackaudio/attachments/20200512/c43c21ae/attachment.sig>

More information about the JackAudio mailing list