[Jackaudio] Jack & systemd on RPI4

David Runge dave at sleepmap.de
Tue May 12 20:59:38 CEST 2020


Hi Phil,

On 2020-05-12 20:37:40 (+0200), pfl wrote:
> in the mean time, I ended up running it as 'pi' user
> 
> with an extra Environement="XDG_RUNTIME_DIR=/run/user/1000"

Yeah, running a **system** service as a user (using the `User=`
directive) might also work, as long as you get the required directories
in line.

> but I never achieved to make it run in -R mode
> 
> I use ExecStart=/usr/bin/jackd -r -d alsa -r 44100 -P

Have a look at the realtime related settings in the upstream user
service [1].
They are also applicable to **system** services and basically allow your
service to use realtime scheduling priority of up to 95. Otherwise any
service either defaults to a setting from its parent or the system-wide
default (set by your distribution).
To read more about those settings, have a look at the upstream
systemd.exec documentation [2].
Note, that for an unprivileged user you have to allow said user to use a
specific realtime scheduling priority (e.g. 95) and unlimited memlock.
On Arch Linux we have started making this available via the `realtime`
user group [3] (on other distributions it's sometimes coupled to the
`audio` group) by installing a configuration drop-in to
/etc/security/limits.d/.  However, this can also be set for your
specific user only (see /etc/security/limits.conf for the syntax).

Best,
David

[1] https://github.com/jackaudio/jack2/blob/develop/systemd/jack%40.service.in#L11-L13
[2] https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Process%20Properties
[3] https://git.archlinux.org/svntogit/community.git/tree/trunk/99-realtime-privileges.conf?h=packages/realtime-privileges

-- 
https://sleepmap.de
-------------- 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/10cd2a76/attachment.sig>


More information about the JackAudio mailing list