Ardour struggles, slowdown with digital soundeffect - ALSA, Gina24 from Echo, Fedora 17

Its the same, …

… the error is somewhere “deeper”, i don’t think we can sort it out with some switches.

I have this message now during and after the struggle a few 100 times:
Jack: JackAlsaDriver::Read warning fBufferSize = 1024 nframes = 2048

What can freeze out the Transport, the sound?

The error-effect is quite massive. …

PortAudio? That is very likely at least one of your problems.

I saw Pulse Audio mentioned in another post/log, which can very well be another problem. Are you running both PulseAudio and Jack at the same time?

I never have good luck with Audacity and Jack, this is likely completely unrelated to a problem with Jack that I am not convinced exists yet from your report, and is much more likely a system configuration issue, just narrowing down what exactly may take time. IRC is much better for this sort of thing than forums.

I will also say I woudln’t base anything on experiences with MOTU devices. The 828 support was reverse engineered, I know very few people that have gotten it working on Linux, thankfully mostly because most people don’t even try. Even on other OSes I have more problems with MOTU than I can count and avoid them like the plague.

USB does tend to benefit from 3 periods per buffer, not sure that FFADO does however.

Out of curiosity do you have your governor set to PERFORMANCE? The symptom you described in your first post sounds like a problem with the CPU being overloaded. This can happen for a variety of reasons but the governor is one of the more common.

    Seablade

@LaKing:

Try giving this link a read, it has some useful tweaks that might help you a bit:

http://wiki.linuxmusicians.com/doku.php?id=system_configuration

Mostly sections:

Disabling resource-intensive daemons, services and processes
CPU frequency scaling (As seablade sugested)

But still do give it a good read, something might ring a bell…

And when running the GINA 24 can you please show us what cat /proc/interrupts gives you

IRC as seablade also suggested will be a better place to get more real time help, just be patient until someone responds there.

Even with the highest buffer sizes, it does the same, … I can not filter down the problem. …

However, it seems to me like a general Jack problem. Audacity works smooth with alsa, and freezes with Jack as sound driver. …


JackEngine::XRun: client = PortAudio was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
06:19:06.644 XRUN callback (13 skipped).
JackEngine::XRun: client = PortAudio was not run: state = 2
JackAudioDriver::ProcessGraphAsyncMaster: Process error

The gina24 (card number 1) has a analog device (hw:1,0) and a digital device (hw:1,1). You should use the analog device which is the default. Furthermore, it is most probably a duplex device (check with “arecord -l” whether card 1 device 0 is listed). So no, you don’t have to select different I/O for your card.

The most common and recommended way to start the jack server is via qjackctl. In your case and if my assumptions are right, just type down in the interface field:

hw:Gina24

I know, there is no such option to select from the drop down menu, but anyway, it is always a good idea calling cards by name to avoid card number reordering confusion.

This way, jack will use the analog device of the Gina24 in duplex mode.

Also, to check that your user efectively gained rtprio and memlock privileges, try this informative command:

ulimit -r -l

Cheers, Pablo

Thank you Pablo, … with your suggestion I was able to star qjackctl … and then ardour2, …

Once the struggling started it started to display, or better said, flood error messages:

JackEngine::XRun: client = ardour was not run: state = 2
JackAudioDriver::ProcessGraphAsyncMaster: Process error
14:11:01.220 XRUN callback (12 skipped).

At least there is an error message now. :slight_smile:

[x@casino ~]# ulimit -r -l
real-time priority (-r) 70
max locked memory (kbytes, -l) 4194304

I was also experimenting with a USB sound card, and a Firewire sound card. … (MOTU 828)
I was able to start jack with FFADO, but could not connect Ardour to it. The card did not show up in ardour, … no interface, no go.

For USB and Firewire devices you will have better results if you run them with a value of 3 periods instead of the default which is 2, but in your case you say they don’t even show up in qjackctl? While having the usb device connected do a lsusb to see if at least it shows up there. I don’t know how to list a firewire device though, someone else can help you with that one. But let’s do ourselves a favor, let’s first stick to the Echo Gina24 and see if you can make it run well before going with other devices, best way would be to start a new post for them so newer users don’t get confused when looking for similar problems.

On the Gina you might want to play with the periods/buffer and the frames/period values to see what you get, you are going to have to go through some trial and error, try higher values and start going down before you get xruns and then see how bad your latency is.

I try’d already all possible options, … no go. …

I will try this sound card on another PC and another distro …

This will be most likely a bug, or a software issue.

One more thing, …

http://laking.d250.hu/laking/debug/

I uploaded a sample wave file, … the click, and a song in struggle.

I also started to upload alsa-info files, …

[x@casino ~]# ulimit -r -l
real-time priority (-r) 70
max locked memory (kbytes, -l) 4194304

In my case, real-time priority is 95 and memlock unlimited. I think 4 GB is more than enough for memlock, but I’m not sure if rtprio 70 is OK. Ah, and just in case, make sure you are checking from a terminal belonging to the user who wants to run jack, not root or anything else.

jackd -r -d alsa -d hw:Gina24

remove “-r” which means non-realtime mode. Always run jack in realtime mode (the default). Maybe, you could try synchronous mode (-S).

jackd -S -d alsa -d hw:Gina24

At the moment I could not figure out how to start a playback from console. Any suggestions how to?

I like mplayer:

mplayer -ao jack file.audio

Another thing, you have pulseaudio installed. I don’t know Fedora but pulseaudio used to be problematic in certain distros in the past. Try killing it before running jackd, but first disable pulseaudio autospawn.

Finally, as Paul and Seablade usually suggest, IRC tends to be much better to get help for this kind of issues. see Support tab.

Re-installed the system. Clean install, nothing but Ardour and mc added to the system.

Booting a fully updated Fedora 17 with the original 3.3.4 kernel, … All OK. Fully functional. No issues.
Booting the same system with the updated kernel 3.5.3 … Jack Broken! Struggle, no playback just digital noise.

In the last installation I also had a kernel in between, that was not working either.

So it turned out to be a Kernel - Jack Issue, …

Eww not so good to hear that, sorry. Glad you got it working of course, but regressions == bad.

   Seablade

Hi

I’m not terribly surprised really…We have a testing repo for 3.2 kernels and newer including full -rt preempted ones and the results have been very mixed. For AV Linux we still use a 3.0 series patched with audio drivers which seems to be fitting the bill. Unfortunately pro audio and JACK are very peripheral concerns to the kernel developers. I believe cutting edge kernels are a very bad idea for purpose-driven applications like a D.A.W.

… I try to start a simple playback from console, with minimal fanciness: jack and aplay

[x@casino ~]$ jackd -r -d alsa -d hw:Gina24
jackdmp 1.9.8
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2011 Grame.
jackdmp 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
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in non-realtime mode
audio_reservation_init
Acquire audio card Audio1
creating alsa driver … hw:Gina24|hw:Gina24|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback

Unknown destination port in attempted (dis)connection src_name [alsa-jack.jackP.5675.0:out_000] dst_name [alsa_pcm:playback_1]

[x@casino ~]$ aplay -D jack /home/x/test32s.wav
jack_client_new: deprecated
Playing WAVE ‘/home/x/test32s.wav’ : Float 32 bit Little Endian, Rate 48000 Hz, Stereo
cannot connect alsa-jack.jackP.5716.0:out_000 to alsa_pcm:playback_1
aplay: pcm_write:1710: write error: Input/output error

At the moment I could not figure out how to start a playback from console. Any suggestions how to?

Here some info’s about another test case. Removed the nvidia driver. … still the same behavior. It might start after a reboot to play back smooth for a while, but then, after a few seconds it struggles forever. … In this test case no X22 crashes tho, … so far.

[x@casino init.d]$ ./rtirq status

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
106 FF 99 - 139 0.0 S irq/8-rtc0
545 FF 90 - 130 0.0 S irq/16-snd_gina
44 FF 50 - 90 0.0 S irq/9-acpi
82 FF 50 - 90 0.0 S irq/40-PCIe PME
83 FF 50 - 90 0.0 S irq/41-PCIe PME
84 FF 50 - 90 0.0 S irq/42-PCIe PME
89 FF 50 - 90 0.3 S irq/20-ata_piix
93 FF 50 - 90 0.1 S irq/20-ata_piix
98 FF 50 - 90 0.0 S irq/23-ehci_hcd
99 FF 50 - 90 0.3 S irq/23-ehci_hcd
101 FF 50 - 90 0.0 S irq/12-i8042
102 FF 50 - 90 0.0 S irq/1-i8042
296 FF 50 - 90 0.0 S irq/43-i915
405 FF 50 - 90 0.0 S irq/44-mei
407 FF 50 - 90 0.0 S irq/17-snd_hda_
639 FF 50 - 90 0.0 S irq/16-nouveau
937 FF 50 - 90 0.0 S irq/45-p6p1
3 TS - 0 19 0.3 S ksoftirqd/0
10 TS - 0 19 0.1 S ksoftirqd/1
14 TS - 0 19 0.3 S ksoftirqd/2
18 TS - 0 19 0.1 S ksoftirqd/3
22 TS - 0 19 0.0 R ksoftirqd/4
26 TS - 0 19 0.0 S ksoftirqd/5
30 TS - 0 19 0.0 S ksoftirqd/6
34 TS - 0 19 0.0 S ksoftirqd/7

[x@casino init.d]$ uname -r
3.5.3-1.fc17.x86_64

[x@casino ~]$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
0: 139 0 0 0 0 0 0 0 IO-APIC-edge timer
1: 3 0 0 0 0 0 0 0 IO-APIC-edge i8042
8: 1 0 0 0 0 0 0 0 IO-APIC-edge rtc0
9: 0 0 0 0 0 0 0 0 IO-APIC-fasteoi acpi
12: 4 0 0 0 0 0 0 0 IO-APIC-edge i8042
16: 2216 0 0 0 0 0 0 0 IO-APIC-fasteoi snd_gina24, nouveau
17: 131 0 0 0 0 0 0 0 IO-APIC-fasteoi snd_hda_intel
20: 17940 0 1092 1049 0 0 0 0 IO-APIC-fasteoi ata_piix, ata_piix
23: 9052 5694 0 0 0 0 0 0 IO-APIC-fasteoi ehci_hcd:usb1, ehci_hcd:usb2
40: 0 0 0 0 0 0 0 0 PCI-MSI-edge PCIe PME
41: 0 0 0 0 0 0 0 0 PCI-MSI-edge PCIe PME
42: 0 0 0 0 0 0 0 0 PCI-MSI-edge PCIe PME
43: 0 0 0 0 0 0 0 0 PCI-MSI-edge i915
44: 12 0 0 0 0 0 0 0 PCI-MSI-edge mei
45: 5003 0 0 0 0 0 0 0 PCI-MSI-edge p6p1
NMI: 15 16 13 12 3 5 3 3 Non-maskable interrupts
LOC: 43609 39856 41681 41113 12696 12755 12806 11843 Local timer interrupts
SPU: 0 0 0 0 0 0 0 0 Spurious interrupts
PMI: 15 16 13 12 3 5 3 3 Performance monitoring interrupts
IWI: 0 0 0 0 0 0 0 0 IRQ work interrupts
RTR: 7 0 0 0 0 0 0 0 APIC ICR read retries
RES: 18945 9145 2082 1256 1825 632 427 1135 Rescheduling interrupts
CAL: 902 916 890 960 837 856 923 990 Function call interrupts
TLB: 409 519 494 481 438 254 305 327 TLB shootdowns
TRM: 0 0 0 0 0 0 0 0 Thermal event interrupts
THR: 0 0 0 0 0 0 0 0 Threshold APIC interrupts
MCE: 0 0 0 0 0 0 0 0 Machine check exceptions
MCP: 2 2 2 2 2 2 2 2 Machine check polls
ERR: 0
MIS: 0

[x@casino ~]$ ps -eLo rtprio,cls,pid,pri,nice,cmd | grep “FF” | sort -r
- TS 2247 19 0 grep --color=auto FF
9 FF 2145 49 - /usr/lib64/ardour2/ardour-2.8.14
99 FF 8 139 - [migration/1]
99 FF 7 139 - [watchdog/0]
99 FF 6 139 - [migration/0]
99 FF 35 139 - [watchdog/7]
99 FF 32 139 - [migration/7]
99 FF 31 139 - [watchdog/6]
99 FF 28 139 - [migration/6]
99 FF 27 139 - [watchdog/5]
99 FF 24 139 - [migration/5]
99 FF 23 139 - [watchdog/4]
99 FF 20 139 - [migration/4]
99 FF 19 139 - [watchdog/3]
99 FF 16 139 - [migration/3]
99 FF 15 139 - [watchdog/2]
99 FF 12 139 - [migration/2]
99 FF 11 139 - [watchdog/1]
99 FF 106 139 - [irq/8-rtc0]
90 FF 545 130 - [irq/16-snd_gina]
50 FF 99 90 - [irq/23-ehci_hcd]
50 FF 98 90 - [irq/23-ehci_hcd]
50 FF 93 90 - [irq/20-ata_piix]
50 FF 937 90 - [irq/45-p6p1]
50 FF 89 90 - [irq/20-ata_piix]
50 FF 84 90 - [irq/42-PCIe PME]
50 FF 83 90 - [irq/41-PCIe PME]
50 FF 82 90 - [irq/40-PCIe PME]
50 FF 639 90 - [irq/16-nouveau]
50 FF 44 90 - [irq/9-acpi]
50 FF 407 90 - [irq/17-snd_hda_]
50 FF 405 90 - [irq/44-mei]
50 FF 296 90 - [irq/43-i915]
50 FF 102 90 - [irq/1-i8042]
50 FF 101 90 - [irq/12-i8042]

Well, … if someone would have told me: Boot some other kernels, … would have had saved some time,… .) … All suggestion where operiating on high level, eg. QJackCtl parameters, while the error was low-level … Now we know, kernel. …

… but thanks for the notice anyway.

I would like to have ONE system that I use for: DAW, Video editing, Programming and development, … all with newest technologies. …

Thank you, everyone, for all help and suggestions. I appreciate it.