Re: [LAU] systemd woes with jackd and its permissions (raspbian)

From: Jacek Konieczny <jajcus@email-addr-hidden>
Date: Mon Jan 28 2019 - 09:35:48 EET

On 28/01/2019 01.12, Peter P. wrote:
> Now I try to start jackd automatically from a systemd service file
> created as /etc/systemd/system/jackd.service with the following
> contents:
>
> [Unit]
> Description=jackd
> After=sound.target
> [Service]
> User=peter
> ExecStart=/usr/bin/jackd -d alsa -r 44100 -P
> [Install]
> WantedBy=multi-user.target

>
> When I start that service it fails with errors in the journal:
> "JACK is running in realtime mode, but you are not allowed to use
> realtime scheduling."
> and
> "Please check your /etc/security/limits.conf for the following line"
> and so on. Messages that are not present when starting jackd as user
> from the command line.
> Now I am puzzled because I thought that it is enough to specify user
> "peter" in the systemd service.

When using systemd to start the service, use systemd directives to set
the limits. systemd won't start PAM session for this service, so
/etc/security/limits.conf is not used.

Try adding:

LimitRTPRIO=95
LimitMEMLOCK=infinity

to the [Service] section of your jackd.service file.

See `man systemd.unit` fro more info on setting the limits in a service
file.

Greets,
Jacek
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon Jan 28 12:15:01 2019

This archive was generated by hypermail 2.1.8 : Mon Jan 28 2019 - 12:15:01 EET