如何在Raspbian下设置具有实时优先级的jackd和guitarix?

时间:2015-05-28 10:50:46

标签: linux embedded low-latency ulimit jack

我正在尝试使用raspmate在Raspberry Pi 2(+ Cirrus音频卡)上运行guitarix和jack。 当通过qjackctl启动插孔时,我得到了错误

Cannot lock down 82278944 byte memory area (Cannot allocate memory)
Cannot use real-time scheduling (RR/10)(1: Operation not permitted)

似乎 /etc/security/limits.conf 的更改不适用于 /etc/security/limits.d/audio.conf

我尝试为用户和组设置内存锁大小:

@audio - rtprio 90          # maximum realtime priority
@audio - memlock unlimited  # maximum locked-in-memory address space (KB)
@audio - nice -10
pi      - rtprio 90
pi      - memlock unlimited
pi      - nice -10

从ssh我得到了满意的结果:

pi@raspberrypi ~ $ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 30
file size               (blocks, -f) unlimited
pending signals                 (-i) 7349
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 90
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7349
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

但是从桌面终端我通过vnc访问

pi@raspberrypi ~ $ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7349
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7349
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

同一个用户如何设置不同,如何在桌面上运行rt和内存分配?

1 个答案:

答案 0 :(得分:1)

here所述,PAM配置似乎存在问题。

取消注释 /etc/pam.d/su 中的行就可以了。

# session    required   pam_limits.so