Is this Linux setup good enough?

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

User avatar
GarryO
Established Member
Posts: 167
Joined: Mon Apr 06, 2009 7:30 pm
Location: UK
Contact:

Re: Is this Linux setup good enough?

Post by GarryO »

This is running on the rt kernel?
User avatar
GarryO
Established Member
Posts: 167
Joined: Mon Apr 06, 2009 7:30 pm
Location: UK
Contact:

Re: Is this Linux setup good enough?

Post by GarryO »

You should check that you're a member of the audio group, in a terminal type "groups" (w/o quotes). Is "audio" listed? if not type this, keeping the quotes this time:

sudo "useradd -G audio username"

change username to your actual username of course.
You could also maybe add this line to /etc/security/limits.conf:

@audio - nice -19

Everybody seems to do that: I have doubts about its relevance, but it won't hurt.
You need to give the soundcard a real-time priority to get the best out of it.
To do this you will need the package with the command "chrt" in it: on debian its in the "util-linux" package. You'll also need the "pgrep" package.
if you type "cat /proc/interrupts" (w/o quotes) into a terminal you'll get something like this ( the details will differ ):

Code: Select all

  0:        209    XT-PIC-XT        timer
  1:          2    XT-PIC-XT        i8042
  2:          0    XT-PIC-XT        cascade
  3:          0    XT-PIC-XT        ohci_hcd:usb1
  4:    2567394    XT-PIC-XT        ICE1712
  5:       2113    XT-PIC-XT        ohci_hcd:usb2
  7:     119871    XT-PIC-XT        eth0
  8:          0    XT-PIC-XT        rtc0
(snipped)

which will allow you to identify your soundcard ( mine uses the ICE1712 chipset )
so you can add a line like this to /etc/rc.local ( you'll need to do "sudo gedit" )

chrt -f -p 90 `pgrep ICE1712`

( note the backticks - they're not single-quote marks ! )
you can also set jack's rt-prio - if you're using qjackctl - by going to setup -> options-tab and adding this to the "execute script after startup" box, tick the box to enable:

chrt -f -p 85 `pgrep jackd`

you'll need to reboot to make all these changes take effect.
To fine-tune all of this you should check out Raboof's script at

http://arnout.engelen.eu/files/dev/linu ... ickScan.pl

save this and run it from a terminal:

perl realTimeConfigQuickScan.pl

that should give you a few pointers to things that will tweak your realtime performance.
~G.
User avatar
Chipfryer
Established Member
Posts: 362
Joined: Tue Nov 24, 2009 12:43 pm

Re: Is this Linux setup good enough?

Post by Chipfryer »

Hey Gary.... Phew! :D
This is tough going hahaha. Please don't worry about it I know you get this all the time. I'm nearly there with your instructions, the last bit lost me a little. I do have the pl file and will look at that many thanks.

Here is what I've done and gotten so far.
Many thanks again.

===============================

Yes Gary sorry to be a pain. I boot to the RT Kernel before trying. (If I remember :mrgreen: )

Added to limits file >> @audio - nice -19

sudo "useradd -G audio username" Results in..
sudo: useradd -G audio USERNAME: command not found

---------------

Results of chrt
chrt (util-linux-ng 2.14.2)
usage: chrt [options] [prio] [pid | cmd [args...]]
manipulate real-time attributes of a process
-b, --batch set policy to SCHED_BATCH
-f, --fifo set policy to SCHED_FIFO
-i, --idle set policy to SCHED_IDLE
-p, --pid operate on existing given pid
-m, --max show min and max valid priorities
-o, --other set policy to SCHED_OTHER
-r, --rr set policy to SCHED_RR (default)
-h, --help display this help
-v, --verbose display status information
-V, --version output version information

--------------

This is what I get when typing cat /proc/interrupts

CPU0
0: 550 IO-APIC-edge timer
1: 696 IO-APIC-edge i8042
3: 3 IO-APIC-edge
4: 3 IO-APIC-edge
6: 5 IO-APIC-edge floppy
7: 1 IO-APIC-edge parport0
8: 0 IO-APIC-edge rtc0
9: 0 IO-APIC-fasteoi acpi
14: 25322 IO-APIC-edge pata_amd
15: 9987 IO-APIC-edge pata_amd
16: 9472 IO-APIC-fasteoi ICE1712, radeon@pci:0000:01:00.0
19: 236109 IO-APIC-fasteoi eth1
20: 71571 IO-APIC-fasteoi ohci_hcd:usb2
21: 31382 IO-APIC-fasteoi ehci_hcd:usb1, NVidia CK8S
22: 68 IO-APIC-fasteoi sata_nv, ohci_hcd:usb3
NMI: 0 Non-maskable interrupts
LOC: 6775860 Local timer interrupts
RES: 0 Rescheduling interrupts
CAL: 0 Function call interrupts
TLB: 0 TLB shootdowns
SPU: 0 Spurious interrupts
ERR: 1
MIS: 0

The last part I don't really understand to be honest?
You need to give the soundcard a real-time priority to get the best out of it. <<

I don't see my card listed at all?
I used this.............
less /proc/asound/modules

>> Which brought up this
0 snd_intel8x0
1 snd_ice1712
/proc/asound/modules (END)

============

Have a good Sunday without folks like me bothering you. :mrgreen:
User avatar
GarryO
Established Member
Posts: 167
Joined: Mon Apr 06, 2009 7:30 pm
Location: UK
Contact:

Re: Is this Linux setup good enough?

Post by GarryO »

Yes Gary sorry to be a pain. I boot to the RT Kernel before trying.
Not a problem. If you don't boot to the rt kernel you won't be able to do any real rt.
sudo "useradd -G audio username" Results in..
sudo: useradd -G audio USERNAME: command not found
looks like you need to install the adduser package. And you did replace username with your actual username? your login name? If you're not sure type "whoami" into a terminal ( w/o quotes ).

your cat /proc/interrupts:

16: 9472 IO-APIC-fasteoi ICE1712, radeon@pci:0000:01:00.0

the ICE1712 is your M-audio card, which is unfortunately sharing an interrupt with your video card.
Explanation: the rt kernel runs all interrupts as separate threads, so we can give realtime priorities to the ones we want, in our case we want to prioritize the audio handling, so no matter how we load the system, we get glitch-free audio. chrt is the tool we use to set the rt priority.
The shared interrupt is a bit of a hassle - though you may be able to do something about that in your boot setup ( the "press F2 (or similar) for setup" thing when you turn on).
Then you can use the " chrt -f -p 90 `pgrep ICE1712` " to give the card a rt priority of 90.

your "less /proc/asound/modules" shows that your onboard sound is the first sound card, the M-audio the second. If you're not using the onboard sound you can probably disable it from the boot setup too.

I appreciate that in my enthusiasm I've given you rather a lot to think about at once.
If you just want to get on and make some music, I would install a dedicated linux like 64studio or ubuntustudio: it will save you all these configuration hassles.
User avatar
Chipfryer
Established Member
Posts: 362
Joined: Tue Nov 24, 2009 12:43 pm

Re: Is this Linux setup good enough?

Post by Chipfryer »

Hi Gary.
Yes indeed a lot to think about. Man you are the dog this is wonderful info. I'd really like to know the grass roots stuff frankly. I've looked at 64 but not Ubuntu. It's the midi capability that I'm looking for of course. I play guitar, bass Keys (Played a lot of instruments frankly but I am a drummer).
Drummer jokes please. :mrgreen:

Yes Username was mine and I was running rt at that time too.
I'll try knocking out the onboard card from bios as you suggest in any event. This isn't lost time for me Gary, I love learning so its all towards getting away from Windows.

Now I'll try to digest a lot of this and have a play around.
Many, many thanks for your time, again I know you must get bombarded but i don't give it very easily and will crack this and hopefully be able to point people in the right direction at some point myself.

Thank you. Lots! :D

The only reason I need midi is for the frills and feel to the keys if I were totally honest, midi drums of course is a bonus.

Instead of racking your brains too much and I really DO appreciate your help. I'll get a Live Ubuntu CD and se what is there? I noticed 64 only came with Audacity which is a powerful tool and not to be knocked lightly at all but that does not have midi capabilities.
GarryO wrote:
Yes Gary sorry to be a pain. I boot to the RT Kernel before trying.
Not a problem. If you don't boot to the rt kernel you won't be able to do any real rt.
sudo "useradd -G audio username" Results in..
sudo: useradd -G audio USERNAME: command not found
looks like you need to install the adduser package. And you did replace username with your actual username? your login name? If you're not sure type "whoami" into a terminal ( w/o quotes ).

your cat /proc/interrupts:

16: 9472 IO-APIC-fasteoi ICE1712, radeon@pci:0000:01:00.0

the ICE1712 is your M-audio card, which is unfortunately sharing an interrupt with your video card.
Explanation: the rt kernel runs all interrupts as separate threads, so we can give realtime priorities to the ones we want, in our case we want to prioritize the audio handling, so no matter how we load the system, we get glitch-free audio. chrt is the tool we use to set the rt priority.
The shared interrupt is a bit of a hassle - though you may be able to do something about that in your boot setup ( the "press F2 (or similar) for setup" thing when you turn on).
Then you can use the " chrt -f -p 90 `pgrep ICE1712` " to give the card a rt priority of 90.

your "less /proc/asound/modules" shows that your onboard sound is the first sound card, the M-audio the second. If you're not using the onboard sound you can probably disable it from the boot setup too.

I appreciate that in my enthusiasm I've given you rather a lot to think about at once.
If you just want to get on and make some music, I would install a dedicated linux like 64studio or ubuntustudio: it will save you all these configuration hassles.
User avatar
GarryO
Established Member
Posts: 167
Joined: Mon Apr 06, 2009 7:30 pm
Location: UK
Contact:

Re: Is this Linux setup good enough?

Post by GarryO »

I'm glad to be of some help!
Please note that I wrote UbuntuStudio and not plain Ubuntu, although the latest version of this comes with an rt kernel.

I don't do a lot a lot of midi stuff ( sequencing etc ) but I found that my M-audio usb midi keyboard worked straight out of the box with apps like Qsynth and Qsampler. If you haven't already, you should check out the Hydrogen drum machine app - it does midi stuff.

see you around ~G.
User avatar
Yeri
Established Member
Posts: 158
Joined: Tue Dec 09, 2008 6:33 pm
Location: Spain

Re: Is this Linux setup good enough?

Post by Yeri »

GarryO wrote:you can also set jack's rt-prio - if you're using qjackctl - by going to setup -> options-tab and adding this to the "execute script after startup" box, tick the box to enable:

chrt -f -p 85 `pgrep jackd`
Just a question: What are the differences between setting jack's priority through chrt after it starts or doing it through the -P option (realtime priority) ?

Cheers,

Gerard.
User avatar
Chipfryer
Established Member
Posts: 362
Joined: Tue Nov 24, 2009 12:43 pm

Re: Is this Linux setup good enough?

Post by Chipfryer »

Good morning.
I did get the Ubuntu Studio setup. There is no Live CD it is on a DVD but no matter.

I ran a check on sound and got the following....
audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink: Could not open audio device for playback.

I did find this on Ubuntu which relates I think to my 2496?
http://ubuntuforums.org/showpost.php?p= ... tcount=989

Anyway happing playing everyone. I'm sure I'll get there shortly.
Best.
User avatar
Chipfryer
Established Member
Posts: 362
Joined: Tue Nov 24, 2009 12:43 pm

Re: Is this Linux setup good enough?

Post by Chipfryer »

Ok I seem to be getting somewhere now? :shock:
I hear a click from the speakers when testing sound like a faint click.

Error messages seem to have gone now from Control panel when testing too but still no crystal clear sound. On launching Jack I still get the could not connect Jack to server as client. 8)

I've just created a DVD for Ubuntu Studio. I'm going to install it and see what happens? I know the card is ok but I'm not counting out other hardware problems. I did note that on some forums using evn UbuntuStudio a similar problem occurred? Anyway thanks for your help again.
:mrgreen:
User avatar
Chipfryer
Established Member
Posts: 362
Joined: Tue Nov 24, 2009 12:43 pm

Re: Is this Linux setup good enough?

Post by Chipfryer »

I do now have sound through the M-Audophile. Phew.

There is a bit of crackling here and there but its something to work with at last. I did notice that Flash movies/MySpace would not work but I'm getting there.

Thanks for the help on this folks.

Best.

ps. IT was a hardware connection error through hardware. Many apologies. :roll:
User avatar
GarryO
Established Member
Posts: 167
Joined: Mon Apr 06, 2009 7:30 pm
Location: UK
Contact:

Re: Is this Linux setup good enough?

Post by GarryO »

@Chipfryer: cool! Have you discovered envy24control yet? Its the best soundcard mixer app for your chipset and is in the alsa-tools-gui package ( that's what its called on debian - should be same on ubuntu )
wrt to myspace, you-tube etc you need to get the flashplayer for linux from Adobe and install that.
what web browser you got?
keep on keeping on!

@Yeri: there's no difference. I found that that if I added -P to the jack config file then qjackctl would just ignore and overwrite it. so I started using chrt. Though I looked just now and there is a box on qjackctl's setup tab for setting priority. Is that new or am I blind and daft?

(sorry if this is double posted - my last post didn't seem to go through )
User avatar
Chipfryer
Established Member
Posts: 362
Joined: Tue Nov 24, 2009 12:43 pm

Re: Is this Linux setup good enough?

Post by Chipfryer »

Hi Gary yes this is so cool.
I read about it while studying earlier. Ok I'll look at this and see if it pans out? Is that the code to input in Terminal please?

You are a Demon. Thanks so much. :D All is not lost then after all. What I'll do is write a Tutorial in layman's for anyone else that might have the troubles I did and to be honest they were not that bad at all. The trouble with Linux is that Coders create fantastically but there needs to be a bridge to the person who knows nothing and just needs the answer in my view.

Thanks for this again Gary. :lol:
Have a great evening/sleep/whatever.

Best to you and yours.
GarryO wrote:@Chipfryer: cool! Have you discovered envy24control yet? Its the best soundcard mixer app for your chipset and is in the alsa-tools-gui package ( that's what its called on debian - should be same on ubuntu )
wrt to myspace, you-tube etc you need to get the flashplayer for linux from Adobe and install that.
what web browser you got?
keep on keeping on!

@Yeri: there's no difference. I found that that if I added -P to the jack config file then qjackctl would just ignore and overwrite it. so I started using chrt. Though I looked just now and there is a box on qjackctl's setup tab for setting priority. Is that new or am I blind and daft?

(sorry if this is double posted - my last post didn't seem to go through )
Post Reply