使用upstart启动具有实时优先级的jackd

我正在尝试使用uptstart脚本在启动时使用实时优先级启动jackd但到目前为止没有成功。 我正在使用ubuntu服务器14.04。 我的新贵版本是1.12.1。

我在脚本中使用的用户和组被允许使用实时优先级,但是当我运行看起来不重要的我的upstart脚本时。 每当我尝试运行它时,我会在upstart日志中得到它:

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 

如果我和我的普通用户一起运行它可以正常工作。 我的新贵脚本非常简单:

 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" 

我也试过使用setuid和setguid节和start-stop-daemon,但结果与我刚才描述的结果相同。 有没有办法让upstart启动实时流程? 如果没有,还有其他解决方案吗?

谢谢。

这在stackoverflow中得到了解答:

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

原来你必须使用这些节:

 limit memlock unlimited unlimited limit rtprio 95 95