Re: [Jackit-devel] [linux-audio-user] pam modules / non root users can't get realtime privileges.

From: Ken Restivo <ken@email-addr-hidden>
Date: Mon Feb 05 2007 - 04:01:52 EET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Feb 04, 2007 at 04:54:01PM -0800, Fernando Lopez-Lezcano wrote:
> On Sun, 2007-02-04 at 20:49 +0100, Marcos Guglielmetti wrote:
> > El Lun 05 Feb 2007 00:25, Fernando Lopez-Lezcano escribi?:
> > > On Sat, 2007-02-03 at 17:24 +0100, Marcos Guglielmetti wrote:
> > > > El S?b 03 Feb 2007 21:13, Ken Restivo escribi?:
> > > > > On Sat, Feb 03, 2007 at 04:48:31PM +0100, Marcos Guglielmetti wrote:
> > > > > > What is happening? see:
> > > > > >
> > > > > > jackd -v -p128 -t2000 -m -dalsa -dhw:0 -r48000 -p512 -n2 -s -S -H
> > > > >
> > > > > Did you forget the "-R" flag to make jackd run in realtime?
> > > >
> > > > Ouch, yes sorry, I was testing how does it goes without realtime, but.
> > > >
> > > > Now, I did it Ok, and the problems are still here: no realtime, too much
> > > > xruns:
> > > >
> > > > jackd -R -v -p128 -t2000 -m -dalsa -dhw:0 -r48000 -p512 -n2 -s -S -H
> > > >
> > > > getting driver descriptor from /usr/lib/libjack0.100.0-0/jack_dummy.so
> > > > getting driver descriptor from /usr/lib/libjack0.100.0-0/jack_oss.so
> > > > getting driver descriptor from /usr/lib/libjack0.100.0-0/jack_alsa.so
> > > > jackd 0.101.1
> > > > Copyright 2001-2005 Paul Davis and others.
> > > > jackd comes with ABSOLUTELY NO WARRANTY
> > > > This is free software, and you are welcome to redistribute it
> > > > under certain conditions; see the file COPYING for details
> > > >
> > > > JACK compiled with System V SHM support.
> > > > server `default' registered
> > > > loading driver ..
> > > > registered builtin port type 32 bit float mono audio
> > > > required capabilities not available
> > > > capabilities: =
> > >
> > > Hmmm, this does not sound right.
> > >
> > > Capabilities was an old hack to get things running as non-root with
> > > 2.4.x kernels (and the jackstart suid program). What options are you
> > > building jack with? You don't need to / should not enable capabilities.
> >
> > apt-cache policy jackd
> > jackd:
> > Instalados: 0.101.1-2
> > Candidato: 0.101.1-2
> > Tabla de versi?n:
> > *** 0.101.1-2 0
> > 990 ftp://ftp.fr.debian.org testing/main Packages
> >
> >
> > I am not building jack, as you can see: I preffer to use the Debian builded
> > versions
> > [MUNCH]
> > Ok, so you think that the problem could be into the Debian package?
>
> It looks likely but Debian users should know and be able to answer.

Guilty as charged.

On GNU/Linux systems, the Debian package builds jackd with the following flags:

     DEB_CONFIGURE_EXTRA_FLAGS := --enable-resize \
             --enable-timestamps --disable-iec61883 --with-oldtrans \
             --disable-ensure-mlock
             # --enable-posix-shm
       DEB_CONFIGURE_EXTRA_FLAGS += --enable-stripped-jackd
       DEB_CONFIGURE_EXTRA_FLAGS += --enable-capabilities --with-default-tmpdir=/dev/shm

>
> It looks like the package was built to use capabilities. I don't know
> what jackd does when it does not find the proper capabilities (which
> will not be found if you are using pam), whether it still tries to get
> SCHED_FIFO or if it just gives up, it looks like the later.
>

What the.... I certainly hope not.

I thought that was a spurious error message to be disregarded, since jackd definitely *is* running with RT priorities, at least on my machine, it reports:

FreeBoB MSG: Streaming thread running with Realtime scheduling, priority 74
FreeBoB MSG: Registering capture port dev1c_MicIn1 left

And ps says...
  PID CLS RTPRIO NI PRI %CPU STAT COMMAND
 3423 TS - 0 20 0.0 SLl jackd
 3423 TS - 0 24 0.0 SLl jackd
 3423 TS - 0 24 0.0 SLl jackd
 3423 TS - 0 19 0.0 SLl jackd
 3423 FF 80 - 120 0.0 SLl jackd
 3423 FF 70 - 110 1.5 SLl jackd
 3423 FF 73 - 113 5.6 SLl jackd
 3423 FF 73 - 113 5.0 SLl jackd
 3423 FF 84 - 124 0.0 SLl jackd
 3423 FF 74 - 114 5.4 SLl jackd

Although, I just noticed now that some of those jackd threads aren't running with any RT prio at all. And, I also noticed that the little yellow "RT" in qjackctl isn't lit up either... Is that OK? Or is this a problem?

I'm standing by and waiting to hear from the jackd developers before filing this with the Debian bug tracking system...

And also waiting to hear back before I go out and blow $400 on a 2.4Ghz CPU....

- -ken
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFxpAQe8HF+6xeOIcRAjpjAKD/LrSfNPi3Y6jG9hWDkBndU6x0ygCeNM3x
L+iL4L6UEN2XSJIthQ+kLn0=
=LHn6
-----END PGP SIGNATURE-----
Received on Mon Feb 5 04:15:05 2007

This archive was generated by hypermail 2.1.8 : Mon Feb 05 2007 - 04:15:05 EET