Bug 83361 - Bluetooth headset pairing broken if pulseaudio is not restarted
Summary: Bluetooth headset pairing broken if pulseaudio is not restarted
Status: RESOLVED NOTOURBUG
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-01 17:43 UTC by Daniel Savard
Modified: 2014-09-07 11:37 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
pulseaudio log (246.93 KB, text/plain)
2014-09-04 22:22 UTC, Daniel Savard
Details

Description Daniel Savard 2014-09-01 17:43:29 UTC
I cannot get my headset to work with net-wireless/bluez-5.21-r1, media-sound/pulseaudio-5.0-r2, 3.14.14-gentoo and Gnome 3.12.

The bluetooth subsystem refuses to recognize the audio profile: a2dp-sink.

I opened a bug to Gentoo and after investigation here is the outcome. I needed to restart pulseaudio in order to bluez to make the connection. Here is the steps I followed to debug this:

The problem:

And here is what I am getting in bluetoothctl:

feynman syslog-ng # bluetoothctl
[NEW] Controller 00:02:72:20:1F:84 feynman-0 [default]
[NEW] Device 00:0F:59:10:90:2A iCom
[NEW] Device CC:55:AD:40:84:ED CiDS BB1
[bluetooth]# info 00:0F:59:10:90:2A
Device 00:0F:59:10:90:2A
	Name: iCom
	Alias: iCom
	Class: 0x240404
	Icon: audio-card
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: yes
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
[bluetooth]# connect 00:0F:59:10:90:2A
Attempting to connect to 00:0F:59:10:90:2A
Failed to connect: org.bluez.Error.Failed

Trying to connect manually:

usr@feynman ~ $ bluetoothctl
[NEW] Controller 00:02:72:20:1F:84 feynman-0 [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default agent
Invalid command
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:02:72:20:1F:84 Discovering: yes
[NEW] Device 50:85:69:FF:5F:B7 [HTS]H4500
[NEW] Device 00:0F:59:10:90:2A iCom
[bluetooth]# pair 00:0F:59:10:90:2A
Attempting to pair with 00:0F:59:10:90:2A
[CHG] Device 00:0F:59:10:90:2A Connected: yes
[CHG] Device 00:0F:59:10:90:2A UUIDs:
	00001108-0000-1000-8000-00805f9b34fb
	0000110b-0000-1000-8000-00805f9b34fb
	0000110e-0000-1000-8000-00805f9b34fb
	0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:0F:59:10:90:2A Paired: yes
Pairing successful
[CHG] Device 00:0F:59:10:90:2A Connected: no
[bluetooth]# connect 00:0F:59:10:90:2A
Attempting to connect to 00:0F:59:10:90:2A
Failed to connect: org.bluez.Error.Failed

Then, here I restarted pulseaudio with pulseaudio -k and then tried to connect:

usr@feynman ~ $ bluetoothctl
[NEW] Controller 00:02:72:20:1F:84 feynman-0 [default]
[NEW] Device 00:0F:59:10:90:2A iCom
[bluetooth]# pair 00:0F:59:10:90:2A
Attempting to pair with 00:0F:59:10:90:2A
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]# connect 00:0F:59:10:90:2A
Attempting to connect to 00:0F:59:10:90:2A
[CHG] Device 00:0F:59:10:90:2A Connected: yes
Connection successful
[CHG] Device 00:0F:59:10:90:2A UUIDs:
	00001108-0000-1000-8000-00805f9b34fb
	0000110b-0000-1000-8000-00805f9b34fb
	0000110c-0000-1000-8000-00805f9b34fb
	0000110e-0000-1000-8000-00805f9b34fb
	0000111e-0000-1000-8000-00805f9b34fb
[bluetooth]# 

And now the device is connected properly.

I shouldn't have to restart pulseaudio in order to make this working. Seems to be a pulseaudio issue. My version of bluez is 5.21.

The bug report for Gentoo is here: https://bugs.gentoo.org/show_bug.cgi?id=520710
Comment 1 Tanu Kaskinen 2014-09-02 07:55:41 UTC
This might be caused by the bug in bluez that was fixed in this recent commit: http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=274860fbc5fe458b4c4087f8c649387f06d68b29

Could you attach the pulseaudio log? Instructions here: https://wiki.ubuntu.com/PulseAudio/Log
Comment 2 Daniel Savard 2014-09-04 22:22:01 UTC
Created attachment 105769 [details]
pulseaudio log

Since I restart pulseaudio the bug doesn't manifest exactly the same way. I request a connection from the bluetooth audio device, it doesn't connect and I need to manually connect it. No more need for the pairing and discovering.
Comment 3 Tanu Kaskinen 2014-09-07 11:37:05 UTC
Connecting Bluetooth devices is not handled by PulseAudio. Since it sounds like the only problem that you now have is that the headset doesn't get connected without manual intervention, I'll close this bug.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.