Just ONE xrun, and VSTs crash my audio

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Metrophage
Established Member
Posts: 20
Joined: Sat Apr 30, 2016 6:42 pm

Just ONE xrun, and VSTs crash my audio

Post by Metrophage »

Hello! I have been mostly lurking here. Recently I set up a new Neon/KX partition just for audio. No home encryption, 4.16.12-rt5--avi1 kernel. Running realtimeconfigquickscan to get everything feeling pretty tight. I can run MIDI stuff fine and some audio, with just occasional dropouts. But I can't play with a VST instrument for more than a couple minutes without my audio turning to unpleasant noise (worse than my usual music). Testing has mostly been in Carla, Waveform 9, and Bitwig Studio 2.3.5 demo. There is rarely much CPU usage. What really sets it off seems to be opening the plugin's GUI, then it is often a matter of seconds before I hear a pop and my audio turns to an earful of glass, often without even playing any notes at all. I had the same problem a couple years back in Mint 17.3 and gave up. I figured it was because I hadn't tuned my system performance to handle real-time audio, but now I have done a lot to set it up and the problem is as bad as ever.

What plugins? The JUCE-based ones seem to fare the worst: BioTek, Collective, SocaLabs, Waverazor. I just compiled Camomile tonight and it has the same problem. But it happens with others too. When clicking a switch, changing a patch. The U-He demos and freebies tend to last a long time (10-15 minutes?) before it happens.

The system is a Dell XPS-9000, an i7 920 @ 2.67GHz, 6GB RAM, NVidia GTX260 with Nouveau 1:1.0.15-2~16.04.1 drivers, Sonnet Allegro FW400 PCIe card connected to MOTU Traveller. I excluded the built-in "HDA" audio and crap Firewire port in BIOS. Blacklisted the ALSA firewire modules that interfere with Jack. ETA that I have not pushed any of this beyond a stereo pair of channels, 44.1KHz and 1024 sample buffer.

Since it is more like a broken pipe than a crash, I have not found any useful logs. Any ideas?
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Just ONE xrun, and VSTs crash my audio

Post by khz »

Start Carla in the console. Launch a VST instrument.
Post the console output with the error message from the VST instrument crash.
Hmmm, JUCE ...
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Just ONE xrun, and VSTs crash my audio

Post by sysrqer »

I doubt it is the source of the problem but be very wary of making music with Nouveau, it doesn't deal with real time audio very well at all.
Metrophage
Established Member
Posts: 20
Joined: Sat Apr 30, 2016 6:42 pm

Re: Just ONE xrun, and VSTs crash my audio

Post by Metrophage »

falkTX wrote:He already said it is not a crash, just audio misbehaving.
I had a similar case on a soundcard that is not properly supported in the kernel. The audio would sound horrible after an xrun occurs, and take a long time to recover.
Well, in my case, by "noise" I mean that there is no longer any audio signal. It's like JACK and/or FFADO are completely disconnected. It never recovers, and is loud enough to damage headphones, speakers, and ears if left running. Lots of pops and squeals.
falkTX wrote:A workaround I found at the time was to change the JACK buffer size, as it forces to soundcard to reinitialize.
If using JACK1, we can call jack_bufsize on the command-line with the same value that is currently running.
I forgot to mention that I am running JACK2. Even though it sounds like a different type of issue, that's at least something else I can try, so thanks for the suggestion.
Metrophage
Established Member
Posts: 20
Joined: Sat Apr 30, 2016 6:42 pm

Re: Just ONE xrun, and VSTs crash my audio

Post by Metrophage »

sysrqer wrote:I doubt it is the source of the problem but be very wary of making music with Nouveau, it doesn't deal with real time audio very well at all.
The reason I installed Nouveau is that I read in numerous places that the official proprietary Nvidia Linux graphics drivers don't function right with real-time preemption at all. On my older Mint system and my other Neon LTS partition I have used the Nvidia 340 drivers and it was about the same with vanilla and low-latency kernels.

But I do need to consider that graphics issues might have some interplay here, seeing as how the GUIs are a problem. I like to do some 3D graphics work and musical visualization/VJ stuff so I would like to be able to use my card.

I haven't wanted to swap out actual hardware, but I think I should at least for a while to compare. I have an original 828, and some ATI card of around the same vintage as the GTX260 (but with a noisy fan). Also I will see about changing desktop compositing modes, or switching off compositing entirely to see how/if it affects things.
User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Just ONE xrun, and VSTs crash my audio

Post by sysrqer »

Metrophage wrote:
The reason I installed Nouveau is that I read in numerous places that the official proprietary Nvidia Linux graphics drivers don't function right with real-time preemption at all. On my older Mint system and my other Neon LTS partition I have used the Nvidia 340 drivers and it was about the same with vanilla and low-latency kernels.

But I do need to consider that graphics issues might have some interplay here, seeing as how the GUIs are a problem. I like to do some 3D graphics work and musical visualization/VJ stuff so I would like to be able to use my card.

I haven't wanted to swap out actual hardware, but I think I should at least for a while to compare. I have an original 828, and some ATI card of around the same vintage as the GTX260 (but with a noisy fan). Also I will see about changing desktop compositing modes, or switching off compositing entirely to see how/if it affects things.
Nvidia drivers I think they don't work with a fully RT kernel so perhaps that is what you read about, with low-latency they are fine though (you might not need an RT kernel, low-latency is good enough for a lot of people). The Nouveau issue is pretty much random, you can be working away for half an hour and then all of a sudden the whole system freezes and cannot be recovered. It is mentioned on the arch wiki page briefly - https://wiki.archlinux.org/index.php/No ... r_messages. One of the ardour devs pointed out to be that it is known issue with Nouveau and recommends to not use it.

I just reread your OP and noticed you are using the avlinux RT kernel. I think there is a way to get it to work with nvidia drivers but I don't remember the details. I suspect this could be related to your problem actually, it's a bit of a hornets nest when it comes to kernels, audio, nvidia, and nouveau. So a few variables could be at play, could be a bug in the kernel affecting something on your system, and/or it could be nouveau.

Just because it is easy to do I would recommend perhaps first booting in to the regular low latency kernel and testing. If that is better then install the nvidia drivers. Either way, I don't think you want to be running nouveau.

You can use a ppa to get the latest version, nvidia-396 at the moment. http://www.webupd8.org/2016/06/how-to-i ... rs-in.html
Metrophage
Established Member
Posts: 20
Joined: Sat Apr 30, 2016 6:42 pm

Re: Just ONE xrun, and VSTs crash my audio

Post by Metrophage »

sysrqer wrote:Just because it is easy to do I would recommend perhaps first booting in to the regular low latency kernel and testing. If that is better then install the nvidia drivers. Either way, I don't think you want to be running nouveau.
The system wasn't installed with the rt kernel, it initially had a vanilla, then I switched to low-latency while looking for a suitable real-time kernel. So I have run these drivers with three kernels now on this particular install. And I have used vanilla and low-latency for years with official Nvidia drivers and had the exact same problem with regards to VST instruments. So I don't expect that going back to low-latency kernel and Nvidia drivers now is going to suddenly make any difference. I have struggled to make that work for two years! That's actually why I am trying rt and Nouveau now.

I am going to methodically try a few more desktop compositing settings, and if those don't make a significant difference I will try those settings again with the ATI card. I am really quite broke and can't afford to swap out any hardware beyond what I have on hand.
User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Just ONE xrun, and VSTs crash my audio

Post by sysrqer »

I see, nevermind then. I'm not sure what to suggest in that case. You could try to pin it down a little more, if you haven't already - try using just alsa or pulseaudio instead of jack. And with/without the soundcard.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: Just ONE xrun, and VSTs crash my audio

Post by khz »

With jack2 you can also change the buffer size in a console, among other things.

Code: Select all

jack_bufsize 128 &
Have you ever tested with the on-board graphics card of your system / CPU "i7 920"? So without using the NVidia GTX260.
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: Just ONE xrun, and VSTs crash my audio

Post by Jack Winter »

After reading the entire thread, my guess would be the soundcard.

Try running JACK on the HDA for a while for testing, if it works there and not on the motu then there is a strong indication as to where to search for the problem. Maybe try the onboard FW instead of the addon, try the alsa FW drivers. It looks like they are still under development for the motu, but maybe they work better. Even try a different FW cable.
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Metrophage
Established Member
Posts: 20
Joined: Sat Apr 30, 2016 6:42 pm

Re: Just ONE xrun, and VSTs crash my audio

Post by Metrophage »

Thanks for the tips! I had to take a break from troubleshooting this for a few days, but will be resuming it this week.
User avatar
protozone
Established Member
Posts: 181
Joined: Tue May 08, 2018 9:02 pm
Contact:

Consider this, perhaps

Post by protozone »

I had similar problems when I tried to use WINEASIO.
I gave up on WINEASIO entirely because of that problem and a total lack of working solutions.
That's how I ended up using WASAPI settings in 32-bit REAPER for Windows on Wine-staging.
All that was required, was to turn down the buffer settings for PulseAudio to not be so huge (for lower latency), and to do a few other pro audio tweaks and optimizations not unfamiliar to Linux Audio people. Also, it was important to add the "tsched=0" thingy to some PulseAudio settings.

Search for such entries here and on the web and you'll get results. I tried to make my personal successes public domain so others wouldn't have to take as much time to get good results in the future. Also, be sure to turn off as many unneeded services as possible.

And synaptic can get you to indicator-cpufreq for a nice CPU performance controller.

Good Luck
Post Reply