pulseaudio doesn't detect (new) USB headset

Bug #1865499 reported by Timo Denissen
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Confirmed
Undecided
Unassigned
pulseaudio (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When booting the system (Lenovo Thinkpad L480/L490), all connected USB headsets are recognized and can be used, and configured via pavucontrol.

When hot-plugging the USB headset, either the speaker is recognized, or the microphone, rarely both. But when both are recognized, the microphone is always a "multichannel" device. When both the speaker and the "multichannel" microphone are recognized, only one can be used - either speaker or microphone. When selecting the speaker, the microphone is switched back to any other device available, them same goes for the microphone and the speaker - any other speaker is selected.

A workaround is to plug in the USB headset and run "pkill -U $USER pulseaudio". Everything works fine until the next hot-plug (eg. a second headset).

Running "lsb_release -a" gives
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

Attached is the output from "ubuntu-bug pulseaudio". Currently 10 % of our users are affected by this bug, all running the same Ubuntu and package versions. I activated the proposed repository to check if any updates available fix the problem, but to no avail. I also switched kernels (from 4.15 to 5.5 mainline from https://wiki.ubuntu.com/Kernel/MainlineBuilds).

I read bug #1325282 (https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1325282) and it sounds somewhat very familiar, but instead of "env={}" in /usr/share/ubuntu-drivers-common/detect/sl-modem.py there's "env=env". Removing "env=env" doesn't resolve the problem.

Do you require additional information?

Tags: bionic
Revision history for this message
Timo Denissen (timodenissen) wrote :
summary: - pulseaudio doesn't new usb headset
+ pulseaudio doesn't detect (new) USB headset
tags: added: bionic
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't have any headset exhibiting such issues myself, but it sounds like pulseaudio is not detecting all available profiles reliably, maybe due to a race condition.

Since there are three newer versions of PulseAudio in Ubuntu releases after 18.04, the first thing we should check is to see if this has already been fixed. When you can please boot 20.04 (prerelease) from USB:

  http://cdimage.ubuntu.com/daily-live/current/

and tell us if the bug still exists there.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Timo Denissen (timodenissen) wrote :

Just tested with Ubuntu 20.04, the problem does not occur in the live session.

Revision history for this message
Timo Denissen (timodenissen) wrote :

Got feedback from one of my colleagues that running Ubuntu 18.04.4 with Kernel 5.3.0-40, "pkill -U $USER pulseaudio" does not resolve the problem, only a full restart of the system.

Is there anything I can do to provide additional logs? Running a debugger when plugging in the headset, logfiles with a specific log level?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. If you can then please also try Ubuntu 19.10 (https://ubuntu.com/download/desktop) so we can get a slightly better idea of which PulseAudio version introduced the fix.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Timo Denissen (timodenissen) wrote :

I tested all versions since 18.04 up to 20.04, in no live session I could reproduce this problem. Yet this problem occurs in our installations. The youngest installation is about three weeks old and has the same bug.

Is there a way to end pulseaudio and prevent it from auto-restarting, so I can try and get some debug from "pulseaudio -vvv"? Killing the process with kill/pkill, or with "pulseaudio --kill" restarts it immediately.

Attached is the output to syslog when dis- and reconnectiong the USB headset.

Changed in pulseaudio (Ubuntu):
status: Fix Released → New
Revision history for this message
Timo Denissen (timodenissen) wrote :

I installed a fresh Ubuntu 18.04.3 and updated nearly every package one by one (to name a few, pulseaudio, libasound, systemd, kernel (4.15, later HWE 5.3) - all to no avail, up to a full upgrade of all packages so now the system is 18.04.4. The problem is not reproducable with a fresh and clean installation.

But we have a new case, the colleague got the auto security updates on 2020-03-02 and did a manual package update on 2020-03-04. After the updates on 2020-03-04 the system was rebooted by the user, and now has the same bug.

This affects both wired (USB) and wireless (bluetooth) headsets. As soon as the headset is connected and re-connected it's not recognized. Running "pkill -U $USER pulseaudio" solves this problem in 8/10 cases. The other 2/10 are full system reboots.

Attached is the dpkg.log with the updates from 2020-03-02 and 2020-03-04. I couldn't determine anything that would point near the/a problematic package.

I still need to find a way to restart pulseaudio with a higher debug level to check if anything pops up with pulse.

Revision history for this message
Timo Denissen (timodenissen) wrote :
Revision history for this message
Timo Denissen (timodenissen) wrote :

Got pulseaudio to stop auto-reloading with "autospawn = no" in /etc/pulseaudio/client.conf.

Attached is the output from "pulseaudio -vv". the PLAYBACK stream is recognized, but not the CAPTURE stream.

Revision history for this message
Timo Denissen (timodenissen) wrote :
Revision history for this message
Timo Denissen (timodenissen) wrote :

Quick update: the package updates from the proposed repository for

* libasound2-data,
* libasound2:amd64, and
* libasound2:i386

seemed to fixed the problems.

All affected USB headsets we use

* Logitech 960,
* SennHheiser PC8, and
* Plantronics Blackwire 3220

now are detected on every hot-plug.

When will the packages move from proposedto updates or security?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
affects: pulseaudio (Ubuntu) → alsa-lib (Ubuntu)
Changed in alsa-lib (Ubuntu):
status: New → Fix Committed
Revision history for this message
Timo Denissen (timodenissen) wrote :

Is there any way I can assist in releasing the fixes? If I remember correctly I saw the updates for a brief moment in -updates and not in -proposed anymore.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It looks like that fix is already released as an official update in 1.1.3-5ubuntu0.4 on 24 March 2020. If that didn't fix the problem here then I might have linked to the wrong thing. Please update your system and tell us if the problem still occurs.

Changed in alsa-lib (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Timo Denissen (timodenissen) wrote :

Unfortunately it's not fixed (on laptops not using -proposed) and somehow broken on my laptop again (using -proposed). I just had to kill pulseaudio again to get the headphones and microphone to be both detected (else only the microphone was detected).

We install the laptops using 18.04.3, updating everything to the latest updates using the default repository settings Ubuntu suggests, install some additional software (Skype, Teamviewer, some internal python tools (unrelated to sound)), and then it's broken. When rolling out a laptop without installing updates the problem does not appear.

If there is anything I can provide (log files, debugger traces) just tell me (and in case of debugger traces how to obtain them).

libasound2-data libasound2:amd64 libasound2:i386 are currently installed from -proposed in version 1.1.3-5ubuntu0.5.

Changed in alsa-lib (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-lib (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
David Fraser (davidf) wrote :

I think I have the same problem. In the last week, my USB headset (Microsoft LifeChat LX-3000) is often only recognized as an output, or only recognized as an input, by PulseAudio. When checking with alsamixer, it seems that Alsa recognizes both input and output, but PulseAudio doesn't...

This does seem like a race condition in PulseAudio, so those Alsa changes don't seem like what's caused my problem. How can I confirm if this is the same problem as reported or a different one?

Revision history for this message
Timo Denissen (timodenissen) wrote :

Plug your headset out and back in, confirm the headset is present in ALSA but not pulseaudio and kill pulseaudio: pkill -U $USER pulseaudio. Pulseaudio will restart itself automatically.

All audiostreams currently active will break, but pulseaudio is restarted and should recognoze your headset again.

Also, this does not happen with Ubunutu 20.04 on my laptop (yet).

Revision history for this message
Darin Miller (darinmiller) wrote :

This bug is back again in Kubuntu 20.10. Should I start a new bug? I can attach pactl output for both the good and bad states if it would help. When is issue occurs, aplay -l shows the problem device and killing PA fixes the problem.

Revision history for this message
Sebastien Bacher (seb128) wrote :

THose having the issue still, it would be better to report directly upstream on https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues since Ubuntu doesn't currently have a dedicated pulseaudio maintainer

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.