Project

General

Profile

Bug #1825

kernel 4.16.9-gnu-1 causes bluetooth no to work

freemor - almost 6 years ago - . Updated almost 6 years ago.

Status:
fixed
Priority:
bug
Assignee:
% Done:

100%


Description

After a complaint about this from user Boured in the irc I tried using Bluetooth after updateing to 4.16.11-gnu-1

His observations were correct. Bluetooth completely fails to function with this kernel. I have not been able to track the issue to its source.

Expected behaviour: Bluetooth would function as it did before the kernel update
Acutal behaviour: All bluetooth devices silently (no obvious error) fail to be seen by bluetoothd

I have 2 BT adapters available. Both worked flawlessly previous to this kernel update

The first a BCM20702A0 (Broadcom):

Is seen when connected:

[ 2952.613286] usb 3-1: USB disconnect, device number 3
[ 2955.366484] usb 3-1: new full-speed USB device number 4 using uhci_hcd
[ 2955.549449] usb 3-1: New USB device found, idVendor=0a5c, idProduct=21ec
[ 2955.549452] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2955.549454] usb 3-1: Product: BCM20702A0
[ 2955.549456] usb 3-1: Manufacturer: Broadcom Corp
[ 2955.549457] usb 3-1: SerialNumber: 001986000B56

but fails to be seen by rfkill or bluetoothd

[Discharging, 41%, 00:36:35:freemor@freelap ~]$ bluetoothctl
Agent registered
[bluetooth]# list
[bluetooth]# devices
No default controller available
[bluetooth]# 

----
[Discharging, 41%, 00:36:35:freemor@freelap ~]$ sudo rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Running Bluetoothd manually to get more info shows no error but also show zero indication of the BT device being attached/detached:

[Discharging, 53%, 00:44:07:freemor@freelap ~]$ sudo /usr/lib/bluetooth/bluetoothd -d -n
bluetoothd[24646]: Bluetooth daemon 5.49
bluetoothd[24646]: src/main.c:parse_config() parsing /etc/bluetooth/main.conf
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “DiscoverableTimeout” in group “General”
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “PairableTimeout” in group “General”
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “Privacy” in group “General”
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “Name” in group “General”
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “Class” in group “General”
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “DeviceID” in group “General”
bluetoothd[24646]: src/main.c:parse_config() Key file does not have key “ReverseServiceDiscovery” in group “General”
bluetoothd[24646]: src/adapter.c:adapter_init() sending read version command
bluetoothd[24646]: Starting SDP server
bluetoothd[24646]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0531
bluetoothd[24646]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[24646]: src/plugin.c:add_plugin() Loading hostname plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading wiimote plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading autopair plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading policy plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading a2dp plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading avrcp plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading hog plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading gap plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading scanparam plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading deviceinfo plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading midi plugin
bluetoothd[24646]: src/plugin.c:add_plugin() Loading battery plugin
bluetoothd[24646]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[24646]: profiles/input/suspend-none.c:suspend_init() 
bluetoothd[24646]: profiles/network/manager.c:read_config() Config options: Security=true
bluetoothd[24646]: plugins/hostname.c:read_dmi_fallback() chassis: laptop
bluetoothd[24646]: plugins/hostname.c:read_dmi_fallback() major: 0x01 minor: 0x03
bluetoothd[24646]: src/main.c:main() Entering main loop
bluetoothd[24646]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 1 op 0 soft 0 hard 0
bluetoothd[24646]: Bluetooth management interface 1.14 initialized
bluetoothd[24646]: src/adapter.c:read_version_complete() sending read supported commands command
bluetoothd[24646]: src/adapter.c:read_version_complete() sending read index list command
bluetoothd[24646]: src/adapter.c:read_commands_complete() Number of commands: 65
bluetoothd[24646]: src/adapter.c:read_commands_complete() Number of events: 35
bluetoothd[24646]: src/adapter.c:read_commands_complete() enabling kernel-side connection control
bluetoothd[24646]: src/adapter.c:read_index_list_complete() Number of controllers: 0
bluetoothd[24646]: plugins/hostname.c:property_changed() static hostname: freelap
bluetoothd[24646]: plugins/hostname.c:property_changed() pretty hostname: 
bluetoothd[24646]: plugins/hostname.c:property_changed() chassis: laptop
bluetoothd[24646]: src/agent.c:agent_ref() 0x55564f5e90f0: ref=1
bluetoothd[24646]: src/agent.c:register_agent() agent :1.42
bluetoothd[24646]: src/agent.c:agent_disconnect() Agent :1.42 disconnected
bluetoothd[24646]: src/agent.c:agent_destroy() agent :1.42
bluetoothd[24646]: src/agent.c:agent_unref() 0x55564f5e90f0: ref=0

kernel bluetooth modules are loaded:

[Discharging, 41%, 00:36:35:freemor@freelap ~]$ sudo lsmod | grep bluetooth
bluetooth             638976  7 bnep
ecdh_generic           24576  1 bluetooth
rfkill                 28672  6 bluetooth,thinkpad_acpi,cfg80211
crc16                  16384  2 bluetooth,ext4

The systemd Bluetooth service starts without error.
systemctl status bluetooth show:

● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-05-26 08:39:12 ADT; 1min 37s ago
     Docs: man:bluetoothd(8)
 Main PID: 2068 (bluetoothd)
   Status: "Running" 
    Tasks: 1 (limit: 4597)
   Memory: 824.0K
   CGroup: /system.slice/bluetooth.service
           └─2068 /usr/lib/bluetooth/bluetoothd

May 26 08:39:12 freelap systemd[1]: Starting Bluetooth service...
May 26 08:39:12 freelap bluetoothd[2068]: Bluetooth daemon 5.49
May 26 08:39:12 freelap systemd[1]: Started Bluetooth service.
May 26 08:39:12 freelap bluetoothd[2068]: Starting SDP server
May 26 08:39:12 freelap bluetoothd[2068]: Bluetooth management interface 1.14 initialized

The situation with the BT adapter built into my X200 (usually deactivated by default as it is ancient)
is exactly the same save for the fact that is does get enumerated by rfkill.

I will post that below if requested as it requires a reboot and tweaking on the bios setting to activate that BT controller.


Related issues

Related to Packages - Bug #1826: Bluetooth broken with new linux-libre kernel releases.not-a-bug

Actions

History

#1

Updated by bill-auger almost 6 years ago

  • Related to Bug #1826: Bluetooth broken with new linux-libre kernel releases. added
#2

Updated by freemor almost 6 years ago

With a another kernel update today (to 4.16.13-gnu-1) I did some more digging.
Things are basically the same , that being no functional Bluetooth (when it did function in the past)

Now Bluetooth modules do not load at boot
there seem to be missing bluetooth modules most noteably: btusb
btintel is also missing but i'm not sure if that is fully free or not but with btusb missing the fact that btbcm is there doesn't mean much if it's a usb bluetooth dongle.

Perhaps this is a libre-firmware issue?

I tried rebuilding linux-libre-firmware thinking that prehaps it needed a rebuild against the latest kernel to fix the BT problem
made no difference. So Guess it isn't linux-libre-firmware issue unless it should be building the bluetooth modules and is not.

#3

Updated by freemor almost 6 years ago

Rebuilt 4.16.13-gnu-1 last night re-enabling CONFIG_BT_HCIBTUSB and my bluetooth is alive and will.. Going to re do the process to make sure that is the only change needed.. It was quite late so I just want to be sure of my work. But this definitely looks like someone ooopsed a bit probably while trying to remove non-free stuff.

#4

Updated by freemor almost 6 years ago

Rebuilt a second time being sure that I only changed CONFIG_BT_HCIBTUSB in config.x86_64. It ask about a couple of other modules that BTUSB depends on. I was as conservative as possible with my responses.

And my bluetooth is up and running as it always has with free software (parabola, Trisquel) before this issue arose.

At this point people more Guru then myself with kernel/freedom issues will have to take a look to figure out why CONFIG_BT_HCIBTUSB was disabled. If it is a freedom Issue I'd suggest a news item on https://parabola.nu explaining to people why their freedom respecting BT dongles no longer work. If not a freedom issue I think it would be greatly appreciate is this was toggled back on to return the proper functioning of Bluetooth in Parabola.

#5

Updated by bill-auger almost 6 years ago

  • Assignee set to Megver83

it looks like youve done some great trouble-shooting work here - i will assign this to megver to see what he thinks - he is the parabola kernel expert

#6

Updated by Megver83 almost 6 years ago

  • Subject changed from kernel 4.16.11-gnu-1 causes bluetooth no to work to kernel 4.16.9-gnu-1 causes bluetooth no to work

This change happened in 4.16.9
https://git.parabola.nu/abslibre.git/commit/libre/linux-libre/config.x86_64?id=32075365db8f176f61a8838926899ed71edfc600

The thing is that I used an script (that I made) to remove most of the blobbed configs, which are useless in Parabola and only slow the compilation (e.g. iwlwifi, intel and amd microcode, etc)
https://git.parabola.nu/~megver83/deblob-config.git/
https://git.parabola.nu/~megver83/deblob-config.git/tree/versions/4.16?id=9cb0e0104ce5d9247a08ff4b8e43598daa8ca5d5#n11
https://libreplanet.org/wiki/LinuxLibre:Devices_that_require_non-free_firmware

However, even some deblobbed files also load free stuff, so that's why I might have disabled it without noticing it was also needed by free bluetooth devices (although I feared that). So this is not a freedom issue, don't worry.

Users tend to confuse firmware errors with linux-libre-firmware, but it is rarely related to it. This is similar to what happened here -> https://labs.parabola.nu/issues/1809

I'll re-enable that CONFIG line in the next update, and remove it from deblob-config.

#7

Updated by Megver83 almost 6 years ago

Applied the change to deblob-config
https://git.parabola.nu/~megver83/deblob-config.git/commit/?id=1d6481c916175204a7f6cb340a3ce4bc7146c396

When the kernels get the update, freemor please test it and tell me if it works so I can close this issue

#8

Updated by Megver83 almost 6 years ago

  • % Done changed from 0 to 50
#9

Updated by Megver83 almost 6 years ago

  • % Done changed from 50 to 100
  • Status changed from open to fixed

Also available in: Atom PDF