MT7921 Mediatek (PCI Express) Bluetooth Issue - failed to get device id

Hey everyone,

Hope you can help me understand how I can get over this issue.

Summary (more details below)

  • Installed Manjaro Sway in June this year
  • Bluetooth didn’t automatically work, but started to once I connected to a wifi network
  • Since then and when rebooting/startup after shutdown, Bluetooth controller was sometimes but not always ‘found’. It therefore worked now and again.
  • A few reboots and it ‘appeared’ and could connect to Bluetooth devices
  • Installed latest firmware didn’t resolve that particular issue, but did make a difference
  • Upgraded to latest kernel has possibly taken me closer to a solution (as showing a different issue), it is still not functioning as expected.

Details

Hardware/System Info:

  • MinisForum UM773 Lite
  • AMD Ryzen 7 7735HS with Radeon Graphics (16) @ 4.829GHz
  • AMD ATI Radeon 680M
  • MT7921 Mediatek (PCI Express) - combo card, wifi and bluetooth
  • Kernel: 6.10.0-3-MANJARO
  • Sway v: 1.9
  • Display: wayland
  • Server: Xwayland v: 24.1.1
  • Compositor: Sway v: 1.9
Further system info
System:
  Host: mini-z Kernel: 6.10.0-3-MANJARO arch: x86_64 bits: 64
  Desktop: Sway v: 1.9 Distro: Manjaro Linux
Machine:
  Type: Desktop System: Micro (HK) Tech product: Venus series v: Version 1.0
    serial: MY046VU73LEDMHD00086
  Mobo: Shenzhen Meigao Equipment model: F7BFD v: Version 1.0
    serial: K7BFD773552A1162425 UEFI: American Megatrends LLC. v: 1.15
    date: 11/30/2023
CPU:
  Info: 8-core model: AMD Ryzen 7 7735HS with Radeon Graphics bits: 64
    type: MT MCP cache: L2: 4 MiB
  Speed (MHz): avg: 400 min/max: 400/4829 cores: 1: 400 2: 400 3: 400 4: 400
    5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400 13: 400 14: 400
    15: 400 16: 400
Graphics:
  Device-1: AMD Rembrandt [Radeon 680M] driver: amdgpu v: kernel
  Display: wayland server: Xwayland v: 24.1.1 compositor: Sway v: 1.9
    driver: gpu: amdgpu resolution: 1: 2560x1440 2: 2560x1440
  API: EGL Message: EGL data requires eglinfo. Check --recommends.

Network:
  Device-1: Intel Ethernet I226-V driver: igc
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: 58:47:ca:73:c5:be
  Device-2: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e
  IF: wlp2s0 state: up mac: 4c:24:ce:a2:78:dd
  IF-ID-1: tailscale0 state: unknown speed: -1 duplex: full mac: N/A
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb type: USB
  Report: btmgmt ID: hci0 state: up address: N/A

Current CLI Outputs:

sudo dmesg | grep -i bluetooth                                                                                                               
[    4.971514] Bluetooth: Core ver 2.22
[    4.971537] NET: Registered PF_BLUETOOTH protocol family
[    4.971539] Bluetooth: HCI device and connection manager initialized
[    4.971542] Bluetooth: HCI socket layer initialized
[    4.971545] Bluetooth: L2CAP socket layer initialized
[    4.971550] Bluetooth: SCO socket layer initialized
[    5.177223] Bluetooth: hci0: Failed to get device id (-108)
[    5.177230] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[    6.017911] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    6.017916] Bluetooth: BNEP filters: protocol multicast
[    6.017921] Bluetooth: BNEP socket layer initialized
sudo systemctl status bluetooth is running
sudo systemctl status bluetooth                                       

● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: disabled)
     Active: active (running) since Mon 2024-07-29 15:46:58 BST; 10s ago
 Invocation: 4a708a0548e24dc6a6ae5cb9f9cac410
       Docs: man:bluetoothd(8)
   Main PID: 26576 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 35743)
     Memory: 640K (peak: 2M)
        CPU: 25ms
     CGroup: /system.slice/bluetooth.service
             └─26576 /usr/lib/bluetooth/bluetoothd

Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support bap plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support bass plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support mcp plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support vcp plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support micp plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support ccp plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support csip plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: src/plugin.c:init_plugin() System does not support asha plugin
Jul 29 15:46:58 mini-z bluetoothd[26576]: Bluetooth management interface 1.22 initialized
various lsmod outputs
lsmod | grep 'blue'

bluetooth            1101824  15 btrtl,btmtk,btintel,btbcm,bnep,btusb
crc16                  12288  1 bluetooth
rfkill                 40960  11 bluetooth,cfg80211
 lsmod | grep 'btusb'

btusb                  86016  0
btrtl                  32768  1 btusb
btintel                65536  1 btusb
btbcm                  24576  1 btusb
btmtk                  12288  1 btusb
bluetooth            1101824  15 btrtl,btmtk,btintel,btbcm,bnep,btusb
modinfo mt7921e output
modinfo mt7921e                                                                                                                       
filename:       /lib/modules/6.10.0-3-MANJARO/kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko.zst
license:        Dual BSD/GPL
description:    MediaTek MT7921E (PCIe) wireless driver
author:         Lorenzo Bianconi <lorenzo@kernel.org>
author:         Sean Wang <sean.wang@mediatek.com>
firmware:       mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin
firmware:       mediatek/WIFI_RAM_CODE_MT7922_1.bin
firmware:       mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin
firmware:       mediatek/WIFI_RAM_CODE_MT7961_1.bin
firmware:       mediatek/WIFI_MT7961_patch_mcu_1a_2_hdr.bin
firmware:       mediatek/WIFI_RAM_CODE_MT7961_1a.bin
srcversion:     48C810CFE61740353D41152
alias:          pci:v000014C3d00007920sv*sd*bc*sc*i*
alias:          pci:v000014C3d00000616sv*sd*bc*sc*i*
alias:          pci:v000014C3d00000608sv*sd*bc*sc*i*
alias:          pci:v00000B48d00007922sv*sd*bc*sc*i*
alias:          pci:v000014C3d00007922sv*sd*bc*sc*i*
alias:          pci:v000014C3d00007961sv*sd*bc*sc*i*
depends:        mt76-connac-lib,mt7921-common,mt792x-lib,mt76
retpoline:      Y
intree:         Y
name:           mt7921e
vermagic:       6.10.0-3-MANJARO SMP preempt mod_unload 
sig_id:         PKCS#7
signer:         Build time autogenerated kernel key
sig_key:        55:36:BC:9C:E7:69:A0:C0:F6:79:1F:06:3E:B1:D9:6B:E3:E2:22:3E
sig_hashalgo:   sha512
signature:      30:65:02:30:20:C8:62:52:09:CD:4D:99:AB:7B:44:10:90:CB:AC:E0:
		FB:14:A2:E8:B4:C2:C9:BB:9B:E8:72:12:8E:08:1C:C7:6B:CB:8A:7D:
		28:04:84:6D:11:AB:2D:B7:DB:42:69:49:02:31:00:B7:B5:7C:A1:9A:
		96:01:C5:13:81:09:25:60:FA:09:87:7E:D9:93:9A:E1:D5:2F:BE:FB:
		52:EF:81:63:FC:78:2F:1A:6A:49:76:9C:63:D6:2B:2D:60:B5:A9:05:
		BC:31:FF
parm:           disable_aspm:disable PCI ASPM support (bool)

History/Actions taken

  1. Fresh Manjaro Sway install in June this year.
    1. Kernel was 6.6.40 at that time
    2. Bluetooth icon in the waybar was showing ‘no-controller’.
    3. Google searched that the wifi needed to be connected to ‘enable’ bluetooth. Connected to a wifi network.
    4. That partially solved the issue
    5. ‘no-adaptor’ would then return when starting up the computer.
    6. A sudo systemctl stop/start bluetooth.service and then a reboot, would make bluetooth work again.
    7. Rinse and repeat
  2. Large update 24th July
    1. Some 380 odd packages required updating
    2. Usual sudo pacman -Syu carried out
    3. Rebooted and no bluetooth
    4. Rinsed and repeated the above, step one process, no luck, no adaptor, no workaround
    5. At the time, this was the output from dmesg:
    6. `[ 4.774031] Bluetooth: hci0: Wrong op received 6 expected 1
    7. `[ 4.774034] Bluetooth: hci0: Failed to send wmt patch dwnld (-5)
    8. [ 4.774053] Bluetooth: hci0: Failed to set up firmware (-5)
  3. Further Google research brought up that there have been similar and different issues with Mediatek cards on various distros
    1. Arch [SOLVED] Bluetoothctl - No default controller available / Newbie Corner / Arch Linux Forums
    2. Framework [RESPONDED] Yet more Mediatek issues on AMD/Linux - Linux - Framework Community
    3. Mint https://forums.linuxmint.com/viewtopic.php?t=424823
    4. Going back, Reddit https://www.reddit.com/r/linuxhardware/comments/nyt3jo/im_calling_you_out_mediatek_mt7961/
  4. Checked out Manjaro forum posts for anymore hints
    1. Bluetooth stopped working after Plasma 6 update
    2. Bluetooth Device Not Being Detected - #13 by Zero33
  5. I was still on kernel 6.6.40, so I installed and tried the following kernels:
    1. 6.8.12-3
    2. 6.9.9-1
    3. 6.10.0-3
    4. With all kernels, dmesg still outputted [ 4.774053] Bluetooth: hci0: Failed to set up firmware (-5)
  6. Next to try was installing the latest firmware from here - mediatek - kernel/git/firmware/linux-firmware.git - Repository of firmware blobs for use with the Linux kernel
    1. New firmware installed:
      1. WIFI_MT7961_patch_mcu_1_2_hdr.bin
      2. WIFI_RAM_CODE_MT7961_1.bin
      3. BT_RAM_CODE_MT7961_1_2_hdr.bin
    2. Running kernel 6.10 and with this new firmware has resulted in the current CLI outputs (shown at the top), that seems to suggest the firmware has been recognised, but it fails to get the device id
    3. dmesg output currently = hci0: Failed to get device id (-108)

This is where I’ve hit a wall, as I’m not sure how to solve this issue as google searching is either going over my head or seems to be making me feel like I’m going round in circles.

I was thinking of rolling back to a timeshift snapshot in June, but I feel this is avoiding an opportunity.

So, any help or advice to head me down a path to potentially fix this, would be very much appreciated

Thank you for taking time to read this

1 Like

The problem, unfortunately, is that the drivers for Mediatek Wifi/BT cards are in general somewhat flaky. This is true on Windows as well - for example, the first Google search I get for MT7921 is MediaTek Wi-Fi 6 MT7921 Wireless LAN Card is a piece of junk. However, it’s especially true on Linux. As far as I can tell, there’s just not much testing happening on the Mediatek side before they push code out. That’s a big problem for rolling release distros.

I also had a problem on the on an MT7922 (not quite the same card as yours). The device worked fine under Ubuntu, but on Manjaro it took 65.535s to activate. My guess is that Ubuntu carries a patch that picks a version of the Mediatek driver that actually functions.

As far as solutions go, I’d actually recommend trying Ubuntu. As I said, I think Ubuntu has a patch that makes Mediatek work, so that may be a starting point for figuring out what the issue is / how to fix it. I will admit I took the easy route out: I replaced the module with an Intel AX210.

thanks for your thoughts @dgdg

This was my concern too with just general research, issues seem to be quite wide and varied, which never bodes too well.

Interesting and really good to know, as you say Ubuntu seemed to of found a sweet spot.

Its a fair point to suggest, but I’m not sure I can move back to Ubuntu, I’ve only just arrived here! :laughing:

I like that, good idea and probably not too difficult - definitely a option to fall back on :+1:

I just want to give this issue some more attempts to solve (if possible), as if the issues are that widespread, then some sort of solution (bit like Ubuntu) could help quite a lot of people as these cards seem to be in a lot of machines.

…I may still close this discussion with a picture of the Mediatek card in the bin of course…

As I said, Ubuntu might be the place to look at to know how to make it work. If it does work on Ubuntu, then there must be a reason for it!

1 Like