Audacity 3.1.3 AppImage very slow startup

Hello.
Seeing that APT repo doesn’t have the latest version of Audacity I went with the AppImage version. The issue is that it takes very long time to open, around 20-30 seconds. Once its open it seems to work fine.

Running AppImage from terminal pulls up a few errors, however after chatting with some people on Linux Discord i found that they have the same issues, but their AppImages in normal time. (few seconds)

/lib/x86_64-linux-gnu/libatk-1.0.so.0
/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0
/lib/x86_64-linux-gnu/libcairo-gobject.so.2
/lib/x86_64-linux-gnu/libcairo.so.2
/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
/lib/x86_64-linux-gnu/libgthread-2.0.so.0
/lib/x86_64-linux-gnu/libjack.so.0
/lib/x86_64-linux-gnu/libportaudio.so

(process:7092): Gdk-CRITICAL **: 14:04:14.654: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:7092): Gdk-CRITICAL **: 14:04:14.654: _gdk_pixmap_new: assertion '(drawable != NULL) || (depth != -1)' failed
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/gtk/bitmap.cpp(827): assert ""IsOk()"" failed in ConvertToImage(): invalid bitmap
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(2172): assert ""IsOk()"" failed in SetMaskColour(): invalid image
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(2223): assert ""IsOk()"" failed in SetMask(): invalid image
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(1853): assert ""IsOk()"" failed in GetWidth(): invalid image
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(1860): assert ""IsOk()"" failed in GetHeight(): invalid image
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(2112): assert ""IsOk()"" failed in GetAlpha(): invalid image
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(2232): assert ""IsOk()"" failed in HasMask(): invalid image
/home/runner/work/audacity/audacity/conan-home/.conan/data/wxwidgets/3.1.3.1-audacity/_/_/build/387c18a58e2fde1ef9c941329038b8fc62a56b98/source_subfolder/src/common/image.cpp(1986): assert ""IsOk()"" failed in GetData(): invalid image

(process:7092): GdkPixbuf-CRITICAL **: 14:04:14.655: gdk_pixbuf_new_from_data: assertion 'data != NULL' failed

(process:7092): Gdk-CRITICAL **: 14:04:14.655: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:7092): Gdk-CRITICAL **: 14:04:14.655: IA__gdk_drawable_get_display: assertion 'GDK_IS_DRAWABLE (drawable)' failed

(process:7092): Gdk-CRITICAL **: 14:04:14.655: IA__gdk_cursor_new_from_pixbuf: assertion 'GDK_IS_DISPLAY (display)' failed

(process:7092): GLib-GObject-CRITICAL **: 14:04:14.655: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

On Xubuntu 20.04 / mid-range laptop, I’m seeing Audacity 3.1.3 AppImage open in a little over 3 seconds.
I’m also seeing similar output at the terminal, so I assume that’s OK.

I don’t think those console messages indicate a problem - I get similar messages if I run from the terminal, and my startup is normally a few seconds.

Oddly I have some performance issues at the moment … I suspect because I’ve just been running Microsoft Teams in a browser … and that is quite likely to apply settings to recording and playback devices and the sound system overall that it doesn’t clear when closed. I’m about to reboot.

Have you been using Teams or Skype or Zoom or Google Meet or anything like that? Try rebooting. If it makes a difference, that is at least some problem isolation.

To perhaps give more context.

Before settling on AppImage I first installed the APT version. This however immediately screwed up my soundcard (scarlett 2i2) setup though which I run speakers. It was a sampling rate issue, where all audio in the system was using wrong sampling rate. After quite some headache I fixed it by un-commenting and setting sampling rate to 48000Hz in PulseAudio config file in /etc/something/pulse.config (i think). Prior to installing Audacity I never touched the settings and I assume the soundcard worked without those things un-commented, so it makes me wonder, maybe installing the APT version somehow messed up the audio system somewhere else.

I have settled on using AppImage as it messes less with the rest of the system, however I should mention that the APT version starts normally.

To answer the question, I have only used Teams in the browser but this issue isn’t caused by using those applications. I have started Audacity after restarts but nothing changes the startup.

Good to rule out things like Teams.

If you are OK with it (starting from scratch), another useful diagnostic would be to fully uninstall the repository version, remove (or rename) the directories ~/.audacity/ and ~/.audacity-data/ and then try again with the appimage. This doesn’t stop you from reinstalling the repo version later.

If that doesn’t help … the sledgehammer approach of removing all your pulseaudio settings in ~/.config/pulse/ (it might be a different dir in Xfce) should make a difference. I can’t guarantee that difference won’t make lots of things worse though, so if you do this definitely back up the folder. I believe everything will then be re-discovered.

Tried both. Deleted .audacity and .audacity-data and renamed the pulse folder to something else. Rebooted, and launched Audacity. Still slow loading time. All the folders got recreated. When I fixed my audio issue, I changed settings in /etc/pulse/daemon.conf.

I tried now to comment out the things i had changed (default-sampling-rate and alternate-sampling rate) and after re-logging the systems audio gets screwed up again. Audacity still doesn’t launch quickly. I tried setting the default to 48kHz and the alternate to 44.1kHz, and while system audio is back to normal, the audacity doesn’t change.

The folders getting recreated is as I’d expect - but now they should have default values in.

Unless there is something else in /etc/pulse/daemon.conf that you changed before and haven’t reverted, I can’t think of any other steps.

What is your exact distribution and version? I was thinking Xfce but that’s what Steve mentioned.

Just regular 20.04 Ubuntu. I also just recently installed it and since I’m new to linux, i haven’t done any configuring myself.

I think I’m out of ideas then :frowning:

Maybe Steve and the other actual experts can suggest something.

“Help menu > Diagnostics > Audio device info”
How long does it take for the device info report to appear?

Sorry for long reply.
It takes about 4-5 seconds.

What other audio apps do you have installed?
Do you have many plug-ins installed?

Not sure how to check that, but afaik I haven’t installed anything else. As I said my Ubuntu is a pretty recent fresh install. Most audio related things I installed already after I had Audacity installed, and was trying to fix the sampling rate issue.

If you disconnect your audio interface, then reboot, then launch Audacity (in that order with no additional steps), does Audacity launch any quicker?

Sorry for late response. I actually took my PC with me for the easter holidays and didn’t take the sound card setup. No change in performance

Is there any way I can monitor the startup of the AppImage audacity?

Only by launching it from a terminal window, which I think you’ve already tried.

Any plans to update the APT Audacity version to a newer one? If i recall correctly the APT version didn’t have the slow loading issue, but it is outdated.

That’s up to the Debian / Ubuntu package maintainers.

There’s always the option to build Audacity from the source code. That’s reasonably straightforward on Linux Ubuntu provided that you follow the build instructions to the letter: https://github.com/audacity/audacity/blob/master/BUILDING.md