Skip navigation.

rantshoutwhisper

Automatic realtime IRQ priorities using rtirq

, , , ,

UPDATE: I've JUST noticed that there's an RPM at http://www.rncbc.org/jack/ - install and you're away! That man's a genius.

When using audio on Linux, you have to be aware of the the realtime priorities of the system. And even though you may have edited the /etc/security/limits.conf file, the thread priorities of the sound card will not be set.

Rui Nuno Capela [creator of qjackctl and the excellent qtractor] wrote a script to help set the priorities of the most likely IRQs for your system. It didn't require any tweaking; however, when I first tried to use it there were no instructions as to how to apply it. SO...

  1. Download the script from http://www.rncbc.org/jack/ (you'll need to head to the end of the page)
  2. Extract the tar file. For this I used my file browser, PCManFM. No need for the terminal. Yet.
  3. NOW open a terminal.
  4. Become root by typing su and the root password.
  5. Enter cd {path to rtirq script} - this takes you to where the script is.
  6. Then cp rtirq.conf /etc/ - this copies rtirq's config file to /etc/
  7. Then cp rtirq.sh /etc/init.d/rtirq - this copies rtirq.sh to the /etc/init.d/ folder, making it a system script. It then renames it as rtirq
  8. Now enter insserv /etc/init.d/rtirq - this installs the script for the system on startup
  9. Lastly, enter ln -s /etc/init.d/rtirq /sbin/rcrtirq -this turns the script into a command


Now when you enter rcrtirq you'll get

Usage /sbin/rcrtirq {[re]start|stop|reset|status}



You can only use the command as root unfortunately, but it doesn't matter because this script will now start when you switch your computer on - which means you don't have to think about it!

Lime for Linux: a small and esoteric guideFluxbox: combining commands in a user menu

Comments

Anonymous 27. August 2009, 19:03

Anonymous writes:

how to add this script to Startup?
for real-time priority irq
CrunchBang Linux 9.04.01(un Ubuntu based) ,kernel 2.6.29rt

#!/bin/bash
chrt -f -p 99 pidof 16

Corey Mwamba 28. August 2009, 05:04

Hello,

I do not know much about Crunch-Bang Linux I'm afraid - I'm on OpenSUSE here.

If you want real-time priority for IRQs, then follow the instructions in my post, above. As you cannot be sure of the process number each time you start the computer, I think RNCBC's script will be easier to control.

But I guess [and I'm happy to be corrected] that if you followed the instructions I've written from point 3, you could install any script you want!

Hope that helps.

Anonymous 29. August 2009, 05:39

Anonymous writes:

Hello,
point 2 Extract the tar file. For this I used my file browser, PCManFM. No need for the terminal. Yet.

in which directory to unpack the archive?

Anonymous 29. August 2009, 18:20

Anonymous writes:

I did everything according to instructions
enter rcrtirq


locke@locke-desktop:~$ rcrtirq

Usage: /sbin/rcrtirq {[re]start|stop|reset|status|force-reload}

All right?

Corey Mwamba 30. August 2009, 05:58

Originally posted by anonymous:

Hello,
point 2 Extract the tar file. For this I used my file browser, PCManFM. No need for the terminal. Yet.

in which directory to unpack the archive?



Any directory for which you have normal user access - for example, where you downloaded the tar file. You could make a new folder for it if you wish and download it to there, then unpack the archive in that folder. Then open a terminal and go to that path.

PCManFM is good for this, since you can go to the Tool menu and open a terminal with its path set to the directory you're looking at.

Once the files have been copied [points 6 and 7], then the tar file becomes unimportant.

Corey Mwamba 30. August 2009, 06:06

Originally posted by anonymous:

I did everything according to instructions
enter rcrtirq


locke@locke-desktop:~$ rcrtirq

Usage: /sbin/rcrtirq {[re]start|stop|reset|status|force-reload}

All right?




All right! :yes:

If you did the insserv step then it should be starting at start-up. I'm not sure how to check that using the command-line, but in OpenSUSE you can check this using YaST: go to System > System Services (Runlevel) and rtirq should be listed there.

Anonymous 30. August 2009, 12:08

Anonymous writes:

ARIGATO you very much COREY SAN
THANK YOU FOR YOUR ATTENTION
AMAZING MUSIC!!!

Corey Mwamba 2. September 2009, 06:29

Thank you very much!

Incidentally, if you do sudo chkconfig in a terminal, you can check if rtirq is running as a service.

Anonymous 2. September 2009, 19:06

Anonymous writes:

Thank you!!!
not prompt where to download the distributions with the already built rt kernel?
except Ubuntu Studio
example MONTA VISTA?
or all of such distributions are paid?

Corey Mwamba 19. September 2009, 05:27

Originally posted by anonymous:

not prompt where to download the distributions with the already built rt kernel?
except Ubuntu Studio
example MONTA VISTA?
or all of such distributions are paid?



It'd be a lot easier if you all put your names.

I don't really understand the question - are you asking where you can find a Linux distribution with a built-in RT kernel? If you are then I think http://www.linux-sound.org/distro.html would be a good start.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

Download Opera, the fastest and most secure browser