2

I'm using Pop!_OS 20.10 and I have an intermittent problem that seems to happen reliably when I disconnect and reconnect my USB microphone "too often" or "too many times". I would like to at least learn about a workaround less drastic than rebooting my machine.

It goes like this: I disconnect my USB microphone, then I reconnect it. If I do this 2 or 3 times within 30 seconds, eventually pulseaudio tells me this:

    D: [pulseaudio] module-udev-detect.c: /dev/snd/controlC1 is accessible: yes                                                             
    D: [pulseaudio] module-udev-detect.c: /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/sound/card1 is busy: no                         
    D: [pulseaudio] module-udev-detect.c: Loading module-alsa-card with arguments 'device_id="1" name="usb-Blue_Microphones_Yeti_Stereo_Microphone-00" card_name="alsa_card.usb-Blue_Microphones_Yeti_Stereo_Microphone-00" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"'                        
    D: [pulseaudio] reserve-wrap.c: Device 'Audio1' already locked.
    E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-Blue_Microphones_Yeti_Stereo_Microphone-00" card_name="alsa_card.usb-Blue_Microphones_Yeti_Stereo_Microphone-00" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
    I: [pulseaudio] module-udev-detect.c: Card /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/sound/card1 (alsa_card.usb-Blue_Microphones_Yeti_Stereo_Microphone-00) failed to load module.
    I: [pulseaudio] client.c: Created 3 "Native client (UNIX socket client)"

I don't see my microphone in the various pulseaudio tools, even though aplay lists the device in aplay -l

    card 1: Microphone [Yeti Stereo Microphone], device 0: USB Audio [USB Audio]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

If I reboot, then I can connect my USB microphone again, but I'm looking for a workaround less drastic than this that would reset whatever state is messed up when I disconnect and reconnect the USB audio device "too often".

2
  • If I do this 2 or 3 times within 30 seconds Out of curiosity, why would you that, are you trying to fix some other issue by reconnecting? – Eduardo Trápani Feb 22 at 14:51
  • No. I discovered the problem accidentally and then I figured out that this reliably reproduces the problem. I was moving devices from the USB port to a hub one day and then suddenly Pop! wouldn't detect any microphones. That's how I stumbled upon the problem. – J. B. Rainsberger Feb 22 at 18:51
2

I followed some of the comments here:

https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/809

Killing pipewire and then restarting pulseaudio fixed the problem:

systemctl --user stop pipewire.service
systemctl --user restart pulseaudio.service

It appears to be a race between pipewire and pulseaudio. I don't know anything about pipewire, but it sometimes seems to grab a lock on the USB audio device before pulseaudio can access it.

To permanently disable pipewire:

sudo systemctl --global stop pipewire.service
sudo systemctl --global disable pipewire.service

I don't know what service(s) pipewire provides that I might miss, but so far nothing :)

New contributor
Paul Medynski is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • I only regret that I can't do more than upvote, mark this the correct answer, and thank you directly with this comment. – J. B. Rainsberger 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.