No input for recording on 2.4.2 (or 2.3.3) and Ubuntu 20.04 (focal)

Dear forum users,

After update from Ubuntu 19.10 to 20.04 I cannot longer record from my Line-In nor my Mic port of my sound card. I was using the system’s audacity package (audacity 2.3.3) and thought that was the issue, hence I compiled 2.4.2 (following these excellent instructions https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719/1). However when testing I get the same results, not able to record form line-in nor from Mic.
When I run audacity form the command line I get these errors:
(2.4.4)

$ ./audacity 

Gtk-Message: 14:14:02.211: Failed to load module "canberra-gtk-module"
Attempting to connect to Audacity failed...retrying
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
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
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
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
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
Expression 'stream->playback.pcm' failed in '/home/juanpi/Downloads/audacity-minsrc-2.4.2/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 4628
Expression 'stream->playback.pcm' failed in '/home/juanpi/Downloads/audacity-minsrc-2.4.2/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 4628
Expression 'stream->playback.pcm' failed in '/home/juanpi/Downloads/audacity-minsrc-2.4.2/lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 4628

The “Expression …” errors are triggered when I change the input source (default:Line:1, default:Line:0, default:Rear Mic:0, etc…)
Since ti was working flawlessly in 2.3.3 and 19.10, and broke when moving to 20.04 either using 2.3.3 or 2.4.2, I am pretty sure this is not an audacity issue, but I really need your help to isolate the problem so I can report to the ubuntu bug system.

I have also check some debug instructions from here https://bbs.archlinux.org/viewtopic.php?id=214541 and here https://bbs.archlinux.org/viewtopic.php?id=233348 but nothing seems wrong. Here the output of some of those commands

$ aplay -lL

default
    Playback/recording through the PulseAudio sound server
surround21
    2.1 Surround output to Front and Subwoofer speakers
surround40
    4.0 Surround output to Front and Rear speakers
surround41
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50
    5.0 Surround output to Front, Center and Rear speakers
surround51
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
null
    Discard all samples (playback) or generate zero samples (capture)
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
sysdefault:CARD=PCH
    HDA Intel PCH, ALC892 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct sample mixing device
dmix:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC892 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC892 Digital
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Hardware device with all software conversions
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



sudo fuser -v /dev/snd/*

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  juanpi    37071 F.... pulseaudio
                     juanpi    39292 F.... audacity
/dev/snd/pcmC0D0c:   juanpi    37071 F...m pulseaudio
/dev/snd/seq:        juanpi    39292 F.... audacity

Thank you for any guidance.

Can you record from anything?

Please post your “Audio device Info” (Help Menu: Diagnostics - Audacity Manual)
(Easiest to save the info to a file, then attach the file to your post)

Thank you for your prompt answer!
In the meanwhile I installed pavucontrol and noticed that the recording device “ALSA plug-in [audacity]” had “ALSA capture from: Monitor of Built-in Audio Analog Stereo”. I changed that to “ALSA capture from: Built-in Audio Analog Stereo” and the problem is fixed. I get the behavior I had before the upgrade. I just hope the configuration stays between restarts (I have not checked this yet).

I am not sure if it is possible to detect this issue (bad configuration?) in a more direct way (e.g. directly from audacity). I think it would be good to know, to avoid a potential future report of the same problem.

It should.


Unfortunately Audacity cannot detect that, because it happens in PulseAudio before Audacity. Audacity just interfaces with PulseAudio, but has no idea what happens on the other side of that interface.