Xruns?

How do I get rid of xruns, everytime I try to record multi track drums I get xruns, what can I do to stop this from happening? Thank You All

Tone

Restarted computer and tried to jack and I get this now

12:57:01.216 Patchbay deactivated.
12:57:01.296 Statistics reset.
12:57:01.513 Startup script…
12:57:01.514 artsshell -q terminate
12:57:01.520 ALSA connection graph change.
12:57:02.132 Startup script terminated with exit status=256.
12:57:02.133 JACK is starting…
12:57:02.134 /usr/bin/jackd -p512 -dalsa -r44100 -p256 -n3 -D -Chw:0 -Phw:0 -m
12:57:02.137 JACK was started with PID=6098.
jackd 0.109.2
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
loading driver …
SSE2 detected
apparent rate = 44100
creating alsa driver … hw:0|hw:0|256|3|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
the playback device “hw:0” is already in use. Please stop the application using it and run JACK again
cannot load driver module alsa
no message buffer overruns
12:57:02.169 JACK was stopped successfully.
12:57:02.169 Post-shutdown script…
12:57:02.169 killall jackd
12:57:02.338 ALSA connection change.
jackd: no process killed
12:57:02.584 Post-shutdown script terminated with exit status=256.
12:57:04.484 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

Did you click on the “use real time” check box in Jack?

yes and this is what I get in jack,

13:14:02.068 Patchbay deactivated.
13:14:02.074 Statistics reset.
13:14:02.129 Startup script…
13:14:02.130 artsshell -q terminate
13:14:02.135 ALSA connection graph change.
13:14:02.550 Startup script terminated with exit status=256.
13:14:02.551 JACK is starting…
13:14:02.553 /usr/bin/jackd -p512 -dalsa -r44100 -p256 -n3 -D -Chw:0 -Phw:0 -m
jackd 0.109.2
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
13:14:02.579 JACK was started with PID=6239.
loading driver …
SSE2 detected
apparent rate = 44100
creating alsa driver … hw:0|hw:0|256|3|44100|0|0|nomon|swmeter|-|32bit
control device hw:0
the playback device “hw:0” is already in use. Please stop the application using it and run JACK again
cannot load driver module alsa
no message buffer overruns
13:14:02.640 JACK was stopped successfully.
13:14:02.641 Post-shutdown script…
13:14:02.641 killall jackd
13:14:02.778 ALSA connection change.
jackd: no process killed
13:14:03.058 Post-shutdown script terminated with exit status=256.
13:14:04.824 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
13:14:30.500 Startup script…
13:14:30.500 artsshell -q terminate
13:14:30.920 Startup script terminated with exit status=256.
13:14:30.921 JACK is starting…
13:14:30.921 /usr/bin/jackd -R -p512 -dalsa -r44100 -p256 -n3 -D -Chw:0 -Phw:0 -m
jackd 0.109.2
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
cannot use real-time scheduling (FIFO at priority 10) [for thread -1490872608, from thread -1490872608] (1: Operation not permitted)
cannot create engine
13:14:30.935 JACK was started with PID=6250.
13:14:30.938 JACK was stopped successfully.
13:14:30.939 Post-shutdown script…
13:14:30.940 killall jackd
jackd: no process killed
13:14:31.352 Post-shutdown script terminated with exit status=256.
13:14:33.154 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

The key thing here is

the playback device “hw:0” is already in use.

Something else is using your soundcard. It seems that’s why Jack can’t start; it doesn’t seem specific to using the rt kernel. Could be your web browser if you’ve been on YouTube for eg.

Got it! I restarted my cpu and booted the rt kernel, checked the real time, and started ardour and it works!, being that I just figured this out, what are the benefits of having real time activated? thanks for your help, again I don’t know what I would do without this amazing site.

Tone

err - less x-runs for one :smiley:

@pleasebeus:
As for 48kHz in this case, it was just what I used for testing.

As for recording fidelity the debate rages on. My take is that if you only record one signal and dump it directly to CD, then the best approach is 44.1kHz.

If you record multiple signals that will be summarized in the end and are being fed through a number of plugins prior, the best thing is to record at the highest feasable rate.
I don’t know if its applicable, but if you summarize 1.1+1.1+1.1+1.1+1.1+1.1 and round it to the nearest integer you get 7 whereas 1+1+1+1+1+1 is 6. Which of the two best represent the actual value?

And libsamplerate, which is used for downsampling in Ardour, is among the very best so I guess the fidelity lost there is by far won earlier in the chain.

@lotone:
The generic kernel is fairly lazy and may pospone things like delivering the signal from your soundcard to the program until it feels like it. The rt kernel has been whipped into submission and does what it’s told when it’s told to =)

Search this forum for limits.conf

Im still a little lost

Tone

Look at this post : http://ardour.org/node/2421
thorgals suggestion is a starter.
I.e. run jack realtime and increase frames/period until you don’t get any xruns.

And when you post, try to explain your circumstances; I have no idea wheather you’re getting xruns at 6ms latencies or 46 and if you’re using an RME Hammerfall or a crappy Soundblaster…

I have an M-Audio delta 1010Lt I configured Jack the best I could but I still get Xruns, Frames/period 2048, Port maximum 128, and my latency is at 92.9, thanks again

oh yea hear ya go

lsmod | grep snd
snd_ice1712 80036 0
snd_ice17xx_ak4xxx 12416 1 snd_ice1712
snd_ak4xxx_adda 17792 2 snd_ice1712,snd_ice17xx_ak4xxx
snd_cs8427 17792 1 snd_ice1712
snd_ac97_codec 133080 1 snd_ice1712
snd_pcm_oss 52608 0
snd_mixer_oss 25088 1 snd_pcm_oss
snd_pcm 99208 3 snd_ice1712,snd_ac97_codec,snd_pcm_oss
snd_page_alloc 17680 1 snd_pcm
ac97_bus 10368 1 snd_ac97_codec
snd_i2c 14720 2 snd_ice1712,snd_cs8427
snd_mpu401_uart 16768 1 snd_ice1712
snd_seq_dummy 11524 0
snd_seq_oss 42368 0
snd_seq_midi 15872 0
snd_rawmidi 34176 2 snd_mpu401_uart,snd_seq_midi
snd_seq_midi_event 16768 2 snd_seq_oss,snd_seq_midi
snd_seq 67168 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 34320 2 snd_pcm,snd_seq
snd_seq_device 16404 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 79432 14 snd_ice1712,snd_ak4xxx_adda,snd_cs8427,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_i2c,snd_mpu401_uart,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 16800 1 snd

Wow lotone.

That’s really poor performance from an M-Audio (I usually run at 64 periods 3 buffers, now sometimes at 128…)…
A few questions?

What’s your CPU and RAM spec?
Are you running an rt kernel?
What frequency are you recording at (44100,48000,96000, anything above 48 is probably not necessary unless you are in a professional environment)?
Are you trying to run plugins while recording?
Have you turned off any unnecessary applications?
Are you running Gnome or KDE (If so maybe try to run a more lightwieght wm… I like fluxbox, But it requires configuration to be good to use, XFce seems to be a good compromise)
Do you have automount setup for CD’s, usb drives e.t.c? (you may want to turn this off to minimise polling going on in the system?

cheers

Allan

Processor

* Type Intel Pentium 4 631 / 3.0 GHz
* 64-bit processor Yes
* Installed Qty 1.0
* Max processors supported 1.0
* Processor main features Hyper-Threading Technology

Cache Memory

* Type L2 cache
* Installed Size 2.0 MB
* Cache Per Processor 2 MB

Mainboard

* Chipset type ATI Radeon Xpress 1100
* Data bus speed 800.0 MHz

RAM

* Installed Size 512.0 MB -( Replaced with 2G of ram)
* Technology DDR2 SDRAM
* Memory specification compliance PC2-4200
* RAM form factor DIMM 240-pin
* RAM configuration features 1 x 512 MB

Storage Controller

* Type 1.0 x Serial ATA - Integrated

Storage Controller (2nd)

* Type 1 x IDE - Integrated

Storage

* Floppy drive type None
* Hard Drive 1.0 x 160.0 GB - Standard - Serial ATA-150 - 7200.0 rpm
* Hard Drive (2nd) None

Optical Storage

* Type DVD±RW (±R DL) / DVD-RAM - IDE
* CD / DVD read speed 40x (CD) / 16x (DVD)
* CD / DVD write speed 40x (CD) / 16x (DVD±R) / 4x (DVD-R DL) / 8x (DVD+R DL)
* CD / DVD rewrite speed 32x (CD) / 6x (DVD-RW) / 8x (DVD+RW) / 5x (DVD-RAM)
* Disc Labeling Technology LightScribe Technology

Optical Storage (2nd)

* Type None

Storage Removable

* Type None

Monitor

* Monitor Type None.

Multimedia Functionality

* TV tuner type None

Graphics Controller

* Type Integrated
* Graphics Processor / Vendor ATI Radeon Xpress 1100
* Video Memory Shared video memory (UMA)

Audio Output

* Type Sound card - Integrated
* Speaker(s) None

Input Device

* Type Mouse , Keyboard

Mouse

* Mouse features Scroll

Audio Input

* Type None

Telecom

* Modem Fax / modem
* Max transfer rate 56.0 Kbps

Networking

* Networking Network adapter - Integrated
* Data Link Protocol Ethernet , Fast Ethernet

Printer

* Type None

Expansion / Connectivity

* Expansion Bays Total (Free) 1.0 ( 1.0 ) x Internal - 3.5" x 1/3H , 2.0 ( 0.0 ) x Front accessible - 3.5" x 1/3H , 1.0 ( 1.0 ) x Front accessible - 5.25" x 1/2H
* Expansion Slots Total (Free) 1.0 ( 2.0 ) x Processor - DIMM 240-pin , 1.0 ( 1.0 ) x PCI - LGA775 Socket , 2.0 ( 1.0 ) x PCI Express x16 , 3.0 ( 0.0 ) x Memory
* Interfaces 1.0 x Mouse - S-video output - 15 pin HD D-Sub (HD-15) ( 2 in front ) , 2.0 x Microphone - Line-out - Mini-phone stereo 3.5 mm ( 1 in front ) , 1.0 x Audio - Output - Mini-phone stereo 3.5 mm ( 1 in front ) , 1.0 x Hi-Speed USB - VGA - Mini-phone stereo 3.5 mm ( 1 in front ) , 1.0 x Headphones - Line-out (center/subwoofer) - Mini-phone 3.5 mm , 1.0 x Keyboard - Line-out (side surround) - Mini-phone stereo 3.5 mm , 2.0 x Audio - Generic - 6 pin mini-DIN (PS/2 style) , 1.0 x Audio - Generic - Mini-phone stereo 3.5 mm , 4.0 x Display / video - Input - RJ-45 , 1.0 x Parallel - Ethernet 10Base-T/100Base-TX - 6 pin mini-DIN (PS/2 style) , 1.0 x Audio - Line-out (rear) - Mini-phone stereo 3.5 mm , 1.0 x Network - IEEE 1284 (EPP/ECP) - 25 pin D-Sub (DB-25) , 1.0 x Audio - Line-in - 4 pin USB Type A , 1.0 x Display / video - SPDIF output , 1.0 x Audio

I record at 48000, with no plugins at all

I don’t know if I’m running a RT kernel or not how can you find out?

as far as Gnome or KDE I think im running Gnome not to sure, Thank again for your help.

Tone

To determine whether you have a real-time kernel, open a terminal and type:

uname -r
The kernel version should have a “-rt” on the end. If it says generic, it’s not real-time.

Hmmm, for your latency to be 92,9 at 2048 f/p you have to be recording at 44100Hz, unless you’ve changed to 48000 now.

But, nevermind. With a 3GHz P4 you should be able to run at least 48000Khz, 512 f/p (latency 21,3ms) w/o any problem and w/o realtime. I just tried that on my Compaq nx9110 with a 3.2GHz P4 and the only way to get an xrun was to move the ardour window around vigorously for about 40 seconds. You’re not doing that, are you? :wink:

I wonder if you’re using pulseaudio and if that causes problems. Try google for ‘disable pulseaudio’ and see how it’s done for your distro (which one is it btw).

Peder, any reason to use 48000Hz over 44000Hz? The difference doesn’t seem worth bothering with and if it’s to go to CD anyway then surely it needs downsampling which adds to complications. I can see the point of 96000Hz… I could be entirely wrong and wouldn’t be surprised if I was :wink:

Lotone, if it’s any help, I was getting x-runs all the time until I switched to the rt kernel and connected my 1010LT directly to Alsa rather than through Pulse. I haven’t seen one since, even if I push my plug-ins to the limit and make my system practically grind to a halt.

My kernel is 2.6.27-11-generic

How do I change that and is it for the better?

I set the f/p to 256 my sample rate is 44100, and my period buffer is set at 3, latency is 17.4 and I believe that their shouldn’t be any more xruns because the counter in jack just displays this -:-:- but if I open envy an xrun appears and the counter starts up. I’m really glad that the xruns have gone down I just want to know the cause of them so I don’t have to deal with this problem again, and again thank you all for your help.

On Debian systems like Ubuntu, it’s

sudo apt-get install linux-rt