You are not logged in.

#1 2014-09-13 13:07:21

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

[SOLVED] xruns in Jack upon playing audio

Hello!

I have set up Jack using the guide at https://wiki.archlinux.org/index.php/Pro_Audio. I am trying to find the best setting in Jack, thus I am testing on the path local audio -> audio output first. And it seems like that the local audio applications are behind the audio output sometimes, for the reason that I get xrun errors concerning the PulseAdudio source.

My question is, if this is a problem of PulseAudio or is my hardware not able to handle the settings in Jack. If the first, how can I get rid of those xrun errors with PulseAudio?

Below is an example of the xrun errors:

Sat Sep 13 15:01:27 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Source was not finished, state = Triggered
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Source was not finished, state = Triggered
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Running
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Source was not finished, state = Triggered
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:27 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:28 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Source was not finished, state = Triggered
Sat Sep 13 15:01:28 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:28 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Source was not finished, state = Triggered
Sat Sep 13 15:01:28 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Sat Sep 13 15:01:28 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error

Last edited by oowinnetouoo (2014-09-20 22:24:15)

Offline

#2 2014-09-13 14:11:16

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] xruns in Jack upon playing audio

 Why do you use Pulseaudio and Jack in the first place? Why not use only one? Do you want to stream audio over network? There are jack tools for that also, if I recall correctly. Also you provide no information on how your PA is configured or how Jack is run. You may want to reduce buffer and period size for PA or increase those for Jack.

Offline

#3 2014-09-15 18:25:34

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

Re: [SOLVED] xruns in Jack upon playing audio

Hello,

well I have got rid of PulseAudio, but the same problem exists, currently I am starting Jack via

jack_control start
jack_control dps period 128
jack_control eps realtime true

I have tested audio output over mplayer, even assigning highest priority with FIFO scheduling does give some xruns.

Offline

#4 2014-09-15 18:35:51

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] xruns in Jack upon playing audio

 You would have to translate those parameters to those of conventional jackd or is that period really that small? What is the resolution, sampling rate, frames/period and periods/buffer number? How many channels are involved? What are the parameters of your hardware, which you also do not mention? You could use alsacap for that.

Offline

#5 2014-09-15 20:36:19

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

Re: [SOLVED] xruns in Jack upon playing audio

Output of alsacap is:

*** Scanning for playback devices ***
Card 0, ID `SB', name `HDA ATI SB'
  Device 0, ID `ALC887-VD Analog', name `ALC887-VD Analog', 1 subdevices (1 available)
    2 channels, sampling rate 44100..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'
  Device 1, ID `ALC887-VD Digital', name `ALC887-VD Digital', 1 subdevices (1 available)
    2 channels, sampling rate 32000..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'
Card 1, ID `NVidia', name `HDA NVidia'
  Device 3, ID `HDMI 0', name `HDMI 0', 1 subdevices (1 available)
    2..8 channels, sampling rate 32000..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'
  Device 7, ID `HDMI 1', name `HDMI 1', 1 subdevices (1 available)
    2..8 channels, sampling rate 32000..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'
  Device 8, ID `HDMI 2', name `HDMI 2', 1 subdevices (1 available)
    2..8 channels, sampling rate 32000..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'
  Device 9, ID `HDMI 3', name `HDMI 3', 1 subdevices (1 available)
    2..8 channels, sampling rate 32000..192000 Hz
    Sample formats: S16_LE, S32_LE
      Subdevice 0, name `subdevice #0'

jack_control dp results in:

--- get driver parameters (type:isset:default:value)
              device: ALSA device name (str:set:hw:0:hw:0)
             capture: Provide capture ports.  Optionally set device (str:notset:none:none)
            playback: Provide playback ports.  Optionally set device (str:notset:none:none)
                rate: Sample rate (uint:set:48000:48000)
              period: Frames per period (uint:set:1024:128)
            nperiods: Number of periods of playback latency (uint:set:2:3)
               hwmon: Hardware monitoring, if available (bool:notset:False:False)
             hwmeter: Hardware metering, if available (bool:notset:False:False)
              duplex: Provide both capture and playback ports (bool:notset:True:True)
            softmode: Soft-mode, no xrun handling (bool:notset:False:False)
             monitor: Provide monitor ports for the output (bool:notset:False:False)
              dither: Dithering mode (char:notset:n:n)
          inchannels: Number of capture channels (defaults to hardware max) (uint:notset:0:0)
         outchannels: Number of playback channels (defaults to hardware max) (uint:notset:0:0)
              shorts: Try 16-bit samples before 32-bit (bool:set:False:True)
       input-latency: Extra input latency (frames) (uint:notset:0:0)
      output-latency: Extra output latency (frames) (uint:notset:0:0)
         midi-driver: ALSA MIDI driver (str:notset:none:none)

And two channels are involved.

Offline

#6 2014-09-15 20:53:07

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] xruns in Jack upon playing audio

 Do you want to push your hardware to its limits? I run my jack @ 192 kHz, frames/period=4096, buffer/nperiods=2, duplex 2I 8O. This gives a pretty big latency of ~40 ms, but it runs stable. For live music production and such I would go with* lower frames and channels.

Last edited by emeres (2014-09-15 20:54:59)

Offline

#7 2014-09-15 20:58:25

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

Re: [SOLVED] xruns in Jack upon playing audio

Yeah ,I want to, my plan is to connect an electric guitar later in. Thats why I just wanted to test only audio output and see how everything performs and if there is something I am missing. The problem is that I don't get it why xruns only appear in the audio applications (just mplayer for exmaple) I am using.

Offline

#8 2014-09-15 21:06:52

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] xruns in Jack upon playing audio

 Is the rest of hardware fast enough? Well, you could start with the values I mentioned, then go down with frames/period number. I do not know about a tool that would determine that automatically, you would have to go through trial and error.

Offline

#9 2014-09-15 21:42:58

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

Re: [SOLVED] xruns in Jack upon playing audio

Well okay, as for my hardware:

The motherboard is an Asus M5A78L.
Memory: Corsair XMS3
CPU is a AMD FX(tm)-6100

Well, I am currently just trying to figure out where that bottleneck is. So testing with dd, reading and writing from and to a tmpfs, gave me 1.4GB/s write and 2.8GB/s read speed, which seems enough. Perhaps it could be just an issue doing reads and writes all the time for the motherboard?

Offline

#10 2014-09-15 21:45:37

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] xruns in Jack upon playing audio

 I do not understand what the issue is right now. What values have you tested so far? If you still use 128 for period, go up through 256, 512, 1024, 2048 and so on.

Offline

#11 2014-09-20 18:06:57

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

Re: [SOLVED] xruns in Jack upon playing audio

Well I needed that low latency to hear what I play on the guitar on time. Anyways, I was just being stupid and forgot to setup the bootloader entry hmm
But thank you anyways! smile

Offline

#12 2014-09-20 18:12:42

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,952
Website

Re: [SOLVED] xruns in Jack upon playing audio

How is jack related to the bootloader?

Last edited by ugjka (2014-09-20 18:13:33)

Offline

#13 2014-09-20 18:14:34

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] xruns in Jack upon playing audio

oowinnetouoo wrote:

I was just being stupid and forgot to setup the bootloader entry hmm

What bootloader entry? Please describe how you solved the issue, as it could be beneficial to others, and mark the thread as solved.

Offline

#14 2014-09-20 18:14:34

oowinnetouoo
Member
Registered: 2012-11-29
Posts: 18

Re: [SOLVED] xruns in Jack upon playing audio

Had to add an entry so that I could boot into linux-rt, the realtime kernel, so that it was possible to get the low latency audio output.

Offline

#15 2014-09-20 19:11:20

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] xruns in Jack upon playing audio

 Latency is determine by several factors. Great, please mark the thread as solved as already stated.

Offline

Board footer

Powered by FluxBB