gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 12:29:58 26 4
gpt4 key购买 nike

我正在尝试使用 raspbian 在 Raspberry Pi 2(+ Cirrus 声卡)上运行 guitarix 和 jack。通过 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

但是从我通过 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 配置的问题,如 here 所述.

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

# session    required   pam_limits.so

关于linux - 如何在 Raspbian 下设置实时优先级的 jackd 和 guitarix?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30504470/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com