Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The question says it all. I see some tutorials online for earlier editions of Ubuntu, but am having a hard time for 12.04.

share|improve this question
    
Why? Unless you are building an embedded system with hard real time requirements, there should be no need. –  psusi Dec 10 '12 at 1:40
    
@Paul is correct -- this is an important consideration for pro audio. He mentioned in his other comment that he is using JACK. I have the same question and I'm looking for an answer. –  MountainX Jan 9 at 21:21
add comment

2 Answers

There is generally no need to adjust IRQ priority unless you are having particular problems and want to apply boot options such as irqpoll and others listed at the Ubuntu wiki. It is best to let the kernel manage them or look in your bios for any options as that will be the best place for configuration.

However, you are probably referring to the hwtools package that was available before even Hardy (8.04) and which contained the irqtune program; this utility let you tweak the IRQs of serial devices such as modems, which was said in the past to sometimes improve performance. Serial ports are rarely used these days, but there may be settings in the bios to both enable/disable and tweak them.

However, there is a program in the repositories called irqbalance, which is designed only for multi-core CPUS. There is more information here, but it may not be appropriate for you as it is more to do with balancing server load.

If you want to list your IRQ ports in Ubuntu you can run cat /proc/interrupts or install the next generation version of the procinfo program and run that and the accompanying lsdev to gain further information. Here is some sample output of procinfo, very much curtailed, which will help identify your IRQs:

irq   0:         49  timer               irq  15:      30500  pata_sis         
irq   1:      18634  i8042               irq  17:      78117  firewire_ohci, ye
irq   6:          3  floppy              irq  18:         82  snd_intel8x0     
share|improve this answer
    
If anyone is wondering, the reason I want to know this is because of a persistent xruns problem in JACK with 12.04. It is hard to know exactly what is causing this. IRQ conflicts could be one answer. –  Paul Dec 12 '12 at 2:12
add comment

Questions like this are very important when running pro audio applications. As you see, and as I have experienced myself many times in the past, Askubuntu.com has a tendency to tell us that we don't need an answer to these kinds of questions. For these narrowly focused questions, you'll find more friendly help on places like the LinuxMusicians forum or the OpenSourceMusicians IRC channel (# opensourcemusicians).

I run KX Studio (which is a pro audio distribution on top of Kubuntu) and I have gotten a lot of help at both #kxstudio and #ardour IRC channels.

Anyway, here's how you do it now that I have figured it out with help from the above resources.

Use these commands to discover the USB bus and IRQ of your audio device:

  • lsusb (or lsusb -t)
  • lspci (or lspci -v)
  • cat /proc/interrupts

In my case, my USB audio interface is ehci_hcd:usb2 on IRQ 23. It may not be easy to figure it out, but if you cross reference the above listings you'll figure out which IRQ is of interest after some detective work. See below for more tips.

Next, install rtirq
See the Ubuntu Wiki:
https://wiki.edubuntu.org/UbuntuStudio/rtirq

Now edit the file /etc/default/rtirq (as sudo). And look for the line that contains RTIRQ_NAME_LIST=

If you want IRQ 23 to have the highest priority, add it to the front of the list like so:

RTIRQ_NAME_LIST="23 usb i8042 snd"

However, in my case, I would rather use the name of the device in case the IRQ assignment changes for some unknown reaason. So I specify it like this:

RTIRQ_NAME_LIST="ehci_hcd:usb2 usb i8042 snd"

Just put the device (or IRQ) at the front of the list for highest priority. It is a space delimited list.

Save the file, then run:

sudo /etc/init.d/rtirq restart

There is no need to reboot. You'll see the resulting IRQ priorities listed from the command above. But if you want to see them again later, run:

sudo /etc/init.d/rtirq status

And check cat /proc/interrupts if desired.

Some extra tips, as promised:

Using lsusb I found that my audio interface was on USB Bus 001 Device 003.

Next, using lspci -v I found that I have 3 USB controllers. I found one listed like this: 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1. The flags in that listed included these: Flags: bus master, medium devsel, latency 0, IRQ 23. So, assuming I picked the right USB controller (the one controlling Bus 01), those flags told me that I am interested in IRQ 23.

Next, /proc/interrupts told me that IRQ 23 has the device name ehci_hcd:usb2 associated with it.

I also used tree /sys/bus/usb/drivers/usb/ and cat /proc/asound/cards to cross reference info to pick the correct USB controller.

You might also find the following Perl script useful:
realTimeConfigQuickScan.pl

share|improve this answer
    
What's with all the meta commentary in the first paragraph? There's a site for that, y'know. –  Robert Harvey Jan 10 at 1:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.