Re: [Jack-Devel] Cannot use real-time scheduling (RR/89)(1: Operation not permitted)

PrevNext  Index
DateWed, 26 Jun 2013 17:11:01 +0200
From [hidden] at trellis dot ch <[hidden] at trellis dot ch
ToJames Dunn <[hidden] at 4thharmonic dot com>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToJames Dunn [Jack-Devel] Cannot use real-time scheduling (RR/89)(1: Operation not permitted)
Hi James,

make sure you start jack as regular user (not root), something like su -l
username -c command in /etc/rc.local

uncomment in /etc/pam.d/su:
#session    required   pam_limits.so

(from
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=33462&p=357866&hilit=rc.local+jack+rc.local#p357866)

hope that helps,
Thomas

> I'm trying to start jackd with a systemd script on Arch Linux but I'm
> having a problem with RT scheduling.
>
> When I start jack from the command line it works fine:
>
> $ /usr/bin/jackd -R -P89 -dalsa -dhw:0 -r44100 -p128 -n3
> jackdmp 1.9.9.5
> Copyright 2001-2005 Paul Davis and others.
> Copyright 2004-2012 Grame.
> jackdmp comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> no message buffer overruns
> no message buffer overruns
> no message buffer overruns
> JACK server starting in realtime mode with priority 89
> audio_reservation_init
> Acquire audio card Audio0
> creating alsa driver ... hw:0|hw:0|128|3|44100|0|0|nomon|swmeter|-|32bit
> configuring for 44100Hz, period = 128 frames (2.9 ms), buffer = 3 periods
> ALSA: final selected sample format for capture: 16bit little-endian
> ALSA: use 3 periods for capture
> ALSA: final selected sample format for playback: 32bit integer
> little-endian
> ALSA: use 3 periods for playback
> ^CJack main caught signal 2
> Released audio card Audio0
> audio_reservation_finish
>
> But if try to start it with a systemd script that contains the same
> command it runs, but with the following error (which makes it sound
> really bad!):
>
> $ sudo systemctl status jack
> jack.service - JACK
> Loaded: loaded (/usr/lib/systemd/system/jack.service; disabled)
> Active: active (running) since Wed 2013-06-26 14:44:33 BST; 1s ago
> Main PID: 4491 (jack)
> CGroup: name=systemd:/system/jack.service
> ├─4491 /bin/sh /usr/lib/systemd/scripts/jack
> └─4492 /usr/bin/jackd -R -P89 -dalsa -dhw:0 -r44100 -p128 -n3
>
> Jun 26 14:44:34 instrument jack[4491]: audio_reservation_init
> Jun 26 14:44:34 instrument jack[4491]: Acquire audio card Audio0
> Jun 26 14:44:34 instrument jack[4491]: creating alsa driver ...
> hw:0|hw:0|128|3|44100|0|0|nomon|swmeter|-|32bit
> Jun 26 14:44:34 instrument jack[4491]: configuring for 44100Hz, period =
> 128 frames (2.9 ms), buffer = 3 periods
> Jun 26 14:44:34 instrument jack[4491]: ALSA: final selected sample
> format for capture: 16bit little-endian
> Jun 26 14:44:34 instrument jack[4491]: ALSA: use 3 periods for capture
> Jun 26 14:44:34 instrument jack[4491]: ALSA: final selected sample
> format for playback: 32bit integer little-endian
> Jun 26 14:44:34 instrument jack[4491]: ALSA: use 3 periods for playback
> Jun 26 14:44:34 instrument jack[4491]: Cannot use real-time scheduling
> (RR/89)(1: Operation not permitted)
> Jun 26 14:44:34 instrument jack[4491]: AcquireSelfRealTime error
>
> It is run as a user that is assigned to the audio group, not as root.
> Also, the user has the following permissions in
> /etc/security/limits.d/99-audio.conf:
>
> @audio - rtprio 99
> @audio - memlock unlimited
>
> How can I enable real-time scheduling from a systemd script?
>
> thanks
> James
> 
> Jack-Devel mailing list
> [hidden]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
>
PrevNext  Index

1372259468.3198_0.ltw:2,a <436cef68157fd0f1c0c0f63ba786804d.squirrel at ips73 dot ips dot ch>