Bug 73571

Summary: bluetooth headsets fail with log entry: re-auth of legacy device not possible
Product: Drivers Reporter: Mike Johnson (yuyuyak)
Component: BluetoothAssignee: linux-bluetooth (linux-bluetooth)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.11.x to 3.14.0 Subsystem:
Regression: No Bisected commit-id:

Description Mike Johnson 2014-04-05 00:27:58 UTC
Headsets worked perfectly with kernel for 2 years prior.  When turned on userspace programs report them as connected however, pulseaudio pavucontrol reports the profile as off and refuses to turn them on.  Although "connected" they do not work at all.  Checking system log shows:
Bluetooth: re-auth of legacy device is not possible.  
Followed closely by another error:
[dbus] [system] Rejected send message, 2 matched rules; type="error", sender=":1.8" (uid=0 pid=3622 comm="/usr/sbin/bluetoothd ") interface="(unset)" member="(unset)" error name="org.bluez.Error.InvalidArguments" requested_reply="0" destination=":1.21" (uid=1000 pid=4824 comm="/usr/bin/pulseaudio --start --log-target=syslog ")
  
Downgrade to 3.10.x kernels solves the problem.
Additionally, tried a Ken Colivas patched kernel today on the 32 bit N270 atom machine, kernel 3.13.5 worked in that configuration.  Only addition was the BFS scheduler, no BFQ.  Trying the same Ken Colivas kernel with my 64 bit Core 2 duo did not work.
With that difference, this bug affects both machines in the same way.
Hardware:
Asus eee 1000HE, n270 atom-based
HP Core 2 duo, T7500
Plantronics 220 headset
Plantronics 222 headset

Funtoo Linux unstable, kernels tried:
Vanilla-sources (direct from kernel.org)
gentoo-sources (vanilla with gentoo security patches)
ck-sources (Ken Colivas and gentoo security patches)
Tried many versions of the vanilla kernel, just a couple of the other two.  In fact, nearly every version from 3.11.0 onwards to 3.13.7.  Tried the gentoo patched 3.14.0 today.
I initially encountered this problem towards the end of summer '13.  Ignored the issue long enough to let the bluez5/pulseaudio/HSP/HFP fiasco confuse the issue for me and have finally found the kernel downgrade to be my only salvation.
If any additional info/testing is needed please consider me at your service.
Comment 1 Mike Johnson 2014-04-06 00:27:13 UTC
My C-fu being very weak I have resorted to using breakpoint messages via the convenient BT_INFO command.  I've download the vanilla 3.14.0 kernel.  Starting with hci_event.c I first ascertained that hci_conn_ssp_enable isn't true, triggering the re-auth message.  So far I've only found 2 places where that should happen, in hci_event.c (hci_remote_ext_features_evt) and hci_conn.c. (hci_acl_create_connection). Putting breakpoint messages on either side of those statements, it appears we never get to them at all.  That is, the set_bit(HCI_CONN_SSP_ENABLED... statements.
These are bluetooth 2.0 headsets.  More info as I get it, if I knew what I was doing I'd be dangerous.