Audacity crashes pulseaudio recording when opened

I have encountered an issue where frequently (95% of the time), opening Audacity causes pulseaudio to freeze, making usage of my mic systemwide stop working. Recording audio while in this state results in a severely squished and distorted recording (You can hear what is being said if the recording is slowed down by about 90%). All other recording in other apps become unusable until a system reboot. I am including my thread from the Linux Mint forums in case there is any helpful details there. Note that I tested both the version for my distro and the Flatpak version although I am currently using the Flatpak version. Both had the same issues.

OS: Linux Mint 20
Audacity: 2.3.3-1build1(Linux Mint repo)/2.4.2(Flatpak)
Support data:
Audacity.zip (14 KB)
Linux Mint thread: https://forums.linuxmint.com/viewtopic.php?f=49&t=334213

Firstly, PulseAudio shouldn’t crash when Audacity starts. The commands that Audacity sends during startup are entirely legal and are necessary requests so that Audacity knows what devices are available. If PulseAudio crashes it indicates that there is a problem elsewhere in the sound system, though it may only be a very minor problem. Unfortunately such problems are relatively common, which is not really very surprising as so few hardware manufacturers bother to support Linux :frowning:

Secondly, I do not recommend using the Flatpak (or Snap package) builds of Audacity. We have received multiple reports of problems with both of these versions. The Audacity Team do not make binaries for Linux, but I have extensively tested the official deb versions up to and including 2.3.3 and found them to all work pretty well.

My first suggestion would be to remove the Flatpak version and install the deb version.

If the problem persists and if the sound system works in all other respects, then a workaround that is worth trying:

Try launching Audacity with the command:

PULSE_LATENCY_MSEC=30 audacity

If that works, then you could modify the menu command for launching Audacity.

Thanks. I’m not sure if “crash” is the correct terminology but it does result in the squished audio, as stated and broken recordings in other apps. I tried the Flatpak simply as a troubleshooting method and since it was a more recent version. I will try what you suggested though. Thanks again for your help!

I ran that command in the terminal and here is what I got.

PULSE_LATENCY_MSEC=30 audacity
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:06: Debug: ScreenToClient cannot work when toplevel window is not shown
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4628
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4628
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1736
Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1904
Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2171
Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2839
Expression 'stream->playback.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4628
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: Unrecognized accel key 'backspace', accel string ignored.
08:26:12: Debug: Unrecognized accel key 'backspace', accel string ignored.
08:26:12: Debug: Unrecognized accel key 'numpad_enter', accel string ignored.
08:26:12: Debug: Unrecognized accel key 'numpad_enter', accel string ignored.
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ClientToScreen cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
08:26:12: Debug: ScreenToClient cannot work when toplevel window is not shown
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred

Initially it seemed to consistently work when opened this way. However, after a few tests it went back to fairly consistently not working. There is also a constant popping sound in the background whenever sound is picked up by the mic. Any idea why?

Also this can only be run through the terminal, I can’t add it to my application menu it seems.

PULSE_LATENCY_MSEC=30 audacity

The “30” is just an arbitrary value (in milliseconds). It sounds like that improved things, but perhaps not enough. You could try increasing that number to say “50” or even “100”. Aim for the lowest value that works.


That could be due to “xruns” (buffer overflow). What sample rate are you using?


Does your version of Mint have a “menu editor”? If it does, then you should be able to edit the “Command” that launches Audacity. (make a note of the original command so that you can revert if necessary).

Should be 44100Hz - the default. I don’t mess with that.

It does. The ok button greys out when I add that command before “audacity”. Even checking the button to launch in terminal doesn’t fix it.


If I add it after “audacity” I get this beautiful little error message:
Screenshot from 2020-11-09 08-52-12.png

Try:

env PULSE_LATENCY_MSEC=30 audacity %F

That worked. I upped it to 100ms still no change.

Reading through this topic again, I may be trying to offer fixes for the wrong problem.

Looking at the “audiodev.txt” file from the “Audacity.zip”, it looks like Pulse has not crashed at all.
It will do no harm to leave “PULSE_LATENCY_MSEC=30” (and may even be slightly beneficial) but it is not going to fix the “squished audio” problem.

The “squished” audio is almost certainly because of this:

ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8526:(snd_pcm_recover) underrun occurred

That will also explain the “popping” that you mentioned.


Good. I was just checking that you had not set it much higher as doing so can easily cause problems.

Can you give me some idea about the specifications of your computer, and which Desktop environment are your using (Gnome, Xfce, Cinnamon, MATE …)

It may also be helpful if you post a short audio example (just a few seconds in WAV format) of a distorted recording. That will help to confirm if I’m on the right track now. (see: https://forum.audacityteam.org/t/how-to-post-an-audio-sample/29851/1)

I’m running Linux Mint 20 with Cinnamon. You may also want to check my Linux Mint thread. You may find some useful tidbits there or see something we missed.

Here’s an audio clip: https://www.dropbox.com/s/rggu90n2urynqk9/untitled1.mp3?dl=0

Please export as “WAV”. (MP3 encoding mashes the waveform too much to see what exactly is happening).
A short WAV files may be attached directly to your reply (see: https://forum.audacityteam.org/t/how-to-attach-files-to-forum-posts/24026/1)

Computer specifications?

Sorry. That was the one I posted in the Mint thread. Here’s a new one.

Hope this has what you’re looking for. If you need any specific details, let me know.

That is very interesting and not what I expected at all. I’ve never seen this problem before.
I reduced the sample rate to 4000 Hz, effectively slowing down the track by about 91%.
Does this sound a bit like you?

Hi,

Another Linux Mint Cinnamon user here. Maybe a bit more information could assist in diagnosing your issue.

  1. In Audacity, are you using the onboard (Intel) or graphics card (NVidia) audio devices for recording and playback?
  2. Are you using proprietary NVidia drivers (installed with Driver Manager) or the open source Nouveau driver?
  3. Are you using Linux Mint 20 and the standard 5.4.0 kernel?

I ask these because I’m thinking your system is certainly powerful enough but I’m wondering if the hardware is new enough to not be well supported by the standard Linux Mint 5.4.0 kernel and open source graphics driver.

I’ve used various versions of Audacity on Linux Mint 20 Cinnamon from: distribution repository, flatpak and unofficial PPA (which I’m currently using) and it’s well behaved under ALSA, Pulseaudio and JACK Audio Connection Kit settings.

ATB,
Neil

Good questions. I’m also thinking that it could be some sort of weird driver issue.

Yes, slowing it down by about 90% makes the audio understandable. It’s heavily distorted though, likely due to the “squishing”.

  1. Not sure, is there a terminal command or something I can use to find out? (I’m not well versed in terminal usage.)
  2. Proprietary, as I do a lot of gaming (also there is a pop up warning message every boot if you use the Nouveau driver).
  3. Yes - 5.4.0-52 to be precise.

If you had a look at the Linux Mint thread you’ll see I ran this command because I was having problems adjusting my mic in sound settings. This fixed the issue but (seemingly) introduced the current problem at hand.

pacmd set-default-source alsa_input.pci-0000_00_1f.3.analog-stereo

There’s also this, when recording with Audacity:

fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  user    1445 F.... pulseaudio
                     user   50400 F.... audacity
/dev/snd/controlC1:  user    1445 F.... pulseaudio
/dev/snd/pcmC0D0c:   user    1445 F...m pulseaudio
/dev/snd/seq:        user   50400 F.... audacity

But this, when recording with OBS:

fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  user    1461 F.... pulseaudio
/dev/snd/controlC1:  user    1461 F.... pulseaudio
/dev/snd/pcmC0D0c:   user    1461 F...m pulseaudio
/dev/snd/pcmC0D0p:   user    1461 F...m pulseaudio

Not sure if this different behavior is related, but OBS (along with all other recording and mic related apps) work fine 100% of the time, (unless I open Audacity and the whole thing poops out). This is why I have my doubts it is a hardware compatibility issue (wouldn’t all recording/mic apps give me trouble?). However, I am open to any ideas.

Thanks for your input!

What is the output from these commands (copy and paste the full output):

pacmd list-sources



pacmd list-sinks
pacmd list-sources
2 source(s) available.
    index: 1
	name: <alsa_output.pci-0000_00_1f.3.analog-stereo.monitor>
	driver: <module-alsa-card.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 1030
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 2.00 .. 341.33 ms
	monitor_of: 1
	card: 1 <alsa_card.pci-0000_00_1f.3>
	module: 8
	properties:
		device.description = "Monitor of Built-in Audio Analog Stereo"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xa4330000 irq 147"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.form_factor = "internal"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
  * index: 2
	name: <alsa_input.pci-0000_00_1f.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9039
	volume: front-left: 55255 /  84% / -4.45 dB,   front-right: 55255 /  84% / -4.45 dB
	        balance 0.00
	base volume: 6554 /  10% / -60.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	card: 1 <alsa_card.pci-0000_00_1f.3>
	module: 8
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC1220 Analog"
		alsa.id = "ALC1220 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xa4330000 irq 147"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
			properties:
				
	active port: <analog-input-rear-mic>



pacmd list-sinks
1 sink(s) available.
  * index: 1
	name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9039
	volume: front-left: 39487 /  60% / -13.20 dB,   front-right: 39487 /  60% / -13.20 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 1
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 2.00 .. 341.33 ms
	card: 1 <alsa_card.pci-0000_00_1f.3>
	module: 8
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC1220 Analog"
		alsa.id = "ALC1220 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xa4330000 irq 147"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-lineout>

Which version of Audacity do you currently have installed?

How do you listen to audio playback? Headphones plugged in somewhere?

From “Help menu” or “Help menu > Diagnostics”, select “Audio Device Info”. Click the Save button to save the info somewhere convenient, then attach the saved file to your reply.