Bluetooth works when it feels like it

I’m trying to debug an issue where my Bluetooth mouse only works when it feels like it during a reboot or on a cold boot. I’m on a Thinkpad T495. My mouse might work, might not. What’s going on here?

I followed the EndeavourOS Bluetooth wiki page.
in /etc/bluetooth/main.conf , AutoEnable=true is enabled

bluetoothctl, rfkill, and lsmod

[fx9@fx9-thinkpad ~]$ sudo bluetoothctl
Agent registered
[bluetooth]# scan on
No default controller available

[fx9@fx9-thinkpad ~]$ rfkill list
0: tpacpi_bluetooth_sw: Bluetooth
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no

[fx9@fx9-thinkpad ~]$ lsmod|grep -i blue
bluetooth             933888  48 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
ecdh_generic           16384  2 bluetooth
rfkill                 36864  9 iwlmvm,bluetooth,thinkpad_acpi,cfg80211
crc16                  16384  2 bluetooth,ext4

Bluetooth service seems to be working

[fx9@fx9-thinkpad ~]$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2022-05-31 01:41:20 EDT; 29min ago
       Docs: man:bluetoothd(8)
   Main PID: 417 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 16654)
     Memory: 2.4M
        CPU: 3.061s
     CGroup: /system.slice/bluetooth.service
             └─417 /usr/lib/bluetooth/bluetoothd

May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSink/sbc
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/sbc
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSink/sbc_xq
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/sbc_xq
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/aptx_ll_1
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/aptx_ll_0
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/faststream
May 31 01:52:13 fx9-thinkpad bluetoothd[417]: Endpoint registered: sender=:1.41 path=/MediaEndpoint/A2DPSource/faststream_duplex

Dmesg error, something failed

[fx9@fx9-thinkpad ~]$ sudo dmesg |grep Blue
[    1.737865] Bluetooth: Core ver 2.22
[    1.737990] Bluetooth: HCI device and connection manager initialized
[    1.737998] Bluetooth: HCI socket layer initialized
[    1.738002] Bluetooth: L2CAP socket layer initialized
[    1.738011] Bluetooth: SCO socket layer initialized
[    1.854829] Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
[    1.860096] Bluetooth: hci0: Device revision is 2
[    1.860107] Bluetooth: hci0: Secure boot is enabled
[    1.860108] Bluetooth: hci0: OTP lock is enabled
[    1.860110] Bluetooth: hci0: API lock is enabled
[    1.860112] Bluetooth: hci0: Debug lock is disabled
[    1.860114] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
[    1.935153] Bluetooth: hci0: Found device firmware: intel/ibt-18-16-1.sfi
[    1.935284] Bluetooth: hci0: Boot Address: 0x40800
[    1.935287] Bluetooth: hci0: Firmware Version: 214-6.22
[    2.383523] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.383536] Bluetooth: BNEP filters: protocol multicast
[    2.383548] Bluetooth: BNEP socket layer initialized
[    3.237282] Bluetooth: hci0: Waiting for firmware download to complete
[    3.237777] Bluetooth: hci0: Firmware loading failed
[    3.241813] Bluetooth: hci0: MSFT supported features length mismatch

lsusb

[fx9@fx9-thinkpad ~]$ lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 005: ID 06cb:00bd Synaptics, Inc. Prometheus MIS Touch Fingerprint Reader
Bus 004 Device 004: ID 13d3:56a6 IMC Networks Integrated Camera
Bus 004 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 004 Device 006: ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lspci if this helps

[fx9@fx9-thinkpad ~]$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.6 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
02:00.0 Non-Volatile memory controller: SK hynix Gold P31 SSD
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0e)
03:00.1 Serial controller: Realtek Semiconductor Co., Ltd. RTL8111xP UART #1 (rev 0e)
03:00.2 Serial controller: Realtek Semiconductor Co., Ltd. RTL8111xP UART #2 (rev 0e)
03:00.3 IPMI Interface: Realtek Semiconductor Co., Ltd. RTL8111xP IPMI interface (rev 0e)
03:00.4 USB controller: Realtek Semiconductor Co., Ltd. RTL811x EHCI host controller (rev 0e)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] (rev d1)
06:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
06:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
06:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
06:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
06:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
06:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller

Could you post the link that you will find in the output of the following command:
inxi -FAZ --no-host | eos-sendlog

Did you try another kernel?

output of inxi
https://clbin.com/i4kTn

pasted here for convenience

System:
  Kernel: 5.18.1-zen1-1-zen arch: x86_64 bits: 64 Desktop: i3 v: 4.20.1
    Distro: EndeavourOS
Machine:
  Type: Laptop System: LENOVO product: 20NJ0008US v: ThinkPad T495
    serial: <superuser required>
  Mobo: LENOVO model: 20NJ0008US serial: <superuser required> UEFI: LENOVO
    v: R12ET50W(1.20 ) date: 02/19/2020
Battery:
  ID-1: BAT0 charge: 52.1 Wh (99.6%) condition: 52.3/50.0 Wh (104.5%)
CPU:
  Info: quad core model: AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx
    bits: 64 type: MT MCP cache: L2: 2 MiB
  Speed (MHz): avg: 1258 min/max: 1400/2300 cores: 1: 1217 2: 1218 3: 1349
    4: 1222 5: 1222 6: 1222 7: 1254 8: 1361
Graphics:
  Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel
  Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.3 driver: X: loaded: amdgpu
    unloaded: modesetting gpu: amdgpu resolution: 1920x1080~60Hz
  OpenGL: renderer: AMD Radeon Vega 10 Graphics (raven LLVM 13.0.1 DRM 3.46
  5.18.1-zen1-1-zen)
    v: 4.6 Mesa 22.1.0
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: snd_pci_acp3x
  Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.18.1-zen1-1-zen running: yes
  Sound Server-2: PipeWire v: 0.3.51 running: yes
Network:
  Device-1: Intel Wireless-AC 9260 driver: iwlwifi
  IF: wlan0 state: up mac: 54:8d:5a:94:2d:3e
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp3s0f0 state: down mac: 00:2b:67:07:f5:62
  Device-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp4s0 state: down mac: 00:2b:67:07:f5:61
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb
  Report: bt-adapter ID: hci0 state: up address: N/A
Drives:
  Local Storage: total: 465.76 GiB used: 22.88 GiB (4.9%)
  ID-1: /dev/nvme0n1 vendor: Smart Modular Tech. model: SHGP31-500GM
    size: 465.76 GiB
Partition:
  ID-1: / size: 442.32 GiB used: 22.88 GiB (5.2%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 296 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: partition size: 15 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p3
Sensors:
  System Temperatures: cpu: 38.0 C mobo: N/A gpu: amdgpu temp: 38.0 C
  Fan Speeds (RPM): fan-1: 0 fan-2: 0
Info:
  Processes: 247 Uptime: 0m Memory: 13.64 GiB used: 1.31 GiB (9.6%)
  Shell: Bash inxi: 3.3.16

I have not yet tried another kernel but I will try the regular and lts.
EDIT: Tried the regular kernel, and has the same problem.

The LTS kernel?

What is the output of systemctl status bluetooth.service when bluetooth is failing?

I would also suggest to look if there is a BIOS update for your device.

This is the output of bluetooth service when its failing

[fx9@fx9-thinkpad ~]$ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2022-05-31 10:25:27 EDT; 18min ago
       Docs: man:bluetoothd(8)
   Main PID: 416 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 16656)
     Memory: 2.0M
        CPU: 53ms
     CGroup: /system.slice/bluetooth.service
             └─416 /usr/lib/bluetooth/bluetoothd

May 31 10:25:27 fx9-thinkpad systemd[1]: Starting Bluetooth service...
May 31 10:25:27 fx9-thinkpad bluetoothd[416]: Bluetooth daemon 5.64
May 31 10:25:27 fx9-thinkpad bluetoothd[416]: Starting SDP server
May 31 10:25:27 fx9-thinkpad systemd[1]: Started Bluetooth service.
May 31 10:25:27 fx9-thinkpad bluetoothd[416]: Bluetooth management interface 1.22 initialized

I would flash the latest BIOS and try the LTS kernel and if that doesn’t help wait for someone with more knowledge than me that can actually help you…Consider my effort to trying to keep your thread alive.

2 Likes

Thank you, I appreciate any help I can get :smiley:

1 Like

So far LTS doesn’t look like it has this issue. I can’t seem to track it down but it does seem like a regression to me on the main kernel and zen kernel. I also can’t reliably produce the failing scenario.

1 Like

Maybe with the next point release of kernel 5.18 all is well again. Those regressions happen some times, fortunately not too often.

do you happen to also have windows installed and ever boot into it?

No windows installed on this machine. I don’t ever want to run it.

ok then its not windows deciding to claim the device

I had something similar happen because i had to use my windows usb drive to flash firmware onto one of my mobo sensor chips. After leaving windows the BT wouldnt work at times because Windows still had the device claimed and i had to boot back in, disable fastboot,etc. and THEN shut down to release it x|