Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hundreds of xruns in under a minute...
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sat Apr 21, 2007 1:35 am    Post subject: hundreds of xruns in under a minute... Reply with quote

Well, my laptop has been giving me problems with sound as some of you may already know: when you plug in headphones, the stereo speakers on the laptop don't shut off. I thought that this would be the end of my sound problems and everything else would be a minor annoyance.

Unfortunately, this is not the case... I started jackd to see if I could get to work on some music production. I even inquired over at the ocremix.org forums to see if anyone had any tips for a poor Linux-running remixer who wanted to get into the mix. It started spitting out hundreds of xruns (hundreds, as in a plural) in minutes. I was astounded. I booted into my realtime kernel and it didn't help things. Jackd keeps giving hundreds of xruns... so I turned down the Sample Rate and jacked up the Frames/Period. It still happens regularly, and unfortunately I can hit about 30 or so xruns in a minute at 387msecs of latency. Heck, it gives xruns before the log can even start. It's saddening... looks like my production is going to be stuck to my crappy box! How... discouraging. Some info:

alsa driver built into kernel 2.6.21-rc5

jack-audio-connection-kit 0.103.0 (alsa -altivec caps -coreaudio -debug -doc -freebob -jack-tmpfs jackmidi -mmx -netjack -oss -portaudio -sndfile -sse) (mmx and sse are unselectable on my system)

sound card
Code:
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
(probably the problem, this sound card gives me nothing but problems)

CPU Info:
Code:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 CPU         T7400  @ 2.16GHz
stepping        : 6
cpu MHz         : 2158.000
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips        : 4325.51
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 CPU         T7400  @ 2.16GHz
stepping        : 6
cpu MHz         : 2158.000
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips        : 6051.20
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:


Memory: 2 Gigs

This is unthinkable... how could my system give xruns?

I think it's the sound card... but what kind of sound card should I get? It can't be a pci card because this is a laptop. I don't think it has pcmcia either, it has that new card slot but I can't remember what it's called. I could settle for a USB sound card if it would fix the xruns problem. So does anyone have any recommendations on a good external sound card?
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
Truin
n00b
n00b


Joined: 05 Jul 2006
Posts: 54

PostPosted: Sat Apr 21, 2007 4:15 am    Post subject: jackd and xruns Reply with quote

Whoa - this is a major pandora's box. :) I've done quite a bit of recording in linux, using jackd and rosegarden, and certainly xruns are a pain in the butt.

While I could go over a host of things that could be contributing to the xruns, the easiest 'will it work at all?' fix I can think of is to grab the Studio2Go! software demo from http://www.ferventsoftware.com. If the demo works for ya, and you can get the xruns down, then you at least know it's possible and the problem is in your configuration some where. (Who knows - you might like S2G - I love it!)

Side note - I don't know what all you need for audio in/out, but I use the M-Audio USB FastTrack Pro. You can find it, and other audio products, at their web site http://www.m-audio.com.

G'Luck!
-=Truin=-
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sat Apr 21, 2007 3:10 pm    Post subject: Re: jackd and xruns Reply with quote

Truin wrote:

Side note - I don't know what all you need for audio in/out, but I use the M-Audio USB FastTrack Pro. You can find it, and other audio products, at their web site http://www.m-audio.com.

G'Luck!
-=Truin=-


Thanks a lot! I'll try that studio2go thing... but do you know if that FastTrack has support for surround sound? I got a sweet pair of surround sound headphones for my birthday...

The only thing I'm really doing is using my MAudio USB 1x1 uno for MIDI keyboard-type things. On my crappy computer with an intel8x0 driver, I rarely saw an xrun after I turned down some of the settings. I really think it's my card...
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Sat Apr 21, 2007 3:30 pm    Post subject: Reply with quote

- compile jack with USE="jack-tmpfs mmx sse"
- run it in realtime (using PAM RLimits for user rights)
- don't set the latency too low for your sound chip
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sat Apr 21, 2007 3:35 pm    Post subject: Reply with quote

gimpel wrote:
- compile jack with USE="jack-tmpfs mmx sse"

I missed the jack-tmpfs flag, oops. I can't do mmx or sse flags, they are (-mmx) and (-sse). I think it's because I run 64-bit...

gimpel wrote:

- run it in realtime (using PAM RLimits for user rights)

Done in /etc/security/limits.conf (or something like that, can't remember right)
gimpel wrote:

- don't set the latency too low for your sound chip

Believe me, I didn't. In fact, the latency is as high as I can get it and it still spits xruns by the second.

I'll try using the jack-tmpfs flag (I used it on my crappy computer that works right) and see if it works. If not, I'll run the studio2go livecd and see if that works. If not, I'll be picking out a USB sound card (which I was going to do anyway, because of speaker issues). Speaking of which, does anybody know of a USB sound card that isn't very expensive that also gives at least moderately good performance? Something about the level of my intel8x0 or something, not too expensive. I can always get a newer one later but now I just want something that will work moderately well.
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Sat Apr 21, 2007 4:53 pm    Post subject: Reply with quote

sonicbhoc wrote:
gimpel wrote:
- compile jack with USE="jack-tmpfs mmx sse"

I missed the jack-tmpfs flag, oops. I can't do mmx or sse flags, they are (-mmx) and (-sse). I think it's because I run 64-bit...

Hmm, OK. I just looked at your cpuinfo output and the processor supports it. No idea how this is on 64bit though.
I overread the (*) and your comment about it, sorry.
Quote:
gimpel wrote:

- run it in realtime (using PAM RLimits for user rights)

Done in /etc/security/limits.conf (or something like that, can't remember right)
gimpel wrote:

- don't set the latency too low for your sound chip

Believe me, I didn't. In fact, the latency is as high as I can get it and it still spits xruns by the second.

I'll try using the jack-tmpfs flag (I used it on my crappy computer that works right) and see if it works. If not, I'll run the studio2go livecd and see if that works. If not, I'll be picking out a USB sound card (which I was going to do anyway, because of speaker issues). Speaking of which, does anybody know of a USB sound card that isn't very expensive that also gives at least moderately good performance? Something about the level of my intel8x0 or something, not too expensive. I can always get a newer one later but now I just want something that will work moderately well.

For around 100€/$ you should get a good device, e.g. from M-Audio
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sat Apr 21, 2007 6:20 pm    Post subject: Reply with quote

Oh... $100, you say? I'll try to rake that much money together, my parents don't want me spending any money on stuff. They want me to put all of the 200 dollars I got from my birthday into the bank.
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Sat Apr 21, 2007 10:53 pm    Post subject: Reply with quote

A fellow on IRC has the same problem with jack 0.103 on a 64bit system, using a SB Live 5.1 platinum which is known to work quite well at 128 frames/period.

So, I think this might be a heavy bug in jack 0.103 regarding 64bit.

With your intel onboard chip you should also be able to run jack with 256 frames/period.
So, maybe even buying a better sound device won't help.
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sat Apr 21, 2007 11:49 pm    Post subject: Reply with quote

!!!!!!!!!!!!!!!!!!!
Oh no! I really don't want to recompile everything back into 32-bits... what should I do?
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Sun Apr 22, 2007 12:02 am    Post subject: Reply with quote

sonicbhoc wrote:
!!!!!!!!!!!!!!!!!!!
Oh no! I really don't want to recompile everything back into 32-bits... what should I do?

I don't know, really.

Things that come to mind are:

- ask on jack/linux-audio-users mailing list if others also have this problem (the guy I talked about is using openSUSE, so this is not a gentoo problem)
- try to downgrade jack, or toggle the useflags, maybe it's jackmidi (which is quite new), but i don't think so
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sun Apr 22, 2007 12:43 am    Post subject: Reply with quote

gimpel wrote:

- try to downgrade jack, or toggle the useflags, maybe it's jackmidi (which is quite new), but i don't think so


downgrade... that sounds reasonable. I had to downgrade mixxx because it depends on portaudio-19 <_<

Sometimes I think going x86_64 wasn't worth it but every time I think that, I fix whatever was causing the problem...
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
Akkara
Bodhisattva
Bodhisattva


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Sun Apr 22, 2007 2:05 am    Post subject: Reply with quote

amd64 dualcore, running x86_64 here works good with buffer sizes down to 64 x2, no xruns unless I push the machine hard.

It definitely saw its ups and downs however. Seems some versions of jack and some versions of the kernel simply don't like each other.

Currently using:
m-audio audiophile 2496 (ICE1712 chipset).
jack-audio-connection-kit-0.102.20
2.6.19-gentoo-r5 compiled with CONFIG_PREEMPT=y, CONFIG_PREEMPT_BKL=y, CONFIG_HZ=1000, CONFIG_IOSCHED_CFQ=y
realtime_lsm module (been planning to try pam but havn't had a chance yet)
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sun Apr 22, 2007 2:50 am    Post subject: Reply with quote

Well, my setup is as follows:

Integrated Intel HDA Sound (model ASUS)
Realtime Kernel - rt-kernel-2.6.21-rc5, full preemption
Jack Audio Connection Kit 0.103.0 <<--- could be the problem?
using /etc/security/limits.conf from PAM


Well, I'll see about downgrading jack... all of my stuff is from the pro-audio overlay, which is where I got that new version of JACK. PAM's /etc/security/limits.conf actually works quite well and I didn't have to change anything - it was automatically configured to give users of the audio group special privileges and stuff.

I just burned studio2go onto a CD. It looked pretty interesting from those screen shots on the website, but after spending my time with Gentoo I'm not about to install that over this, especially because I have no money to buy it. :wink:
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
FishB8
l33t
l33t


Joined: 17 Mar 2003
Posts: 820

PostPosted: Sun Apr 22, 2007 2:56 am    Post subject: Reply with quote

If you have a string of non-stop xruns as soon as you start jack, the problem is probably your setup and not a compiling issue.

First, does your device have digtal IOs? If you are running jack on a device or sub-device with digital IOs and they are not connected to anything, then they are probably going crazy trying to detect a sync signal.

Try turning off the realtime option and see if you still get xruns.

Also:
sse and mmx are available on your CPU, see the readout from your CPU info under "flags". 64 bit had nothing to do with that.
_________________
"...as we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously." -Benjamin Franklin
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sun Apr 22, 2007 3:35 am    Post subject: Reply with quote

FishB8 wrote:
If you have a string of non-stop xruns as soon as you start jack, the problem is probably your setup and not a compiling issue.

First, does your device have digtal IOs? If you are running jack on a device or sub-device with digital IOs and they are not connected to anything, then they are probably going crazy trying to detect a sync signal.


Uh... no. Not that I see anyway.

FishB8 wrote:

Try turning off the realtime option and see if you still get xruns.


Well, realtime doesn't work on my other computer... maybe realtime working on this computer is causing it? Could be, now that I think about it...

FishB8 wrote:

Also:
sse and mmx are available on your CPU, see the readout from your CPU info under "flags". 64 bit had nothing to do with that.


Then why can't I select those flags? I mean, I know that my chip supports it, but I was thinking that the ebuild disabled them because I was on 64-bit or something...
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
TenPin
Guru
Guru


Joined: 26 Aug 2002
Posts: 500
Location: Kansas City

PostPosted: Sun Apr 22, 2007 4:13 am    Post subject: Reply with quote

I basically have the same computer as you sonicbhoc and I have exactly the same problem. I'm used to setting up jack to work and have deduced that the problem is with the hda-intel soundcard driver.

I have the SigmaTel STAC9200 chipset.
_________________
For since in the wisdom of God the world by its wisdom did not know God, God was pleased to save those who believe by the foolishness of preaching.
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Sun Apr 22, 2007 12:31 pm    Post subject: Reply with quote

TenPin wrote:
I basically have the same computer as you sonicbhoc and I have exactly the same problem. I'm used to setting up jack to work and have deduced that the problem is with the hda-intel soundcard driver.

I have the SigmaTel STAC9200 chipset.


Thank you for confirming this... Yet another reason for me to get a new card ASAP.

Do you think that the driver will eventually work better with JACK or is this card a lost cause?
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sat May 19, 2007 10:43 pm    Post subject: Reply with quote

TenPin wrote:
I basically have the same computer as you sonicbhoc and I have exactly the same problem. I'm used to setting up jack to work and have deduced that the problem is with the hda-intel soundcard driver.

I have the SigmaTel STAC9200 chipset.

same problem same card...
i don't understand very well what's the result of the xruns...
are the xruns responsible of the crappy sound of my card in ardour

i also have problems with sound in games...

what is exactly the problem...is it the card or the driver?
should we bugreport?
Back to top
View user's profile Send private message
Ingmarv
Retired Dev
Retired Dev


Joined: 27 Feb 2007
Posts: 188
Location: Belgium

PostPosted: Sun May 20, 2007 9:11 am    Post subject: Reply with quote

In Jack, if you're using the intel-hda driver, you have to set the number of periods to n=3, not 2. That'll solve the shitload-of-xruns-problem for you.

It's a known problem with the driver. I haven't been following the development all that close, so there might already be a fix for this. It's been roughly 6 months since I stumbled on this, and I can tell you that it took quite a while to figure out the culprit. :P
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Sun May 20, 2007 9:17 am    Post subject: Reply with quote

Ingmarv wrote:
In Jack, if you're using the intel-hda driver, you have to set the number of periods to n=3, not 2. That'll solve the shitload-of-xruns-problem for you.

It's a known problem with the driver. I haven't been following the development all that close, so there might already be a fix for this. It's been roughly 6 months since I stumbled on this, and I can tell you that it took quite a while to figure out the culprit. :P

thanks a lot
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Mon May 21, 2007 2:51 am    Post subject: Reply with quote

still getting a billion xruns if I put -n3 before -dalsa. If I put -dalsa first, and then put -n3 I get this:
Code:

jackd 0.103.0
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 ..
apparent rate = 41000
creating alsa driver ... hw:0|hw:0|1024|3|41000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 41000Hz, period = 1024 frames, buffer = 3 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: got smaller periods 2 than 3 for playback
ALSA: cannot configure playback channel
cannot load driver module alsa
no message buffer overruns

_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Mon May 21, 2007 6:58 am    Post subject: Reply with quote

You have to put -n3 after -dalsa, as it is an option for the alsa driver. And 41000Hz is not really a standard value. Use 44100 or 48000
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Mon May 21, 2007 11:41 am    Post subject: Reply with quote

gimpel wrote:
You have to put -n3 after -dalsa, as it is an option for the alsa driver. And 41000Hz is not really a standard value. Use 44100 or 48000

Yeah, the Hz thing was a typo o.o

I keep getting this:
Code:

jackd 0.103.0
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 ..
creating alsa driver ... hw:0|hw:0|1024|3|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames, buffer = 3 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: got smaller periods 2 than 3 for playback
ALSA: cannot configure playback channel
cannot load driver module alsa
no message buffer overruns


and jack dies.
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Mon May 21, 2007 12:04 pm    Post subject: Reply with quote

strange, what's your command line now?
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Mon May 21, 2007 2:00 pm    Post subject: Reply with quote

i used qjackctrl to set the parametrer and it worked
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum