Problem summary:
My laptop's bluetooth randomly cuts out while I'm using it, and after that it states "No bluetooth found; plug in a dongle to use bluetooth".
Q: could it be the hardware?
I am pretty sure that it's not a hardware issue as this hasn't happened before in Windows (I dual-boot ubuntu and windows).
Q: Does bluetooth actually work?
Restarting the computer usually restores bluetooth, and I'm able to connect and use my bluetooth mouse, although it'll usually cut out a short time afterwards.
Computer info
My computer is an HP Spectre x360 Convertible 15-bl1XX (Z4Z38UA#ABA)
and full product information is listed below.
Output of sudo lshw | grep product
product: HP Spectre x360 Convertible 15-bl1XX (Z4Z38UA#ABA)
product: 827F
product: HP26D4S9S8MH-8
product: HP26D4S9S8MH-8
product: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
product: Intel Corporation
product: Intel Corporation
product: Skylake Processor Thermal Subsystem
product: Intel Corporation
product: Sunrise Point-LP USB 3.0 xHCI Controller
product: Sunrise Point-LP Thermal subsystem
product: Sunrise Point-LP Serial IO I2C Controller #0
product: Sunrise Point-LP CSME HECI #1
product: Intel Corporation
product: NVIDIA Corporation
product: Sunrise Point-LP PCI Express Root Port #5
product: Sunrise Point-LP PCI Express Root Port #7
product: Wireless 8265 / 8275
product: Sunrise Point-LP PCI Express Root Port #8
product: RTS525A PCI Express Card Reader
product: Sunrise Point-LP PCI Express Root Port #9
product: NVMe SSD Controller SM961/PM961
product: Intel Corporation
product: Sunrise Point-LP PMC
product: Intel Corporation
product: Sunrise Point-LP SMBus
product: KB06079XL
Output of lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 142
Model name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Stepping: 10
CPU MHz: 800.052
CPU max MHz: 4000.0000
CPU min MHz: 400.0000
BogoMIPS: 3984.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
Output of lspci -knn | grep Net -A3; lsusb
3b:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275
[8086:24fd] (rev 78)
Subsystem: Intel Corporation Wireless 8265 / 8275 [8086:1010]
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 002: ID 064e:3401 Suyin Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I'm currently running Ubuntu 18.04.
Best Answer
Update Your Kernel
linux-image-generic
version4.15.0-46.49
and newer contain the fix. Changelog excerpt:The
linux-image-generic
fix was made available for these Ubuntu releases:4.17.0-7.8
and newer4.15.0-46.49
and newer4.4.0-136.162
and newerTo see what version of
linux-image-generic
you have and what versions are available to you, run these commands:If you have a candidate with the fix to which you can update, just run an upgrade like so:
Install the
linux-oem
KernelAlternatively, you can try switching to the
linux-oem
kernel, which received the fix months earlier than thelinux-image-generic
branch did:On 20 July 2018,
linux-oem
version 4.15.0-1012.15 was published to thebionic-security
andbionic-updates
repo. It included these changes from version 4.15.0-1010.13:The last patch in that list should fix the problem of Bluetooth randomly cutting out (as well as the camera and fingerprint scanner, if you have those).
The xHCI bugfix hasn't been applied to the main kernel yet at the time of writing, so
linux-oem
is the only packaged Ubuntu kernel release that has the fix.For tracking information on this bug, see the "Resources" section at the bottom of this answer.
Hack: Restore Bluetooth without Rebooting
If you would rather wait for a fix to be backported to the generic Ubuntu kernel, you can run this hack whenever Bluetooth cuts out.
Your laptop's camera, fingerprint reader, and Bluetooth controller will quickly reconnect after running this command (both lines):
Note: Make sure that
0000:00:14.0
is actually the xHCI controller before running the first command. You can find the slot with this command:lspci -k | grep -B2 xhci
Explanation
This is a Band-Aid and does not fix the root cause. For bug tracking and external discussion, see the "Resources" section at the bottom of this answer.
Here's how the bug runs:
Problem Start
A bug in the
xhci_hcd
driver convinces it that the xHCI host controller stopped responding. As a result, it disconnects all the devices connected to the controller:(From
/var/log/syslog
)Removal of xHCI Controller
Running
echo 1 | sudo tee /sys/bus/pci/devices/0000:00:14.0/remove
hot-removes the xHCI controller PCI device:(From
/var/log/syslog
)Restoring the xHCI Controller
Running
echo 1 | sudo tee /sys/bus/pci/rescan
rediscovers the PCI device we just removed. Thexhci_hcd
driver sees the rediscovered PCI device as a new USB bus and sets up the bus and its devices:(From
/var/log/syslog
)As a result, the
xhci_hcd
driver rediscovers the attached camera, fingerprint reader, and Bluetooth controller.Resources
Kernel 4.17.10 changelog
xhci hangs; reset results in NULL pointer dereference
Keyboard/Mouse devices are disconnecting after some time or event (capslock, ) - unknown main item tag 0x0
Enabling USB (auto)suspend (power control) for xHCI controllers incurs random device failures since kernel 4.15
xHCI host controller not responding, assume dead