Re: [linux-audio-user] problem: jackd, real-time, permissions, RLIMITS

From: Denis Alessandro Altoe Falqueto <denisfalqueto@email-addr-hidden>
Date: Thu Jul 27 2006 - 18:51:07 EEST

On 7/27/06, Renick Bell <renick@email-addr-hidden> wrote:
> I've been working on this problem now for days, and I can't see where
> my mistake is (if I have made one). I have two identical computers
> running Gentoo with the proaudio overlay. I have 2.6.16-rt29 working
> on one computer, using RLIMITS. I can start jackd through qjackctl
> with the realtime option, 64 frames/period, 2 periods/buffer. I get no
> error messages and only get an occasional xrun when starting new
> applications. I have tried to duplicate that setup on another
> computer; however, I always get these errors, which don't occur on the
> properly-functioning computer:
>
> cannot lock down memory for jackd (Cannot allocate memory)
> cannot use real-time scheduling (FIFO at priority 20) [for thread
> 49156, from thread 49156] (1: Operation not permitted)
> cannot use real-time scheduling (FIFO at priority 10) [for thread
> 65541, from thread 65541] (1: Operation not permitted)
>
> This is followed by tons of xruns.
>
> Here is more relevant information on my configuration (identical on
> both computers):
>
> renick@email-addr-hidden ~ $ uname -a
> Linux localhost 2.6.16-rt29 #1 PREEMPT Sat Jul 22 21:16:25 JST 2006
> i686 Intel(R) Pentium(R) M processor 1.70GHz GenuineIntel GNU/Linux
> renick@email-addr-hidden ~ $ groups
> wheel floppy audio cdrom video usb users
>
> # /etc/security/limits.conf
> # REALTIME support for audio group users
> @audio - rtprio 90
> @audio - nice -5
> @audio - memlock 512000
>
> localhost renick # equery which pam
> /usr/portage/local/layman/pro-audio/sys-libs/pam/pam-0.78-r6.ebuild
>
> localhost renick # emerge -s pam
> * sys-libs/pam
> Latest version available: 0.78-r6
> Latest version installed: 0.78-r6
>
> localhost renick # equery which jack-audio-connection-kit
> /usr/portage/local/layman/pro-audio/media-sound/jack-audio-connection-kit/jack-audio-connection-kit-0.9999.ebuild
>
> localhost renick # emerge -s jack-audio
> * media-sound/jack-audio-connection-kit
> Latest version available: 0.9999
> Latest version installed: 0.100.7-r3
>
> This version, 0.100.7-r3, is the same version that is working on my
> other computer.
>
> I've asked on the proaudio list about this problem, but I haven't
> received an answer so I am asking here (is a four-day lag
> cross-posting? if so, sorry...). What could be causing the jack
> errors? Are there any other places besides /etc/security/limits.conf
> that I should be checking for correct configuration? Advice?
>
> Thanks!
>
> Renick
>

Hi Renick.

I run through this kind of problem some time ago, but with ArchLinux.
There is one place that you could look, just to be sure: /etc/pam.d.
This directory contains several files, one for each program that
supports PAM. So, in my case, there is a file named kde, which says
how kdm will make its authentication with PAM. In the case of Arch,
there was a bug in this file. It didn't contain the following line:

session pam_limits.so

This instructs kdm to load the pam_limits module, so that PAM can
allow/deny access to the realtime capabilities configured in
/etc/security/limits.conf. After I changed /etc/pam.d/kde, jack was
able to get realtime right. Be sure to look the right file, according
with your login method.

Hope that helps, allthough I presume that it is right on your system.
Just my 0.02 cents.

-- 
-------------------------------------------
Denis A. Altoe Falqueto
-------------------------------------------
Received on Fri Jul 28 04:15:06 2006

This archive was generated by hypermail 2.1.8 : Fri Jul 28 2006 - 04:15:06 EEST