Re: [linux-audio-user] Installing realtime kernel - gentoo ERRORs loading realtime module

From: Brad Fuller <brad@email-addr-hidden>
Date: Sun Mar 25 2007 - 22:59:07 EEST

Brad Fuller wrote:
> Marc-Olivier Barre wrote:
>> On 3/25/07, Brad Fuller <brad@email-addr-hidden> wrote:
>>> I'm following the directions on the wiki for the RT kernel at:
>>> http://proaudio.tuxfamily.org/wiki/index.php?title=Realtime_%28RT%29_Kernel
>>>
>>>
>>> and I'm at the point of modprobe'ing the realtime module in the
>>> instructions which say:
>>>
>>> -----------------
>>> load realtime-lsm
>>>
>>> # modprobe commoncap
>>> # modprobe realtime gid=18
>>> -----------------
>>>
>>> But, I receive this error:
>>>
>>> FATAL: Error inserting realtime
>>> (/lib/modules/2.6.16-rt29-tglx4/extra/realtime.ko): Invalid module
>>> format--
>>>
>>> when modprobe'ing the "realtime" module.
>>>
>>> Why is this? The kernel and the module were compiled with the same
>>> tools.
>>
>> Hi Brad,
>>
>> You may have not seen it but on the wiki you pointed to, in the part
>> called "Activate and test RT" the realtime-lsm module is marked as
>> deprecated.
>
> CRAP! I simply didn't see that! Thanks for the reply and thanks for
> pointing this out!
>> if you go a little further in the document you will find a
>> section called "RLIMITS" (right after the realtime-lsm one).
>>
>> The currently recommended method to get realtime to work is to use the
>> rlimits method with PAM, which you should normally have on your
>> system. It will make things a lot easier for you.
>>
>> The tutorial might be taking some shortcuts (depending on your
>> configuration). If after following the tutorial's info it still
>> doesn't work, try the following :
>>
>> - check that your user is part of the audio group
>> - from a terminal, type in the following command :
>> grep "pam_limits.so" /etc/pam.d/{gdm,kdm,xdm,login} 2> /dev/null
> Aha, well. I have it none.
> How would this get added?

well... I just went ahead and added the line:
session required pam_limits.so

in /etc/pam.d/xdm, login and gdm

Which didn't seem to make a difference to my other problem.
Note that booting produces no errors. My audio device driver loads fine
and initializes. Everything seems fine, except

1. Audio plays back very slowly. Video files play at various speeds
(fast then slow then fast, etc.)

2. Running qjackctl I receive the warning that real-time scheduling is
not permed and then I continuously receive delay errors:

----
12:30:12.271 Startup script...
12:30:12.272 artsshell -q terminate
12:30:12.595 Startup script terminated with exit status=256.
12:30:12.602 JACK is starting...
12:30:12.602 /usr/bin/jackd -R -p256 -dalsa -dhw:0 -r44100 -p1024 -n2 -m
12:30:12.610 JACK was started with PID=6349 (0x18cd).
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.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 1024 frames, buffer = 2 periods
nperiods = 2 for capture
nperiods = 2 for playback
cannot use real-time scheduling (FIFO at priority 20) [for thread 
-1229620336, from thread -1229620336] (1: Operation not permitted)
cannot use real-time scheduling (FIFO at priority 10) [for thread 
-1238013040, from thread -1238013040] (1: Operation not permitted)
12:30:14.628 Server configuration saved to "/home/bfuller/.jackdrc".
12:30:14.630 Statistics reset.
12:30:14.805 Client activated.
12:30:14.817 Audio connection change.
12:30:14.825 Audio connection graph change.
cannot use real-time scheduling (FIFO at priority 9) [for thread 
-1232647280, from thread -1232647280] (1: Operation not permitted)
12:30:20.362 XRUN callback (1).
delay of 104670.000 usecs exceeds estimated spare time of 21713.000; 
restart ...
delay of 96148.000 usecs exceeds estimated spare time of 21713.000; 
restart ...
delay of 104496.000 usecs exceeds estimated spare time of 21713.000; 
restart ...
----
========================
I then went into alsamixer and noticed that 
"Multi Track Internal Clock"
was set wrong. I changed it to 44.1k and now audio plays at a reasonable level. 
Which, makes me think that I need to be able to change this on the fly. 
Other audio files and video files do not play correctly because it is stuck on 44.1k. 
I can't seem to change "Multi Track Rate Locking" and "Multi Track Rate Reset".
==================================
After setting "Multi Track Internal Clock" jackd worked better but still no real-time.
----
loading driver ..
apparent rate = 44100
creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 44100Hz, period = 1024 frames, buffer = 2 periods
nperiods = 2 for capture
nperiods = 2 for playback
cannot use real-time scheduling (FIFO at priority 20) [for thread -1228780656, from thread -1228780656] (1: Operation not permitted)
cannot use real-time scheduling (FIFO at priority 10) [for thread -1237173360, from thread -1237173360] (1: Operation not permitted)
12:55:07.717 Server configuration saved to "/home/bfuller/.jackdrc".
12:55:07.720 Statistics reset.
12:55:07.723 Client activated.
12:55:07.727 Audio connection change.
12:55:07.734 Audio connection graph change.
subgraph starting at qjackctl-6564 timed out (subgraph_wait_fd=15, status = 0, state = Triggered)
**** alsa_pcm: xrun of at least 1.605 msecs
cannot use real-time scheduling (FIFO at priority 9) [for thread -1232909424, from thread -1232909424] (1: Operation not permitted)
12:55:07.806 XRUN callback (1).
----
Any help on: pointers on getting real-time to work AND for applications to set the clock 
of the audio device is much appreciated!
Received on Mon Mar 26 00:15:04 2007

This archive was generated by hypermail 2.1.8 : Mon Mar 26 2007 - 00:15:04 EEST