Page MenuHomeSolus

Bluetooth adapter stopped working after upgrade to 4.14 kernel
Open, Unbreak Now!Public

Description

Just upgraded my laptop to 4.14 kernel from 4.13. My bluetooth mouse don't work anymore, I have high cpu usage and memory leak caused by systemd-udevd.

lsusb | grep Bluetooth
Bus 002 Device 010: ID 413c:8156 Dell Computer Corp. Wireless 370 Bluetooth Mini-card
Bus 002 Device 005: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
usb-devices | awk '/8156/' RS=
T:  Bus=02 Lev=03 Prnt=04 Port=02 Cnt=03 Dev#= 12 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=413c ProdID=8156 Rev=04.56
S:  Manufacturer=Dell Computer Corp
S:  Product=Dell Wireless 370 Bluetooth Mini-card
C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)

Log is getting filled with:

déc 09 21:28:12 dell-laptop systemd-udevd[399]: Process 'hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0' failed with exit code 1.
déc 09 21:28:12 dell-laptop upowerd[1890]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0

Current workaround :

1-Copy 97-hid2hci.rules: cp /usr/lib/udev/rules.d/97-hid2hci.rules /etc/udev/rules.d/

2- Remove those lines in /etc/udev/rules.d/97-hid2hci.rules:

ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", \
ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \
   RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1"

3- Reboot.

Now my bluetooth adaptor dont work but if I run the following command as root, bluetooth works and no more high cpu usage and memory leak :

/usr/lib/udev/hid2hci --method=dell --devpath=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0

error: switching device '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0' failed.
clauded created this task.Dec 10 2017, 3:04 AM
clauded updated the task description. (Show Details)Dec 10 2017, 3:31 AM
clauded updated the task description. (Show Details)Dec 10 2017, 3:48 AM
clauded updated the task description. (Show Details)Dec 10 2017, 3:55 AM
clauded added a comment.EditedDec 10 2017, 11:00 PM

I created an automated workaround but still don't understand why it fails in udev :

1- Copy 97-hid2hci.rules :

cp /usr/lib/udev/rules.d/97-hid2hci.rules /etc/udev/rules.d/

2- Remove those lines in /etc/udev/rules.d/97-hid2hci.rules :

ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", \
ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \
   RUN+="hid2hci --method=dell --devpath=%p", ENV{HID2HCI_SWITCH}="1"

3-Create /usr/sbin/dell-bluetooth and make it executable :

#!/bin/bash
DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0
HID2HCI_SWITCH=1
/usr/lib/udev/hid2hci --method=dell --devpath=$DEVPATH > /dev/null 2>&1
exit 0

4-Create /etc/systemd/user/dell-bluetooth.service :

[Unit]
Description=Fixes bluetooth on some Dell systems with Kernel 4.14 at boot

[Service]
Type=oneshot
ExecStart=/usr/sbin/dell-bluetooth
TimeoutSec=0
StandardOutput=syslog

[Install]
WantedBy=multi-user.target

5-Create /etc/systemd/user/dell-bluetooth-resume.service :

[Unit]
Description=Fixes bluetooth on some Dell systems with Kernel 4.14 at resume
After=suspend.target
#After=systemd-suspend.service systemd-hybrid-sleep.service systemd-hibernate.service

[Service]
Type=oneshot
ExecStart=/usr/sbin/dell-bluetooth
TimeoutSec=0
StandardOutput=syslog

[Install]
WantedBy=sleep.target

6- Enable those two services :

systemctl enable /etc/systemd/user/dell-bluetooth.service
systemctl enable /etc/systemd/user/dell-bluetooth-resume.service

7- Reboot (enjoy)

clauded edited projects, added Hardware; removed Lacks Project.Dec 12 2017, 2:36 AM
taaem added a subscriber: taaem.Dec 12 2017, 11:03 AM

Funny thing, bluetooth on my Dell only started to work after the update to 4.14, before it didn't work at all and would crash network-manager/gnome-control-center.

MJ added a subscriber: MJ.Dec 12 2017, 3:58 PM

Problem also reported on Manjaro with kernel 4.14 and 4.15.

ikey triaged this task as Unbreak Now! priority.May 6 2018, 10:47 AM
ikey claimed this task.
ikey added a subscriber: ikey.

This problem is plaguing all distros atm - need to fix today

Apparently I used two maniphest IDs in that change -_-

Solus Budgie
Kernel 4.16.7-66.current
Host: M15x A07 (Alienware/Dell)
CPU: Intel i5 M 540 (4) @ 2.528GHz
GPU: NVIDIA GeForce GTX 260M

ikey,
installed https://ring0.solus-project.com/unstable/b/bluez/bluez-5.48-22-1-x86_64.eopkg and rebooted as you requested.

peter@erma ~ $ sudo usysconf run -f
[✗] Reloading udev rules failed

This laptop does not have a Bluetooth device as running the app says: "No Bluetooth Found. Plug in a dongle to use bluetooth."
This is correct to my knowledge.
Main laptop, M15x A08, does have Bluetooth, which works but running Kernel 4.9.98-88.lts

OK I need this tested against current as that seems to be where the issue is. Need the sudo journalctl -ae after that usysconf failure too

Laptop with issue is running Kernel 4.16.7-66.current .
Here's my haste report: https://hastebin.com/evevovihog

FYI, I tested bluez 5.48-22 (and disabled my previous workaround) : log is filled with those errors :

mai 07 07:55:44 dell-laptop upowerd[773]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0
mai 07 07:55:44 dell-laptop upowerd[773]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6.2/2-1.6.2:1.0

So the patch is not working on my system.

JoshStrobl reassigned this task from ikey to DataDrake.Sat, Feb 9, 8:20 PM