Recording stops immediately in overdubbing mode, not always

Help for Audacity on GNU/Linux.
Forum rules
ImageThis forum is for Audacity on GNU/Linux.
Please state:
  • which version of Linux you are using,
  • the exact three-section version number of Audacity from Help menu > About Audacity,
  • whether you installed your distribution's release, PPA version, or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see https://www.audacityteam.org/download/).
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
nnseva
Posts: 4
Joined: Sun Apr 18, 2021 12:22 pm
Operating System: Linux *buntu

Recording stops immediately in overdubbing mode, not always

Post by nnseva » Sun Apr 18, 2021 1:06 pm

After pressing the Record Button in overdubbing mode (playing track is present), the recording process stops immediately, or after some milliseconds recorded. Doesn't happen on the empty track.

Happens frequently, but not always. After several presses, it starts and continues recording fine.

Software playthrough, Sound activated recording options are switched off. Tried with and without Detect dropouts option.

Linux: Ubuntu 20.04.2 LTS
Audacity: v.2.3.3 (from Ubuntu packages), 2.4.2 (from ppa https://launchpad.net/~ubuntuhandbook1/ ... u/audacity), 3.0.0 (built from sources).

Audio subsystem: ALSA (from Ubuntu packages)

Devices used:
- playback - HDA Intel
- recording - HDA Intel, and external USB microphone

Found some number of (probably) related reports:
- viewtopic.php?f=48&t=81443&p=255429&hil ... ly#p255429
- viewtopic.php?f=48&t=110308&p=392518&hi ... ly#p392518

jademan
Forum Crew
Posts: 1326
Joined: Fri Jul 17, 2009 10:11 pm
Operating System: Windows 10

Re: Recording stops immediately in overdubbing mode, not always

Post by jademan » Mon Apr 19, 2021 11:56 am

WIndows guy here. It is good to see that you have done research on this issue.

Have you tried Pulse Audio and/or Jack as your links have suggested?

Hopefully a Linux or Ubuntu guy will step forward with some more useful suggestions. :D

steve
Site Admin
Posts: 81378
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Recording stops immediately in overdubbing mode, not always

Post by steve » Mon Apr 19, 2021 12:02 pm

What settings are you using in the Device Toolbar?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

nnseva
Posts: 4
Joined: Sun Apr 18, 2021 12:22 pm
Operating System: Linux *buntu

Re: Recording stops immediately in overdubbing mode, not always

Post by nnseva » Wed Apr 21, 2021 8:04 am

steve wrote:
Mon Apr 19, 2021 12:02 pm
What settings are you using in the Device Toolbar?
Really neither of the settings in the device toolbar helped me, but right now the toolbar looks as in the attachment
Attachments
audacity-device-bar.png
audacity-device-bar.png (5.59 KiB) Viewed 273 times

nnseva
Posts: 4
Joined: Sun Apr 18, 2021 12:22 pm
Operating System: Linux *buntu

Re: Recording stops immediately in overdubbing mode, not always

Post by nnseva » Wed Apr 21, 2021 8:19 am

jademan wrote:
Mon Apr 19, 2021 11:56 am
Have you tried Pulse Audio and/or Jack as your links have suggested?
I've read here viewtopic.php?f=48&t=110308&p=392518&hi ... ly#p392518 that this guy has already tried with Pulse and Jack options without success, so probably I don't need to repeat such an unsuccessful experience, because Pulse and Jack subsystems are not defaulted and need a lot of time to make them work fine.

steve
Site Admin
Posts: 81378
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Recording stops immediately in overdubbing mode, not always

Post by steve » Wed Apr 21, 2021 10:39 am

nnseva wrote:
Wed Apr 21, 2021 8:19 am
because Pulse and Jack subsystems are not defaulted
PulseAudio is the default sound system in Ubuntu.
To check that it is installed correctly, try running this command from a Terminal window. It should open the PulseAudio Volume Control:

Code: Select all

pavucontrol
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

nnseva
Posts: 4
Joined: Sun Apr 18, 2021 12:22 pm
Operating System: Linux *buntu

Re: Recording stops immediately in overdubbing mode, not always

Post by nnseva » Wed Apr 21, 2021 11:34 am

Found the workaround!
steve wrote:
Wed Apr 21, 2021 10:39 am
nnseva wrote:
Wed Apr 21, 2021 8:19 am
because Pulse and Jack subsystems are not defaulted
PulseAudio is the default sound system in Ubuntu.
To check that it is installed correctly, try running this command from a Terminal window. It should open the PulseAudio Volume Control:

Code: Select all

pavucontrol
The `pavucontrol` command is not installed on my host right now. I am using Kubuntu, it probably has its own sound subsystem UI options.

You right, I've checked and found installed the `PulseAudio` package `1:13.99.1-1ubuntu3.10`, but anyway, Audacity has only one option to select the `Audio host` (first member of the DeviceToolbar) - the ALSA.

The `recording device` control (the second member of the Device Toolbar) contains the `pulse` option to select, and it looks the same as the `default` one. Changing this option to `pulse` and trying other options directly selecting the recording device (see the first attachment) doesn't have an effect on the issue.

SURPRISINGLY!

The `playback device` (the fourth member of the Device Toolbar) also contains `pulse` and direct device options for the playback device (as in the second attachment). Changing it to the direct device selection (see the second attachment) works around an issue! It might be some tip for developers to find the bug, thank you.
Attachments
audacity-device-bar-recording-selection.png
audacity-device-bar-recording-selection.png (16.96 KiB) Viewed 261 times
audacity-device-bar-playback-selection.png
audacity-device-bar-playback-selection.png (26.28 KiB) Viewed 261 times

steve
Site Admin
Posts: 81378
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Recording stops immediately in overdubbing mode, not always

Post by steve » Wed Apr 21, 2021 12:25 pm

nnseva wrote:
Wed Apr 21, 2021 11:34 am
The `recording device` control (the second member of the Device Toolbar) contains the `pulse` option to select, and it looks the same as the `default` one.
The default sound system is PulseAudio, so "default" is just an alias for PulseAudio.

"ALSA" is the underlying sound system ("drivers") between PulseAudio and the hardware device.
nnseva wrote:
Wed Apr 21, 2021 11:34 am
Changing it to the direct device selection (see the second attachment) works around an issue!
This is a known issue, and is what I was going to suggest next (but you beat me to it ;))

It does not happen often these days, but it is still an issue for a few Linux users. Unlike most audio apps, Audacity does not just connect to the sound system and leave the connections open until Audacity is closed. Audacity makes a new connection whenever it is required to play or record, and closes the connection on "stop". It is like this for historic reasons.

Unfortunately, PulseAudio does not always manage to open and close the connections when requested, which causes PulseAudio to quit and respawn. It's the "respawning" that causes the problem because Audacity is left in a state where it is trying to communicate with a PulseAudio device that no longer exists - it has been replaced by a new instance of Pulse.

The workaround is to bypass PulseAudio by using the underlying ALSA devices directly. As you have done, you just select the "hw" option that corresponds with the audio device that you are using. In your case that's "hw:2,0" (the "ALC887-VD Analog" device).

My hope is that eventually Audacity will be changed to make the audio connections persistent, thus avoiding the problem arising from constantly making and closing connections, but this is a big job that goes deep into Audacity's audio handling so it's not likely to happen anytime soon.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply