Created attachment 138379 [details] gnome-settings audio Unable redirect audio to bluetooth headset SONY MDR-XB950B1, although headset paired successfully with system. # hcitool con Connections: < ACL 04:5D:4B:5F:34:57 handle 68 state 1 lm MASTER AUTH ENCRYPT # hcitool info 04:5D:4B:5F:34:57 Requesting information ... BD Address: 04:5D:4B:5F:34:57 OUI Company: Sony Corporation (04-5D-4B) Device Name: MDR-XB950B1 LMP Version: 4.1 (0x7) LMP Subversion: 0x2e3c Manufacturer: Cambridge Silicon Radio (10) Features page 0: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87 <3-slot packets> <5-slot packets> <encryption> <slot offset> <timing accuracy> <role switch> <hold mode> <sniff mode> <park state> <RSSI> <channel quality> <SCO link> <HV2 packets> <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme> <power control> <transparent SCO> <broadcast encrypt> <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan> <interlaced iscan> <interlaced pscan> <inquiry with RSSI> <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave> <AFH class. slave> <LE support> <3-slot EDR ACL> <5-slot EDR ACL> <sniff subrating> <pause encryption> <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps> <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry> <LE and BR/EDR> <simple pairing> <encapsulated PDU> <non-flush flag> <LSTO> <inquiry TX power> <EPC> <extended features> Features page 1: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Actual result: When I select in gnome-settings "Headset - MDR-XB950B1" nothing happens. I means that sound still played via previous source. Expected result: Sound played via headset SONY MDR-XB950B1.
I am found root of issue. I don't know why but when audio bluetooth profile setting to off. Is impossible in gnome-setting select another bluetooth profile. But in this situation pavucontrol can help switch bluetooth to workable profile. And after it gnome-setting able switch between several output devices. But when I tried select "HSP/HFP" profile in gnome-setting, gnome-setting became broken again :( I don't know which is more related this issue pulse audio or gnome so I leave this bug open. And second question: Why I don't see aptX audio profile? I am sure that my headset support aptX audio profile.
Created attachment 138380 [details] pavucontrol and gnome-settings
This sounds like a bug in gnome-control-center. I don't know why it shows an "Analog Stereo Output" profile in the screenshot, bluetooth devices don't have such profile at all. Regarding aptX, PulseAudio doesn't support that codec. Maybe some day it will be supported, but currently I'm not aware of any efforts towards that.
Today I tried second attempt to connect bluetooth headset SONY MDR-XB950B1. I am launch pavucontrol and try's as usual change bluetooth profile to A2DP. But after it SONY MDR-XB950B1 not added to list of appropriate audio devises for playback why? Now exactly the pulseaudio is blame?
Created attachment 138475 [details] pavucontrol and gnome-settings second attempt
Created attachment 138476 [details] pavucontrol -> Configuration
On the third attempt I was found how is possible make the headset work. For this enough first connect by bluetooth with the old Nexus 5 phone, and then not turning off the headset and connect to computer with Linux. Looks like computer not make needed headset initialization.
In the new screenshots pavucontrol shows that the active profile is A2DP, but I'm wondering if it really is. Does "pactl list cards" also show that the active profile is "a2dp_sink"? If activating the A2DP profile fails, the bluetooth card should automatically switch to the "off" profile. What's your pulseaudio version?
Created attachment 138680 [details] pavucontrol and pactl list cards
As we see on screenshot active profile is off. I am curious why? In pavucontrol I selected A2DP Sink. > What's your pulseaudio version? $ pulseaudio --version pulseaudio 11.1-rebootstrapped
Also when I paring headset I see strange kernel message in dmesg: [ 4937.080151] ============================================ [ 4937.080152] WARNING: possible recursive locking detected [ 4937.080154] 4.16.0-300.fc28.x86_64+debug #1 Not tainted [ 4937.080155] -------------------------------------------- [ 4937.080156] kworker/u17:1/22495 is trying to acquire lock: [ 4937.080157] (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}, at: [<000000008ee36dc3>] bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 4937.080174] but task is already holding lock: [ 4937.080175] (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}, at: [<00000000a4db3b8a>] l2cap_sock_new_connection_cb+0x18/0xa0 [bluetooth] [ 4937.080187] other info that might help us debug this: [ 4937.080188] Possible unsafe locking scenario: [ 4937.080190] CPU0 [ 4937.080191] ---- [ 4937.080192] lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); [ 4937.080194] lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); [ 4937.080196] *** DEADLOCK *** [ 4937.080198] May be due to missing lock nesting notation [ 4937.080201] 5 locks held by kworker/u17:1/22495: [ 4937.080202] #0: ((wq_completion)"%s"hdev->name#2){+.+.}, at: [<000000003a34e89c>] process_one_work+0x1d7/0x630 [ 4937.080208] #1: ((work_completion)(&hdev->rx_work)){+.+.}, at: [<000000003a34e89c>] process_one_work+0x1d7/0x630 [ 4937.080213] #2: (&conn->chan_lock){+.+.}, at: [<00000000f70958c0>] l2cap_connect+0x8f/0x5a0 [bluetooth] [ 4937.080229] #3: (&chan->lock/2){+.+.}, at: [<00000000d99bd205>] l2cap_connect+0xa9/0x5a0 [bluetooth] [ 4937.080241] #4: (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}, at: [<00000000a4db3b8a>] l2cap_sock_new_connection_cb+0x18/0xa0 [bluetooth] [ 4937.080251] stack backtrace: [ 4937.080253] CPU: 7 PID: 22495 Comm: kworker/u17:1 Not tainted 4.16.0-300.fc28.x86_64+debug #1 [ 4937.080254] Hardware name: Gigabyte Technology Co., Ltd. Z87M-D3H/Z87M-D3H, BIOS F11 08/12/2014 [ 4937.080261] Workqueue: hci0 hci_rx_work [bluetooth] [ 4937.080263] Call Trace: [ 4937.080267] dump_stack+0x85/0xbf [ 4937.080270] __lock_acquire.cold.62+0x158/0x227 [ 4937.080273] ? mark_held_locks+0x57/0x80 [ 4937.080276] ? lock_acquire+0x9e/0x1b0 [ 4937.080282] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 4937.080286] ? lock_sock_nested+0x72/0xa0 [ 4937.080292] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 4937.080298] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 4937.080306] ? l2cap_sock_new_connection_cb+0x5d/0xa0 [bluetooth] [ 4937.080313] ? l2cap_connect+0x110/0x5a0 [bluetooth] [ 4937.080321] ? l2cap_recv_frame+0x6d0/0x2cb0 [bluetooth] [ 4937.080324] ? __mutex_unlock_slowpath+0x4b/0x2b0 [ 4937.080332] ? l2cap_recv_frame+0x6e8/0x2cb0 [bluetooth] [ 4937.080334] ? __mutex_unlock_slowpath+0x4b/0x2b0 [ 4937.080341] ? hci_rx_work+0x1c6/0x5d0 [bluetooth] [ 4937.080343] ? process_one_work+0x261/0x630 [ 4937.080346] ? worker_thread+0x3a/0x390 [ 4937.080347] ? process_one_work+0x630/0x630 [ 4937.080349] ? kthread+0x120/0x140 [ 4937.080351] ? kthread_create_worker_on_cpu+0x70/0x70 [ 4937.080353] ? ret_from_fork+0x3a/0x50 [ 4937.139502] BUG: sleeping function called from invalid context at net/core/sock.c:2768 [ 4937.139507] in_atomic(): 1, irqs_disabled(): 0, pid: 1646, name: krfcommd [ 4937.139510] INFO: lockdep is turned off. [ 4937.139514] CPU: 0 PID: 1646 Comm: krfcommd Not tainted 4.16.0-300.fc28.x86_64+debug #1 [ 4937.139516] Hardware name: Gigabyte Technology Co., Ltd. Z87M-D3H/Z87M-D3H, BIOS F11 08/12/2014 [ 4937.139519] Call Trace: [ 4937.139527] dump_stack+0x85/0xbf [ 4937.139533] ___might_sleep.cold.72+0xac/0xbc [ 4937.139540] ? lock_sock_nested+0x29/0xa0 [ 4937.139559] ? bt_accept_enqueue+0x3c/0xb0 [bluetooth] [ 4937.139566] ? rfcomm_connect_ind+0x21b/0x260 [rfcomm] [ 4937.139573] ? rfcomm_run+0x1620/0x1830 [rfcomm] [ 4937.139578] ? do_wait_intr_irq+0xb0/0xb0 [ 4937.139585] ? rfcomm_check_accept+0x90/0x90 [rfcomm] [ 4937.139590] ? kthread+0x120/0x140 [ 4937.139594] ? kthread_create_worker_on_cpu+0x70/0x70 [ 4937.139599] ? ret_from_fork+0x3a/0x50 [ 5343.668149] perf: interrupt took too long (3194 > 3188), lowering kernel.perf_event_max_sample_rate to 62000
Sorry for the delay, I have trouble keeping up with the mailing list and bug tracker. (In reply to mikhail.v.gavrilov from comment #10) > As we see on screenshot active profile is off. I am curious why? In > pavucontrol I selected A2DP Sink. It's off, because activating A2DP failed, probably when trying to acquire the file descriptor for writing audio. The syslog might have some information (but I don't have high hopes that it would be useful). There's certainly some problem in the kernel, and that might have something to do with the failure. BlueZ developers can be contacted via the mailing list: http://www.bluez.org/development/lists/ or the kernel bugzilla probably works too: https://bugzilla.kernel.org/enter_bug.cgi?component=Bluetooth&product=Drivers
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/398.
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.