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

Peter P. peterparker at fastmail.com
Mon Jan 28 12:59:33 CET 2019


Thanks Jacek your kind reply! 
I can confirm that the service starts up as system service and launches
jackd with (what I hope are) realtime priorities as user peter after
correcting it to
	User=peter
	LimitRTPRIO=i95
        LimitMEMLOCK=infinity
	ExecStart=/usr/bin/jackd -d alsa -r 44100 -P

* Jacek Konieczny <jajcus at jajcus.net> [2019-01-28 08:36]:
> 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 at lists.linuxaudio.org
> https://lists.linuxaudio.org/listinfo/linux-audio-user


More information about the Linux-audio-user mailing list