LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-25-2009, 02:05 AM   #1
ludist
Member
 
Registered: Nov 2005
Location: Greece
Distribution: Slackware
Posts: 172

Rep: Reputation: 21
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.

Last edited by ludist; 06-25-2009 at 02:07 AM.
 
Old 06-26-2009, 05:36 AM   #2
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Have you enabled Realtime Group Scheduling?
(zgrep CONFIG_RT_GROUP_SCHED /proc/config.gz)
 
Old 06-26-2009, 04:12 PM   #3
ludist
Member
 
Registered: Nov 2005
Location: Greece
Distribution: Slackware
Posts: 172

Original Poster
Rep: Reputation: 21
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

Last edited by ludist; 06-26-2009 at 04:16 PM. Reason: /dev/shm permissions
 
Old 06-27-2009, 11:06 AM   #4
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
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.
 
Old 06-28-2009, 08:40 AM   #5
ludist
Member
 
Registered: Nov 2005
Location: Greece
Distribution: Slackware
Posts: 172

Original Poster
Rep: Reputation: 21
I tried both methods since I don't understand the problem. You believe it's a kernel issue?
 
  


Reply

Tags
jackd, kernel, realtime, rt



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Alsa, Midi, realtime, and jack stuff. zxcvbs Linux - Software 2 05-12-2007 09:40 PM
Jack and realtime kernel problem kiwidoc66 Linux - Software 5 05-06-2007 08:11 PM
Kubuntu, Realtime Kernel and Jack, my road to misfortune in question form dahouse Linux - General 0 04-22-2007 11:06 PM
JACK realtime capabilities solar1951 Mandriva 2 10-07-2005 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration