2

I'm trying to start jackd with realtime priority at boot with an uptstart script but with no success so far. I'm using ubuntu server 14.04. My upstart version is 1.12.1.

The user and group I'm using in the script are allowed to use realtime priority, but when i run my upstart script that does not seems to matter. Whenever i try to run it i get this on upstart log:

jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2013 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
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
Cannot create thread 1 Operation not permitted
JACK server starting in realtime mode with priority 70
Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Cannot create thread 1 Operation not permitted
ERROR: messagebuffer not initialized: libffado 2.1.9999- built Oct 19 2013 16:01:07
ERROR: messagebuffer not initialized: 1408466326248438: Error (PosixThread.cpp)[ 161] Start: Cannot create realtime thread (1: Operation not permitted)
ERROR: messagebuffer not initialized: 1408466326248486: Error (PosixThread.cpp)[ 162] Start:  priority: 75
firewire ERR: FFADO: Error creating virtual device
Cannot attach audio driver
JackServer::Open failed with -1
Failed to open server

If i run it with my regular user it works fine. My upstart script is a very simple one:

description "jackd"

start on stopped rc
stop on runlevel [06]


exec su radiola -c "jackd -R -P 70 -d firewire -r 44100 -n 3 -p 2048"

I have also tried to use the setuid and setguid stanzas and start-stop-daemon but it ended up with the same results that i just described. Is there a way to make upstart start realtime process? If not, is there other solution to this problem?

Thank you.

3
  • I take it you are running the realtime kernel, yes? Aug 24, 2014 at 1:30
  • No. In fact I'm not. I tried the low latency kernel that comes with ubuntu but it was crashing and behaving strangely. I'm using the generic kernel. Aug 25, 2014 at 17:02
  • Hmm. Have you tried with other backends, e.g. ALSA? Where did you download jack from? KXStudio? I just tried out running jackd -R -P 70 -d alsa from Upstart and the command line (as my own user) and I got no errors... I am on Linux 3.14 w/o realtime, and am running jack2 (1.9.10 like you). Aug 26, 2014 at 17:23

1 Answer 1

1

This was answered in stackoverflow:

https://stackoverflow.com/questions/25412381/how-to-start-a-process-with-realtime-priority-jackd-with-upstart

Turn out that you have to use the stanzas:

limit memlock unlimited unlimited
limit rtprio 95 95

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .