Automatic realtime IRQ priorities using rtirq
Saturday, 3. January 2009, 15:31:17
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...
- Download the script from http://www.rncbc.org/jack/ (you'll need to head to the end of the page)
- Extract the tar file. For this I used my file browser, PCManFM. No need for the terminal. Yet.
- NOW open a terminal.
- Become root by typing su and the root password.
- Enter cd {path to rtirq script} - this takes you to where the script is.
- Then cp rtirq.conf /etc/ - this copies rtirq's config file to /etc/
- 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
- Now enter insserv /etc/init.d/rtirq - this installs the script for the system on startup
- 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!









Anonymous # 27. August 2009, 19:03
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
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
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
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:
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:
All right!
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
ARIGATO you very much COREY SAN
THANK YOU FOR YOUR ATTENTION
AMAZING MUSIC!!!
Corey Mwamba # 2. September 2009, 06:29
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
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:
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.