Audio engine takes 20+ minutes to start (Linux) [solved]

Official support for: bitwig.com
RELATED
PRODUCTS

Post

I need some help figuring out how to get bitwig to work again. I've had this issue since sometime the last few months (since mid of BWS3 beta), and I can't for the life of me figure out what's wrong or how to fix it. I'd like to fix this without reinstalling Linux.

I'm running Arch Linux, kernel 5.1.16. Since some or another update of my system (pacman -Syu), the BWS audio engine takes literally forever (anywhere from 1 to 20 minutes) to start. It does start eventually, I've only had the patience to get it running a few times. I've reinstalled all audio drivers, but I'm at a loss. Running BWS from terminal gives no interesting output. I don't really know where to look for info, or how to troubleshoot, so any starters as to where to look would be appreciated.

Basically: I start BWS. Nothing gives an indication of an error, but the loading symbol over the transport just keeps spinning. I can interact with the program, add tracks, notes, devices, whatever, while it's loading, but I can't play audio. It does so for a while, and about 20 or so minutes later, it'll enable me to start playing audio.

Any tips?
Last edited by odz on Sun Aug 18, 2019 9:02 am, edited 1 time in total.

Post

Have you tried the alternative audio system drive models?

Post

twisted-space wrote: Sat Aug 10, 2019 3:46 pm Have you tried the alternative audio system drive models?
Not sure what you mean with this. Could you expand a bit?

Post

Go to File, settings, Audio, Audio System Driver model.
Change whatever it's set on to one of the alternative options, eg. if it's set to JACK, try changing it to Pulse Audio or ALSA.

Post

I still run 2.4.3 and from some Linux reports I'm not sure at all to renew the upgrade subscription. The thing I fear most is the system becoming totally incapable of doing any audio production or, be severly limited. Apart from this issue here there are also problems with the loading and the use of some native Linux u-he plugins that are reported. And that's without mentioning the use of wine staging and linvst, both of which I also rely upon.

I have written to Bitwig about that last issue ans they replied that they have tested everything and everything is running fine, while at the same time suggesting that I try the demo by installing 3.x in parallel. Probably as another user since it does not seem feasible in the same user account. This would probably be the bottom line.

For instance, the solution proposed here, to switch from jackd to ALSA would be a total no go for me. It really has to run as it runs now with 2.4.3 and as it has been running since 1.x.

Post

twisted-space wrote: Sat Aug 10, 2019 7:42 pm Go to File, settings, Audio, Audio System Driver model.
Change whatever it's set on to one of the alternative options, eg. if it's set to JACK, try changing it to Pulse Audio or ALSA.
Aha, yeah I've tried each of them and the selection has no effect on this issue. I've usually used JACK with BWS, for routing and whatnot. ALSA doesn't show my audio card.

Post

mevla wrote: Sat Aug 10, 2019 10:37 pm I still run 2.4.3
Once this started happening, it had nothing to do with BWS3. It started happening with my BWS2 install as well, which leads me to believe it's an issue with my system and not with BWS. It's hard to troubleshoot though, since BWS is the only thing that's giving me any trouble.

Post

odz wrote: Sun Aug 11, 2019 6:28 am Once this started happening, it had nothing to do with BWS3. It started happening with my BWS2 install as well, which leads me to believe it's an issue with my system and not with BWS. It's hard to troubleshoot though, since BWS is the only thing that's giving me any trouble.
OK, thanks for mentioning this.

Post

odz, first thing to look at is to understand how jack is doing. I suggest you do `ps ax | grep jack` and see if you have too many processes, also check the jack logs. `qjackctl` will be of great help trying to determine what is going on. jack logs should tell you what is going on.

Another possible source of problems would the VST path, check that you don't have setup a patch that will force bitwig to scan your whole filesystem.

Post

Check all associated logs. Linux and Bitwig.
Try starting up with out any VSTs in the VST folders.
Try starting without anything virtual (Wine or others.)
You can add them back once you prove that they aren't causing the issue.
Triple check all your audio settings, Bitwig, Alsa, Jack, Pulse, ... It only takes one setting to break everything.
Any audio scripts, libraries, modules, ... that need to run for your setup that became incompatible with a system upgrade?

Post

You can also start jackd from the command line and have text output. I have shell scripts that takes care of restarting jackd and pulseaudio, like this one. The sleep magic numbers are there just to provide some breathing space for the processes. The audio interface is a M-Audio 1010LT. This 256/4 config here allows for monitoring guitar playing through headphones.

When jackd crashes or is having problems you'll see it immediately in the console it was launched.

Code: Select all

killall -9 jackd
sleep 3
/usr/bin/jackd --sync -P80 -ndefault -dalsa -dhw:M1010LT -r44100 -p256 -n4 &
sleep 4
pulseaudio --kill
sleep 2
pulseaudio --start

Post

Thank you for your suggestions, and sorry for the late response. So much going on right now.

I've tried most of everything. I'm down to a fresh, barebones install of bitwig with no settings. I've deleted the ~/Bitwig Studio and ~/.BitwigStudio directories and installed from scratch, but no change. I have no presets, no VSTs, and no paths for it to scan. It does in fact manage to install packages, e.g. the essentials, just fine while the audio engine start loop is ticking.

I'm not sure that it's Jack itself that's causing issues. I'm running it just fine, and with the pulseaudio-jack module I'm playing sound from Jack just fine.

I've also tried replacing the bundled JRE that comes with bitwig, but this doesn't change anything either.

Here is the output I get when starting bitwig from the terminal.

Code: Select all

➜ bitwig-studio
Setting up environment variables for Bitwig Studio
Environment variables setup for Bitwig Studio
About to start the following process:  /opt/bitwig-studio/bin/show-splash-gtk /opt/bitwig-studio/resources/splash-bitwig-studio.png
About to start the following process:  /opt/bitwig-studio/bin/BitwigStudio -Djava.class.path=/opt/bitwig-studio/bin/bitwig.jar:/opt/bitwig-studio/bin/libs.jar:/opt/bitwig-studio/bin/lwjgl.jar -Xms200m -Xmx2048m -XX:+UseConcMarkSweepGC -Djava.io.tmpdir=/tmp/bitwig-oscar -DeulaPath=/opt/bitwig-studio/EULA.txt -DengineExecutable=/opt/bitwig-studio/bin/BitwigStudioEngine -DfactoryLibrary=/opt/bitwig-studio/Library -DcontrolScripts=/opt/bitwig-studio/resources/controllers -DresourceLocation=/opt/bitwig-studio/resources -DexecutableDir=/opt/bitwig-studio/bin32 -DexecutableDir64=/opt/bitwig-studio/bin -Dshow-file-dialog-command=/opt/bitwig-studio/bin/show-file-dialog-gtk3 -DsplashPid=26165 -Dnitro.include=/opt/bitwig-studio/resources/nitro/std -Djava.awt.headless=true -Dawt.toolkit=sun.awt.HToolkit -XX:ErrorFile=./bitwig-studio-jvm-crash.log -XX:-UseLoopPredicate com.bitwig.flt.app.BitwigStudioMain
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Using log directory /home/oscar/.BitwigStudio/log
[2019-08-18 10:47:51 float-main-app info] Starting application version 3.0.1 revision d1ef02affa4e7799dfa2f8ca5357072b1be89175
[2019-08-18 10:47:51 float-main-app info] Using Java version 10.0.2 from Oracle Corporation installed at /usr/lib/jvm/java-10-openjdk
[2019-08-18 10:47:51 float-main-app info] Starting with arguments
[2019-08-18 10:47:55 float-document-master info] Starting engine for New 1
[2019-08-18 10:47:55 float-gui-widgets info] Connecting audio engine to project New 1
[2019-08-18 10:47:55 float-engine-communication info] Engine process successfully started
[2019-08-18 10:47:56 base-util info] Updating index /opt/bitwig-studio/Library/devices for phase devices: time=20.43114
[2019-08-18 10:47:56 base-util info] Updating index /opt/bitwig-studio/Library/modulators for phase devices: time=1.654871
[2019-08-18 10:47:56 base-util info] Updating index /opt/bitwig-studio/Library/modules for phase devices: time=20.78811
[2019-08-18 10:47:56 base-util info] Updating index /home/oscar/Bitwig Studio/Library for phase projects: time=9.775916
[2019-08-18 10:47:56 base-util info] Updating index /home/oscar/Bitwig Studio/Projects for phase projects: time=0.269045
[2019-08-18 10:47:56 base-util info] Updating index /home/oscar/Bitwig Studio/Library for phase audio: time=0.288658
[2019-08-18 10:47:56 base-util info] Updating index /home/oscar/Bitwig Studio/Library for phase content: time=0.356474
[2019-08-18 10:47:56 base-util info] Updating index /home/oscar/Bitwig Studio/Library for phase plugin_presets: time=0.266116
[2019-08-18 10:47:56 base-control-surface warning] Could not register Jython interpretter: org.python.jsr223.PyScriptEngineFactory
[2019-08-18 10:47:56 base-control-surface warning] Could not register JRuby interpretter: org.jruby.embed.jsr223.JRubyEngineFactory
[2019-08-18 10:47:56 notifications warning] No Packages Installed: We recommend to install at least the Essentials Collection
[2019-08-18 10:48:05 float-gui-widgets info] Closing audio IO device ...
[2019-08-18 10:48:06 notifications info] Audio Settings changed: The changes will be applied when the Dashboard is closed
[2019-08-18 10:48:07 float-document-master info] Starting engine for New 1
[2019-08-18 10:52:16 float-document-master info] Starting engine for New 1

Post

God f********** damnit.

They say a desperate man will try anything. I disabled my VPN, and now it works flawlessly. It's 100% reproducible too. I guess it's their authentication that's getting stuck in an infinite loop, or it's by design to prevent privacy. I dunno, but it's solved anyway.

Post

Thanks for the update. I've noticed that VPN software can eat CPU cycles, but nothing that extreme.

Post

Starting bitwig with the VPN active makes it (BWS) consistently chug 30% of my i7 7700K without starting the audio engine. I'm putting my half educated guess on the authentication method in Bitwig though. I'll send them a message about this.

Post Reply

Return to “Bitwig”