如何在Raspbian下实时优先设置jackd和guitarix?

我试图用raspbian让Raspberry Pi 2(+ Cirrus声卡)上的吉他和插孔运行。 当通过qjackctl启动jack时,我得到错误

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 

但从桌面terminal,我通过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和内存分配?

这里所说的PAM配置似乎是一个问题。

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

 # session required pam_limits.so