Re: [LAU] Realtime, but many xruns when jack is started. Debian Etch

From: Rui Nuno Capela <rncbc@email-addr-hidden>
Date: Sun Oct 07 2007 - 18:37:09 EEST

Nigel Henry wrote:
> On Friday 05 October 2007 18:14, Nigel Henry wrote:
>> On Thursday 04 October 2007 21:29, Roman Muņoz wrote:
>>> Hi Nigel,
>>>
>>> Is rtirq working four you? If yes, I think that your soundcard IRQ
>>> should be at prio 85 at startup... and it was not.
>>>
>>> See this:
>>> http://mggmail.blogspot.com/2007/07/re-rtirq-fixed.html
>> Well I've got realtime working ok on Debian Etch, and Rick Wright's one
>> liner in rc.local is changing the prio to 90 for the soundcard on bootup.
>> But, rtirq is something different. The version installed is the same as on
>> the blog above (20070101), and the 2 files are installed, one
>> in /etc/init.d/rtirq, and the other in /etc/sysconfig/rtirq. I believe
>> the /etc/sysconfig directory was created when installing rtirq, as I don't
>> rmember it being there before. I say this because with Fedora the sysconfig
>> directory exists, and there is a bunch of files in it, and I remember
>> looking in Debian for this directory, and couldn't find it.
>>
>> I also ran sysv-rc-conf as root on Etch. The rtirq entry is there, but
>> runlevels 2,3,4,and5 are unchecked, so something isn't quite right here. I
>> see also on the blog above that rtirq should be in /etc/default, but in the
>> case of Etch it isn't. As I say. Realtime on Etch is working ok, but I'll
>> go through the same procedure on Debian Lenny (testing), and try and fix
>> the rtirq problem without using Rick Wright's one liner, although it's much
>> appreciated, and works like clockwork.
>>
>> I'll post back after I've played around with realtime on Lenny a bit.
>>
>>> Best regards,
>>> Roman
>> Thanks for all the replies to this interesting subject.
>>
>> Nigel.
>
> As promised, an update on realtime on Debian Lenny. That is after having
> installed from the musix repo, kernel 2.6.21-rt4, and 2.6.21.5-rt18.
>
> First I had to update util-linux from the unstable repo, as the version on
> Lenny was the Etch one, and still thought that schedutils was available. The
> Sid (unstable) version installed ok, and chrt is available now.
>
> Then added the lines below to /etc/security/limits.conf.
> @audio - rtprio 99
> @audio - nice -10
> @audio - memlock 4000000
>
> Now the fun started with installing rtirq (the version from the musix repo).
> It installed, but refused to start. I was confused, as both scripts, the one
> in /etc/init.d, and /etc/sysconfig seemed to be the same, so I booted up
> Fedora 7, and checked the 2 rtirq scripts there, and sure enough the one
> in /etc/sysconfig was a very short one, compared to the start script
> in /etc/init.d.
>
> Downloaded the rtirq tarball from the blog that Roman posted.
> http://www.rncbc.org/jack/rtirq-20070101.tar.gz
>
> Unpacked it, deleted the duplicated startup script in Lenny's /etc/sysconfig,
> pasted the correct config script in /etc/sysconfig, renaming it from
> rtirq.conf to rtirq.
>
> Rebooted, and ran /etc/init.d/rtirq status, and got the following output.
>
> /etc/init.d/rtirq status
>
> PID CLS RTPRIO NI PRI %CPU STAT COMMAND
> 184 FF 90 - 130 0.0 S< IRQ-8 rtc
> 666 FF 85 - 125 0.0 S< IRQ-9 ohci1394, bttv0, Bt87x audio
> 1770 FF 84 - 124 0.1 S< IRQ-10 EMU10K1
> 631 FF 80 - 120 0.0 S< IRQ-11 uhci_hcd:usb1, uhci_hcd:usb2,
> eth0
> 288 FF 75 - 115 0.0 S< IRQ-1 i8042
> 287 FF 74 - 114 0.0 S< IRQ-12 i8042
> 4 FF 50 - 90 0.0 S softirq-high/0
> 5 FF 50 - 90 0.0 S softirq-timer/0
> 6 FF 50 - 90 0.0 S softirq-net-tx/
> 7 FF 50 - 90 0.0 S softirq-net-rx/
> 8 FF 50 - 90 0.0 S softirq-block/0
> 9 FF 50 - 90 0.0 S softirq-tasklet
> 10 FF 50 - 90 0.0 S softirq-sched/0
> 11 FF 50 - 90 0.0 S softirq-hrtimer
> 12 FF 50 - 90 0.0 S softirq-rcu/0
> 207 FF 50 - 90 3.2 S< IRQ-14 ide0
> 210 FF 50 - 90 0.0 S< IRQ-15 ide1
> 785 FF 50 - 90 0.0 S< IRQ-6 floppy
> 1581 FF 50 - 90 0.0 S< IRQ-7 parport0
> 3078 FF 50 - 90 0.0 S< IRQ-3
>
> Jackd has a prio of 70, and just with jackd started, only one xrun up to now
> after 58mins of 0.118 msecs duration.
>
> Job done. Realtime on Etch, and Lenny. The above makes it look dead easy, but
> there was a lot of frustration along the way, and it took longer than it
> appears.
>
> Many thanks to all those who offered help on this list, and the debian-user
> list.
>
> One question regarding the rtirq status output above.
>
> IRQ-9 has a slightly higher rtprio than that for the soundcard on IRQ-10.
> ohci1394 is tied in with the firewire port on the audigy2 soundblaster, but I
> can probably stop that being loaded, as I don't use firewire. bttv0 is the TV
> card, and BT87x audio is for the audio capture part of the TVcard.
>
> What would I need to do to swap these around, so that IRQ-9 has a prio of 84,
> and IRQ-10, a prio of 85?
>
> It's probably a bit of an academic question, as your unlikely to be doing
> serious audio work while watching TV.
>

you can switch pci slots around, that is between the tvcard and the
audigy2 on the mainboard

or

you can tweak the alsa modules loading order, like opted in
/etc/modprobe.conf (or the equivalent in your distro), giving an
explicit options ... index= line for each module, for example, i believe
these are the ones to write down:

  options snd-bt87x index=0 # tvcard
  options snd-emu10k1 index=1 # audigy

or

you can hack the rtirq script for doing priorities in reverse order:
edit /etc/init.d/rtirq near line 211, where it reads

  IRQS=`grep irq /proc/asound/cards | tac | sed 's/.* irq \(.*\)/\1/'`

change that line to:

  IRQS=`grep irq /proc/asound/cards | sed 's/.* irq \(.*\)/\1/'`

however I recommend doing it the second way, that is making it all
deterministic and independent from the booting order resolution, which
might change when you less expect with the weather ;)

cheers

-- 
rncbc aka Rui Nuno Capela
rncbc@email-addr-hidden
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user
Received on Mon Oct 8 00:15:05 2007

This archive was generated by hypermail 2.1.8 : Mon Oct 08 2007 - 00:15:06 EEST