Bluetooth only starts sometimes

I was using manjaro before EOS and bluetooth always worked, I switched from the latest kernel (6.6.x) to the LTS one but I still cannot get it to be ready at boot, if it does not load correctly at boot I’m not able to use it.
My laptop is a lenovo legion and I’m dual booting windows, fast boot should be off and I tried turning off bluetooth before shutting down windows and then starting EOS but nothing changed.

https://0x0.st/H6qh.txt

dmesg

[    3.548049] usbcore: registered new interface driver usbhid
[    3.548050] usbhid: USB HID core driver
[    3.568679] hub 4-2:1.0: USB hub found
[    3.571020] hub 4-2:1.0: 3 ports detected
[    3.657156] usb 3-3: new high-speed USB device number 3 using xhci_hcd
[    3.800959] usb 3-3: New USB device found, idVendor=0489, idProduct=e0d8, bcdDevice= 1.00
[    3.800964] usb 3-3: New USB device strings: Mfr=5, Product=6, SerialNumber=7
[    3.800966] usb 3-3: Product: Wireless_Device
[    3.800968] usb 3-3: Manufacturer: MediaTek Inc.
[    3.800970] usb 3-3: SerialNumber: 000000000
[    3.870856] usb 3-2.1: new full-speed USB device number 4 using xhci_hcd
[    3.952445] Bluetooth: Core ver 2.22
[    3.952459] NET: Registered PF_BLUETOOTH protocol family
[    3.952460] Bluetooth: HCI device and connection manager initialized
[    3.952462] Bluetooth: HCI socket layer initialized
[    3.952463] Bluetooth: L2CAP socket layer initialized
[    3.952465] Bluetooth: SCO socket layer initialized
[    3.963009] usbcore: registered new interface driver btusb
[    3.964095] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin failed with error -2
[    3.964097] Bluetooth: hci0: Failed to load firmware file (-2)
[    3.964098] Bluetooth: hci0: Failed to set up firmware (-2)
[    3.964098] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[    4.611718] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.611720] Bluetooth: BNEP filters: protocol multicast
[    4.611724] Bluetooth: BNEP socket layer initialized
[    4.632990] nvidia-uvm: Loaded the UVM driver, major

various info

nebula-voyager ॐ  ~:
369 ◯  sudo ls /lib/firmware/mediatek/BT_RAM_CODE_MT79*
/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.zst  /lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.zst
nebula-voyager ॐ  ~:
370 ◯  uname -a
Linux nebula-voyager 6.1.70-1-lts #1 SMP PREEMPT_DYNAMIC Mon, 01 Jan 2024 13:44:01 +0000 x86_64 GNU/Linux
nebula-voyager ॐ  ~:
373 ◯  sudo systemctl status bluetooth 
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-01-02 12:56:54 CET; 16min ago
       Docs: man:bluetoothd(8)
   Main PID: 831 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 37391)
     Memory: 2.3M (peak: 2.5M)
        CPU: 17ms
     CGroup: /system.slice/bluetooth.service
             └─831 /usr/lib/bluetooth/bluetoothd

gen 02 12:56:54 nebula-voyager bluetoothd[831]: Starting SDP server
gen 02 12:56:54 nebula-voyager bluetoothd[831]: src/plugin.c:plugin_init() System does not support csip plugin
gen 02 12:56:54 nebula-voyager bluetoothd[831]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
gen 02 12:56:54 nebula-voyager bluetoothd[831]: src/plugin.c:plugin_init() System does not support micp plugin
gen 02 12:56:54 nebula-voyager bluetoothd[831]: src/plugin.c:plugin_init() System does not support vcp plugin
gen 02 12:56:54 nebula-voyager bluetoothd[831]: src/plugin.c:plugin_init() System does not support mcp plugin
gen 02 12:56:54 nebula-voyager bluetoothd[831]: src/plugin.c:plugin_init() System does not support bass plugin
gen 02 12:56:54 nebula-voyager bluetoothd[831]: src/plugin.c:plugin_init() System does not support bap plugin
gen 02 12:56:54 nebula-voyager bluetoothd[831]: Bluetooth management interface 1.22 initialized
gen 02 12:56:54 nebula-voyager systemd[1]: Started Bluetooth service.
nebula-voyager ॐ  ~:
374 ◯  lsmod | grep -i blue
bluetooth             937984  15 btrtl,btmtk,btintel,btbcm,bnep,btusb
ecdh_generic           16384  1 bluetooth
rfkill                 36864  8 bluetooth,ideapad_laptop,cfg80211
crc16                  16384  2 bluetooth,ext4
nebula-voyager ॐ  ~:
381 ◯  sudo /usr/lib/bluetooth/bluetoothd -n -d 
bluetoothd[4968]: Bluetooth daemon 5.71
bluetoothd[4968]: src/main.c:parse_config() parsing /etc/bluetooth/main.conf
D-Bus setup failed: Name already in use
bluetoothd[4968]: src/main.c:main() Unable to get on D-Bus
nebula-voyager ॐ  ~:
388 ◯  ps aux | grep blue
user        1152  0.0  0.0  49124  8576 ?        Ss   12:57   0:00 /usr/lib/bluetooth/obexd
root        5308  0.0  0.0  12084  5292 ?        Ss   13:24   0:00 /usr/lib/bluetooth/bluetoothd
nebula-voyager ॐ  ~:
389 ◯  rfkill list 
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: ideapad_wlan: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
2: ideapad_bluetooth: Bluetooth
        Soft blocked: no
        Hard blocked: no
3: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no

bluetoothctl outputs No default controller available

There is fast boot in the Bios and then there is the fast startup feature in Windows that is under power management. You need to make sure the Windows fast startup feature is the one turned off.

Yes I got confused, that is also off. Another strange thing I noticed is that bluetooth always work if instead of booting the standard kernel I start the fallback version

Maybe it will fix itself with a new kernel update. :thinking: Looks like you have the latest UEFI Bios.

Yes, I updated the bios to see if it got solved but it didn’t. Since bluetooth always works with the fallback kernel I’m guessing it could be something related to this answer/post but I don’t know how to proceed from this. Considering I also had this issue with kernel 6.6 I’d rather mess with the system to try and load what’s needed ;p

EDIT: I also tried to add hostonly to dracut and regenerate the images but it did not work

After some more tests it seems like that driver should not be loaded and is causing the issue, rebuilding the image with dracut -f --omit bluetooth --regenerate-all makes it work (tested after a reboot and a cold boot) without using the failover kernel, which now seems to fail to use bt. The generic btusb driver seems ok.

487 ◯  modinfo btusb
filename:       /lib/modules/6.1.71-1-lts/kernel/drivers/bluetooth/btusb.ko.zst
license:        GPL
version:        0.8
description:    Generic Bluetooth USB driver ver 0.8
author:         Marcel Holtmann <marcel@holtmann.org>
srcversion:     DBCB64399B307EFBEC40F85

487 ◯  inxi --bluetooth
Bluetooth:
  Device-1: Foxconn / Hon Hai Bluetooth Adapter driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: XX bt-v: 5.2

I may also try to manually reinstall the drivers

References:

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek