LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Realtime (rt) kernel: How to use with Jack? (https://www.linuxquestions.org/questions/slackware-14/realtime-rt-kernel-how-to-use-with-jack-735471/)

ludist 06-25-2009 02:05 AM

Realtime (rt) kernel: How to use with Jack?
 
I fail to start jackd with real time permissions. I am in group audio, my kernel is custom 2.6.29.5-rt21

Slackbuils.org writes about:

1. /dev/shm -> done
2. setcap cap_sys_nice=ep /usr/bin/jackd (does not help)
3. I have also tried set_rlimits (does not help)

/etc/set_rlimits.conf
Code:

@audio  /usr/bin/jackd  nice=-1  rtprio=80
start command and result..
Code:

set_rlimits jackd -R -dalsa -dhw:1,0 -r44100 -p1024 -n2 -S -i2 -o2 -Xseq
jackd 0.116.1
[..bla-bla-bla]
creating alsa driver ... hw:1,0|hw:1,0|1024|2|44100|2|2|nomon|swmeter|-|16bit
[..bla-bla-bla]
JACK: unable to mlock() port buffers: Cannot allocate memory
JACK: unable to mlock() port buffers: Cannot allocate memory

When running as root, it starts ok but
1. I don't want to start as root (psychological problems :) )
2. fst-git-feb2009 wants to start jackd, but if jackd is already started as root, it fails (stupidly? ) to start.

I believe I have "permissions" problem, but I don't know which "permissions" to tweak.

ppr:kut 06-26-2009 05:36 AM

Have you enabled Realtime Group Scheduling?
(zgrep CONFIG_RT_GROUP_SCHED /proc/config.gz)

ludist 06-26-2009 04:12 PM

Thank you, that was slap in my face. Recompiled my kernel.

zgrep _RT_ /proc/config.gz

CONFIG_RT_GROUP_SCHED=y
CONFIG_RT_MUTEXES=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set

Code:

set_rlimits jackd -R -dalsa -dhw:1,0 -r44100 -p1024 -n2 -S -i2 -o2 -Xseq
jackd 0.116.1
(bla-bla)
cannot use real-time scheduling (FIFO at priority 10) [for thread -1212617888, from thread -1212617888] (1: Operation not permitted)
cannot create engine

Same message with setcap thingie.

Also I forgot to mention
Code:

ls -l /dev | grep shm
drwxrwxrwt 2 myuser  audio      40 2009-06-27 00:05 shm


ppr:kut 06-27-2009 11:06 AM

Actually, I would have advised not to use realtime group scheduling, as it makes things quite more complicated (it's only user-friendly if you use PAM) :P
A few other things:
- you do not need set_rlimits if you want to use posix capabilities. If you want to use those, you will also want to set cap_ipc_lock additionally to cap_sys_nice (but there might be still one missing I haven't found yet, and it will not work on reiserfs)
- you do not need to set any posix capabilities if you want to use set_rlimits

After looking closer at your first post it's probably cap_ipc_lock, which is missing, but jackd worked fine even without it set on my machine.

ludist 06-28-2009 08:40 AM

I tried both methods since I don't understand the problem. You believe it's a kernel issue?


All times are GMT -5. The time now is 04:30 PM.