2

I am trying to get guitarix and jack running on the Raspberry Pi 2 (+ Cirrus audio card) with raspbian. When starting jack via qjackctl, I get the errors

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

It seems changes to /etc/security/limits.conf do not apply but to /etc/security/limits.d/audio.conf do.

I tried setting the memory lock size for the user and group:

@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

From ssh I get a satisfactory result:

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

But from the desktop terminal I access via vnc I get

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

How can the same user have different settings and how do I get rt and memory allocation running on the desktop?

RootRaven
  • 395
  • 5
  • 14

1 Answers1

2

It seems to have been a problem with the PAM configuration as stated here.

Uncommenting the line in /etc/pam.d/su did the trick.

# session    required   pam_limits.so
Community
  • 1
  • 1
RootRaven
  • 395
  • 5
  • 14