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

Marcos Guglielmetti marcospcmusica at gmail.com
Sat Feb 3 10:48:31 EST 2007


El Sáb 03 Feb 2007 20:26, James Stone escribió:
> > Lee told me to use something like this into /etc/security/limits.conf
> >
> > @audio               hard    rtprio  99
> > @audio               hard    nice    -20
> > @audio               soft    nice    -20
> > @audio               hard    memlock 500000
>
> I wouldn't bother about the memlock part.. I hit some serious
> problems with realtime applications running out of memory.
>
> > My user is into the audio group, of course
> >
> > But the problem is still here: no realtime JACK audio for non root
> > users... I cant install an Ubuntu libpam-modules into this system,
> > because it will break the package dependency system.
> >
> > What else could I do?
>
> I assume you rebooted the system? 

Sure

> Also do you also have the up to 
> date libpam0g (0.79-4)?

Yes

apt-cache show libpam0g
Package: libpam0g
Priority: required
Section: libs
Installed-Size: 172
Maintainer: Sam Hartman <hartmans at debian.org>
Architecture: i386
Source: pam
Version: 0.79-4
Replaces: libpam0g-util
Depends: libc6 (>= 2.3.6-6), libpam-runtime
Suggests: libpam-doc
Conflicts: libpam0 (<= 0.56-2), libpam
Filename: pool/main/p/pam/libpam0g_0.79-4_i386.deb
Size: 79676
MD5sum: 1ced26f43273eb1055384bd711fb1651
SHA1: 7531254d8abffbed3d621cb042a91779d2d06f58
SHA256: c28f25cc4f624061172569fde7b9b0af216596c52cfbf3afb238bc34b657cb7a
Description: Pluggable Authentication Modules library
 Contains the C shared library for Linux-PAM, a suite of shared
 libraries that enable the local system administrator to choose how
 applications authenticate users.  In other words, without rewriting
 or recompiling a PAM-aware application, it is possible to switch
 between the authentication mechanism(s) it uses.  One may entirely
 upgrade the local authentication system without touching the
 applications themselves.
Tag: devel::library, role::shared-lib, security::authentication, 
use::configuring


> Otherwise, it should work!! What is happening when you try to run
> jackd as a user?

What is happening? see:

jackd -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 ..
apparent rate = 48000
creating alsa driver ... hw:0|hw:0|512|2|48000|0|0|hwmon|swmeter|soft-mode|
16bit
control device hw:0
configuring for 48000Hz, period = 512 frames, buffer = 2 periods
nperiods = 2 for capture
nperiods = 2 for playback
9911 waiting for signals
registered builtin port type 32 bit float mono audio
required capabilities not available
capabilities: =
new client: alsa_pcm, id = 1 type 1 @ 0x8058b30 fd = -1
new buffer size 512
registered port alsa_pcm:capture_1, offset = 2048
registered port alsa_pcm:capture_2, offset = 4096
registered port alsa_pcm:playback_1, offset = 0
registered port alsa_pcm:playback_2, offset = 0
++ jack_rechain_graph():
client alsa_pcm: internal client, execution_order=0.
-- jack_rechain_graph()
late driver wakeup: nframes to process = 1024.
load = 0.2672 max usecs: 57.000, spare = 10609.000
load = 1.6759 max usecs: 329.000, spare = 10337.000
late driver wakeup: nframes to process = 1024.
late driver wakeup: nframes to process = 1024.
late driver wakeup: nframes to process = 1024.
load = 0.9833 max usecs: 31.000, spare = 10635.000
late driver wakeup: nframes to process = 1536.
load = 0.8198 max usecs: 70.000, spare = 10596.000
load = 0.6208 max usecs: 45.000, spare = 10621.000
late driver wakeup: nframes to process = 3584.
load = 0.6292 max usecs: 68.000, spare = 10598.000
load = 0.4740 max usecs: 34.000, spare = 10632.000
load = 1.3058 max usecs: 228.000, spare = 10438.000
late driver wakeup: nframes to process = 1536.
new client: hydrogen-tmp, id = 2 type 2 @ 0xb6443000 fd = 10
removing disconnected client hydrogen-tmp state = Not triggered errors = 0
removing client "hydrogen-tmp"
removing client "hydrogen-tmp" from the processing chain
++ jack_rechain_graph():
client alsa_pcm: internal client, execution_order=0.
-- jack_rechain_graph()
new client: Hydrogen-1, id = 3 type 2 @ 0xb6443000 fd = 10
registered port Hydrogen-1:out_L, offset = 6144
registered port Hydrogen-1:out_R, offset = 8192
++ jack_rechain_graph():
client alsa_pcm: internal client, execution_order=0.
client Hydrogen-1: start_fd=5, execution_order=0.
client Hydrogen-1: wait_fd=7, execution_order=1 (last client).
-- jack_rechain_graph()
connect Hydrogen-1:out_L and alsa_pcm:playback_1 (output)
++ jack_rechain_graph():
client alsa_pcm: internal client, execution_order=0.
client Hydrogen-1: start_fd=5, execution_order=0.
client Hydrogen-1: wait_fd=7, execution_order=1 (last client).
-- jack_rechain_graph()
connect Hydrogen-1:out_R and alsa_pcm:playback_2 (output)
++ jack_rechain_graph():
client alsa_pcm: internal client, execution_order=0.
client Hydrogen-1: start_fd=5, execution_order=0.
client Hydrogen-1: wait_fd=7, execution_order=1 (last client).
-- jack_rechain_graph()
new transport position: 0, id=0x1
late driver wakeup: nframes to process = 6656.
late driver wakeup: nframes to process = 13312.
load = 3.1093 max usecs: 524.000, spare = 10142.000
late driver wakeup: nframes to process = 2048.
late driver wakeup: nframes to process = 2560.
load = 12.4772 max usecs: 2330.000, spare = 8336.000
late driver wakeup: nframes to process = 1536.
late driver wakeup: nframes to process = 2560.
late driver wakeup: nframes to process = 1536.
load = 11.2499 max usecs: 1069.000, spare = 9597.000
late driver wakeup: nframes to process = 2048.
late driver wakeup: nframes to process = 1024.
load = 30.4421 max usecs: 5294.000, spare = 5372.000
transport command: START
transport Rolling
new transport position: 0, id=0x2
load = 20.0448 max usecs: 1029.000, spare = 9637.000
load = 29.9361 max usecs: 4248.000, spare = 6418.000
transport command: STOP
transport Stopped
new transport position: 0, id=0x3
load = 33.1192 max usecs: 3872.000, spare = 6794.000
late driver wakeup: nframes to process = 2048.
late driver wakeup: nframes to process = 2560.
load = 20.4270 max usecs: 825.000, spare = 9841.000
load = 13.7059 max usecs: 745.000, spare = 9921.000
load = 9.0844 max usecs: 476.000, spare = 10190.000
late driver wakeup: nframes to process = 1024.
load = 12.8630 max usecs: 1775.000, spare = 8891.000
load = 13.3179 max usecs: 1469.000, spare = 9197.000
late driver wakeup: nframes to process = 1024.
load = 33.4590 max usecs: 5717.000, spare = 4949.000
late driver wakeup: nframes to process = 1024.
load = 32.2836 max usecs: 3318.000, spare = 7348.000
load = 38.6760 max usecs: 4807.000, spare = 5859.000
load = 27.3120 max usecs: 1701.000, spare = 8965.000
load = 16.8343 max usecs: 678.000, spare = 9988.000
load = 11.6611 max usecs: 692.000, spare = 9974.000
load = 39.0436 max usecs: 7085.000, spare = 3581.000
late driver wakeup: nframes to process = 3072.
load = 40.4200 max usecs: 4458.000, spare = 6208.000
late driver wakeup: nframes to process = 1536.
load = 43.1520 max usecs: 4894.000, spare = 5772.000
load = 24.1168 max usecs: 542.000, spare = 10124.000
late driver wakeup: nframes to process = 1024.
late driver wakeup: nframes to process = 1024.
load = 62.0584 max usecs: 20349.000, spare = 0.000
late driver wakeup: nframes to process = 1024.
jack main caught signal 2
starting server engine shutdown
stopping driver
unloading driver
freeing shared port segments
stopping server thread
last xrun delay: 0.000 usecs
max delay reported by backend: 67549.000 usecs
freeing engine shared memory
max usecs: 20349.000, engine deleted
WARNING: 20 message buffer overruns!
cleaning up shared memory
cleaning up files
unregistering server `default'


So, when it's running, it's not in realtime:

 ps -C jackd -cmL
  PID   LWP CLS PRI TTY          TIME CMD
 9911     - -     - pts/2    00:00:00 jackd
    -  9911 TS   22 -        00:00:00 -
    -  9912 TS   24 -        00:00:00 -
    -  9913 TS   24 -        00:00:00 -
    -  9914 TS   24 -        00:00:00 -


-- 
Marcos Guglielmetti  
* Director del desarrollo de Musix GNU+Linux, 100% Software Libre
* CD Donwload: (http://www.musix.org.ar/en/)
* Colabora: http://www.musix.org.ar/wiki/index.php/Musix099_tasks
* Videos, programas y otras cosas en: ftp://musix.ourproject.org/pub/musix/
* Reporte de errores a: 
https://www.musix.org.ar/wiki/index.php?title=Problemas-Bugs
*IRC: #musix channel on freenode
* http://autosus.wordpress.com/



More information about the Linux-audio-user mailing list