Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
jack xrun reduction tips
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 181

PostPosted: Mon Feb 21, 2011 8:35 pm    Post subject: jack xrun reduction tips Reply with quote

I've been getting occasional xruns upon seemingly mundane tasks (e.g. resizing my firefox window).
It's pretty annoying!

Here are my settings (from reading off the qjackctl setup panel):
Driver: firewire
Realtime: yes
No Memory Lock: yes
Unlock Memory: no
Priority: default
Frames/period:1024
sample rate:44100
periods/buffer:3
Port max: 256
Timeout: 500msec
Start delay: 2sec
Interface: default
Audio: duplex
Input channels, output channels, input/output latency: all default
Latency: 69.7 msec

Thanks for any suggestions/insight
Back to top
View user's profile Send private message
key
n00b
n00b


Joined: 11 Nov 2005
Posts: 5

PostPosted: Wed Mar 02, 2011 8:51 am    Post subject: Reply with quote

What's the output in the qjackctl messages window?
Also, read this wiki. In particular, check out the kernel configuration and RLIMITS sections.

Hope this helps
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Wed Mar 02, 2011 9:26 am    Post subject: Reply with quote

Well well... I believe you know this well... there is no secret for reducing the number of xruns :

0/ Configure your kernel correctly for realtime
1/ Increase nb frames / period
2/ Increase nb periods / buffer
3/ Decrease sampling rate
4/ Reduce the number of Jack clients
5/ Close processes unrelated with sound

A/ From what I see with your datas, you already get a rather huge latency 8O => You cannot reasonably act on 1/ and 2/
B/ You cannot act on 3/ either, as your sampling rate is the minimum acceptable

=>

C/ Tell us more about your kernel version & configuration (maybe you could pastebin it or, if you know well the important options just post only the relevant parts here) BTW I hope you did not opt for activating the famous self-claimed magical 200 lines or so patch... :twisted: )

D/ Which Jack clients are you running concurrently ?

E/ If you are in a real need for an xrun free sound output, why the hell are you doing "mundane tasks" concurrently ? (Particularily playing with windows with things such as compositing activated...)

F/ By the way... Do tell us that you are not cascading several sound servers (phonon, pulseaudio or other thingies of the thing... :twisted: )

BTW : Which Jack are you running ? Legacy or Jack2 ?
Back to top
View user's profile Send private message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 181

PostPosted: Sun Mar 27, 2011 5:32 pm    Post subject: Reply with quote

aCOSwt wrote:

C/ Tell us more about your kernel version & configuration (maybe you could pastebin it or, if you know well the important options just post only the relevant parts here) BTW I hope you did not opt for activating the famous self-claimed magical 200 lines or so patch... :twisted: )

I'm using 2.6.36-r5 on amd64 arch. Here is my kernel config: http://web.mit.edu/~cjoseph/Public/config

D/ Which Jack clients are you running concurrently ?
Usually qsynth and the Audacious (xmms) jack plugin. Occasionally qsynth and ardour.

Quote:

E/ If you are in a real need for an xrun free sound output, why the hell are you doing "mundane tasks" concurrently ? (Particularily playing with windows with things such as compositing activated...)

I just bought a new machine, and it seems to be incredibly electrically noisy. As in, media is unberable to listen to. As a substitute, I pipe my media through the firewire soundboard.
This "everyday" usage is unusual, but I do have a fairly powerful machine, and I have a pretty lightweight desktop enviro (xfce)

Quote:

F/ By the way... Do tell us that you are not cascading several sound servers (phonon, pulseaudio or other thingies of the thing... :twisted: )

BTW : Which Jack are you running ? Legacy or Jack2 ?


F: No

And I am using jack legacy 0.118
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Wed Mar 30, 2011 6:54 am    Post subject: Reply with quote

Drasica wrote:
I just bought a new machine, and it seems to be incredibly electrically noisy.

Would this simply be because of a bad ground ?
Do indeed ensure this first. Working with DAC / ADC without a good link to the ground has always been a bad idea.
Back to top
View user's profile Send private message
Drasica
Apprentice
Apprentice


Joined: 16 Apr 2006
Posts: 181

PostPosted: Wed Mar 30, 2011 7:03 am    Post subject: Reply with quote

It is grounded well--if it were not, the hum would begin as soon as the PC is turned on, no?

It is linked to a driver, I think, because if I insert a livecd the hum does not begin until the end of the boot process--when coldplug loads all the drivers.
I'm working on figuring out exactly which driver(s) cause this, but a reduction on xruns in the meantime would be nice, because I do occasionally do hobby audio work.

As an update, I upgraded the CPU/RAM to a Quadcore Phenom and 8G. It no longer xruns when I'm resizing windows or something, but I still get a lot...even when the machine is idle and I'm just sending music over it. Because the resources are plentiful, it seems like I may need to tweak some configs to reduce xruns.
Back to top
View user's profile Send private message
aCOSwt
Bodhisattva
Bodhisattva


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Wed Mar 30, 2011 9:33 am    Post subject: Reply with quote

Drasica wrote:
it seems like I may need to tweak some configs to reduce xruns.

Well... I believe that it is something more important than tweaking.
As a matter of fact, my audio workstation is about half powerful as yours and I can run concurrently three to four times more jack's clients with a third of your theoretical latency without experimenting Xruns.
And this without any particular tweak.

Being said that I am running gentoo-sources 2.6.34 + Intel and do not know exactly what should be done under 2.6.36 / AMD, These are the observations I made with regards to your kernel conf.

1/ CONFIG_SLUB_DEBUG=y : I cannot tell the exact impact but I believe that debugging and performances in this area of concern are in exclusive or.
2/ CONFIG_DEFAULT_CFQ=y / CONFIG_DEFAULT_IOSCHED="cfq" : I prefer the noop one. Being said that max priority is given to audio tasks, I believe that their I/O requests have to be made straight away. In an audio workstation we are at the opposite of looking to be fair !
3/ CONFIG_NO_HZ is not set : I would definitely set this one

Could you also tell
- if your Xruns are coming by flows or regularily one per one ?
- if you experiment the same with your on board audio system ?

Have you tested with bfs ?
Back to top
View user's profile Send private message
key
n00b
n00b


Joined: 11 Nov 2005
Posts: 5

PostPosted: Fri Apr 01, 2011 8:02 am    Post subject: Reply with quote

aCOSwt wrote:
Drasica wrote:
it seems like I may need to tweak some configs to reduce xruns.

Well... I believe that it is something more important than tweaking.
As a matter of fact, my audio workstation is about half powerful as yours and I can run concurrently three to four times more jack's clients with a third of your theoretical latency without experimenting Xruns.
And this without any particular tweak.


+1.. My not-particularly-powerful laptop (intel i3) is able to cope with jack running in full duplex, almost without xruns. I work under kde4, but i use the rt-sources kernel from the pro-audio overlay.

About the noise: Can you exclude the possibility of a faulty sound interface? Maybe the noise is always present, but the output of the interface is zeroed until the driver is loaded? (wild guessing)

hope this helps
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
Page 1 of 1

 
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