我正在尝试使用新贵脚本在启动时以实时优先级启动jackd,但到目前为止没有成功。我正在使用 ubuntu 服务器 14.04。我的新贵版本是 1.12.1。
如果我在没有实时的情况下启动jackd,那么新贵脚本会按预期工作。我用来在脚本中启动 jackd 的用户和组被允许使用实时优先级,但是当 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
如果我只是在终端中运行与 upstart 脚本的 exec 行中相同的命令,它就可以正常工作。
我的新贵脚本是一个非常简单的脚本:
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,但最终得到的结果与我刚才描述的相同。我的文件 /etc/security/limits.d/audio.conf 如下:
@audio - rtprio 95
@audio - memlock unlimited
#@audio - nice -19
我试图启动jackd的用户属于音频组。
有没有办法让暴发户开始实时流程?如果没有,这个问题还有其他解决方案吗?
谢谢你。