Kubuntu 22.04, Bluetooth Headphones connect automatically, then immediately disconnect; pulseautio crashes every time

Bug #1971632 reported by Michael Braxner
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
High
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

* Impact

On a fresh install of Kubuntu 22.04, when I turn my properly paired bluetooth headphones on they automatically connect to the system, then immediately disconnect again. The headphones thus have to be manually 're-connected' every time.

* Test case

Connect a bluetooth headset to the computer, try to change the active profile. The selection should be reflected and the quality match, the pairing and service should be stable

* Regression potential

The changes are in the bluetooth a2dp/sbc functions so any potential regression would impact the connectivity with bluetooth devices using an a2dp profile (aptX, SBC, AAC). Check with different devices using the previously listed profiles.

----------------------------

Best as I understand it from the logs (appended below), pulseaudio showing up killed just after the headphones turn up as an unregistered sender ...
4/30/22 7:33 PM systemd pulseaudio.service: Main process exited, code=killed, status=8/FPE

... is responsible for the observed problem, i.e. the disconnect, probably triggered when pulseaudio restarts ...
4/30/22 7:33 PM systemd pulseaudio.service: Scheduled restart job, restart counter is at 2.

So it seems either an internal pulseaudio problem, or a problem triggered by the division by 0 in the bluetooth module ...
4/30/22 7:33 PM kernel traps: bluetooth[8884] trap divide error ip:7f862dc68490 sp:7f862498cc30 error:0 in module-bluez5-device.so[7f862dc66000+9000]

or some combination of the two ... but again, I'm only guessing here.

___________________________________________________________________________________________________

System Logs after switching headphones on:

4/30/22 7:33 PM kernel input: Nat's Flex (AVRCP) as /devices/virtual/input/input31
4/30/22 7:33 PM systemd-logind Watching system buttons on /dev/input/event19 (Nat's Flex (AVRCP))
4/30/22 7:33 PM bluetoothd /org/bluez/hci0/dev_A8_91_3D_DF_A8_F4/fd3: fd(43) ready
4/30/22 7:33 PM rtkit-daemon Supervising 0 threads of 0 processes of 0 users.
4/30/22 7:33 PM rtkit-daemon Successfully made thread 8884 of process 3426 owned by '1000' RT at priority 5.
4/30/22 7:33 PM rtkit-daemon Supervising 1 threads of 1 processes of 1 users.
4/30/22 7:33 PM kernel traps: bluetooth[8884] trap divide error ip:7f862dc68490 sp:7f862498cc30 error:0 in module-bluez5-device.so[7f862dc66000+9000]
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSink/sbc
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSource/sbc
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSink/sbc_xq_453
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSource/sbc_xq_453
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSink/sbc_xq_512
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSource/sbc_xq_512
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSink/sbc_xq_552
4/30/22 7:33 PM systemd pulseaudio.service: Main process exited, code=killed, status=8/FPE
4/30/22 7:33 PM bluetoothd Endpoint unregistered: sender=:1.126 path=/MediaEndpoint/A2DPSource/sbc_xq_552
4/30/22 7:33 PM systemd pulseaudio.service: Failed with result 'signal'.
4/30/22 7:33 PM systemd pulseaudio.service: Consumed 2min 20.027s CPU time.
4/30/22 7:33 PM acpid input device has been disconnected, fd 20
4/30/22 7:33 PM systemd pulseaudio.service: Scheduled restart job, restart counter is at 2.
4/30/22 7:33 PM systemd Stopped Sound Service.
4/30/22 7:33 PM systemd pulseaudio.service: Consumed 2min 20.027s CPU time.
4/30/22 7:33 PM systemd Starting Sound Service...
4/30/22 7:33 PM rtkit-daemon Successfully made thread 8889 of process 8889 owned by '1000' high priority at nice level -11.
4/30/22 7:33 PM rtkit-daemon Supervising 1 threads of 1 processes of 1 users.
4/30/22 7:33 PM pulseaudio Stale PID file, overwriting.
4/30/22 7:33 PM rtkit-daemon Supervising 1 threads of 1 processes of 1 users.
4/30/22 7:33 PM rtkit-daemon Successfully made thread 8890 of process 8889 owned by '1000' RT at priority 5.
4/30/22 7:33 PM rtkit-daemon Supervising 2 threads of 1 processes of 1 users.
4/30/22 7:33 PM rtkit-daemon Supervising 2 threads of 1 processes of 1 users.
4/30/22 7:33 PM rtkit-daemon Successfully made thread 8891 of process 8889 owned by '1000' RT at priority 5.
4/30/22 7:33 PM rtkit-daemon Supervising 3 threads of 1 processes of 1 users.
4/30/22 7:33 PM systemd Started Sound Service.
4/30/22 7:33 PM pulseaudio Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSink/sbc
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSource/sbc
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSink/sbc_xq_453
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSource/sbc_xq_453
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSink/sbc_xq_512
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSource/sbc_xq_512
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSink/sbc_xq_552
4/30/22 7:33 PM bluetoothd Endpoint registered: sender=:1.246 path=/MediaEndpoint/A2DPSource/sbc_xq_552

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: pulseaudio 1:15.99.1+dfsg1-1ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/hwC0D2', '/dev/snd/hwC0D0', '/dev/snd/pcmC0D10p', '/dev/snd/pcmC0D9p', '/dev/snd/pcmC0D8p', '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Wed May 4 17:46:37 2022
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
SourcePackage: pulseaudio
Symptom: audio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/25/2022
dmi.bios.release: 1.14
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.14.0
dmi.board.name: 05XYW7
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.14.0:bd03/25/2022:br1.14:svnDellInc.:pnXPS159500:pvr:rvnDellInc.:rn05XYW7:rvrA00:cvnDellInc.:ct10:cvr:sku097D:
dmi.product.family: XPS
dmi.product.name: XPS 15 9500
dmi.product.sku: 097D
dmi.sys.vendor: Dell Inc.
modified.conffile..etc.pulse.daemon.conf: [modified]
mtime.conffile..etc.pulse.daemon.conf: 2022-04-29T21:03:20.101513

Revision history for this message
Michael Braxner (braxner-michael) wrote :
Revision history for this message
Michael Braxner (braxner-michael) wrote :

Igor Kovalenko managed to identify the problem, and and fixed it. See https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1354 for details.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Geoff Jacobsen (geoffj) wrote :

I get the same behaviour on ubuntu 22.04

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

The is in pulseaudio 16.0+ which is in kinetic

Changed in pulseaudio (Ubuntu):
importance: Undecided → High
status: Confirmed → Fix Released
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

And I cherrypicked the fixes for a SRU to 22.04 now

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted pulseaudio into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:15.99.1+dfsg1-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in pulseaudio (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
ogooreck (kjchmielewski) wrote (last edit ):

Hello,

I installed the package from proposed and it fixes bug for me.

pulseaudio:
  Installed: 1:15.99.1+dfsg1-1ubuntu2
  Candidate: 1:15.99.1+dfsg1-1ubuntu2
  Version table:
 *** 1:15.99.1+dfsg1-1ubuntu2 400
        400 http://pl.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:15.99.1+dfsg1-1ubuntu1 500
        500 http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

before installing package: after switching off and then switching on bt headphones (previously paired with my laptop bt device) connect automatically, then immediately disconnect

after installing package: after switching off and then switching on bt headphones (previously paired with my laptop bt device) connect automatically and stay connected, sound working properly.

Jeremy Bícha (jbicha)
tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for pulseaudio has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:15.99.1+dfsg1-1ubuntu2

---------------
pulseaudio (1:15.99.1+dfsg1-1ubuntu2) jammy; urgency=medium

  * debian/patches/git_sbc_limit.patch, debian/patches/git_sbc_frame.patch:
    - cherrypick !695 from the upstream stable branch to fix disconnect
      and segfault issues with some bluetooth devices (lp: #1971632)
  * debian/patches/git_sbc_decode.patch:
    - cherrypick a fix for the service segfaulting sometime after switching
      to HFP profile (lp: #1987523)

 -- Sebastien Bacher <email address hidden> Wed, 07 Sep 2022 16:09:58 +0200

Changed in pulseaudio (Ubuntu Jammy):
status: Fix Committed → Fix Released
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.