Bug 218472 - mt7921e bluetooth not working
Summary: mt7921e bluetooth not working
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: Other Linux
: P3 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-08 20:09 UTC by Chris
Modified: 2024-03-24 10:59 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Chris 2024-02-08 20:09:35 UTC
kernel: 
Linux geekom 6.7.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Feb 2024 22:07:49 +0000 x86_64 GNU/Linux

relevant part of lsusb -vt:

/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 046d:c313 Logitech, Inc. Internet 350 Keyboard
    |__ Port 001: Dev 002, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 046d:c313 Logitech, Inc. Internet 350 Keyboard
    |__ Port 003: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 003: Dev 003, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 003: Dev 003, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c52b Logitech, Inc. Unifying Receiver
    |__ Port 004: Dev 004, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 0461:4d0f Primax Electronics, Ltd HP Optical Mouse
    |__ Port 007: Dev 005, If 0, Class=Wireless, Driver=btusb, 480M
        ID 13d3:3585 IMC Networks 
    |__ Port 007: Dev 005, If 1, Class=Wireless, Driver=btusb, 480M
        ID 13d3:3585 IMC Networks 
    |__ Port 007: Dev 005, If 2, Class=Wireless, Driver=[none], 480M
        ID 13d3:3585 IMC Networks 
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub

dmesg | grep -i bluetooth:
[root@geekom ~]# dmesg | grep -i bluetooth
[    3.541061] Bluetooth: Core ver 2.22
[    3.541584] NET: Registered PF_BLUETOOTH protocol family
[    3.542350] Bluetooth: HCI device and connection manager initialized
[    3.543226] Bluetooth: HCI socket layer initialized
[    3.543725] Bluetooth: L2CAP socket layer initialized
[    3.544517] Bluetooth: SCO socket layer initialized
[    3.907303] Modules linked in: snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_generic_allocation soundwire_bus intel_tcc_cooling(-) x86_pkg_temp_thermal snd_soc_core intel_powerclamp mt7921e(+) coretemp snd_compress ac97_bus mt7921_common snd_pcm_dmaengine kvm_intel mt792x_lib snd_hda_intel mousedev(+) hid_logitech_dj(+) mt76_connac_lib kvm snd_intel_dspcfg mt76 snd_intel_sdw_acpi i915(+) irqbypass snd_hda_codec btusb mac80211 btrtl snd_hda_core processor_thermal_device_pci btintel drm_buddy processor_thermal_device snd_hwdep rapl i2c_algo_bit vfat processor_thermal_wt_hint btbcm snd_pcm spi_nor processor_thermal_rfim iTCO_wdt fat ttm btmtk libarc4 processor_thermal_rapl intel_pmc_bxt intel_rapl_msr intel_cstate mei_hdcp intel_rapl_common mei_pxp drm_display_helper ee1004 iTCO_vendor_support bluetooth snd_timer mtd processor_thermal_wt_req cfg80211 intel_uncore usbhid ecdh_generic mei_me i2c_i801 cec processor_thermal_power_floor wmi_bmof snd pcspkr
[    3.908310] Modules linked in: snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_generic_allocation soundwire_bus intel_tcc_cooling(-) x86_pkg_temp_thermal snd_soc_core intel_powerclamp mt7921e(+) coretemp snd_compress ac97_bus mt7921_common snd_pcm_dmaengine kvm_intel mt792x_lib snd_hda_intel mousedev(+) hid_logitech_dj(+) mt76_connac_lib kvm snd_intel_dspcfg mt76 snd_intel_sdw_acpi i915(+) irqbypass snd_hda_codec btusb mac80211 btrtl snd_hda_core processor_thermal_device_pci btintel drm_buddy processor_thermal_device snd_hwdep rapl i2c_algo_bit vfat processor_thermal_wt_hint btbcm snd_pcm spi_nor processor_thermal_rfim iTCO_wdt fat ttm btmtk libarc4 processor_thermal_rapl intel_pmc_bxt intel_rapl_msr intel_cstate mei_hdcp intel_rapl_common mei_pxp drm_display_helper ee1004 iTCO_vendor_support bluetooth snd_timer mtd processor_thermal_wt_req cfg80211 intel_uncore usbhid ecdh_generic mei_me i2c_i801 cec processor_thermal_power_floor wmi_bmof snd pcspkr
[    4.024112] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.024119] Bluetooth: BNEP filters: protocol multicast
[    4.024122] Bluetooth: BNEP socket layer initialized
[    5.703433] Bluetooth: hci0: Opcode 0x0c03 failed: -110

something that might be relevant:
[    3.966807] mt7921e 0000:56:00.0: HW/SW Version: 0x8a108a10, Build Time: 20231120183400a
[    3.982396] mt7921e 0000:56:00.0: WM Firmware Version: ____000000, Build Time: 20231120183441

I'm guessing the 'Opcode 0x0c03 failed' and 'Port 007: Dev 005, If 2, Class=Wireless, Driver=[none], 480M'   are to blame here?

I've done a lot of searching and troubleshooting, but couldn´t find anything about this particular device ID:  13d3:3585   

bluetoothctl  gives me:
[bluetooth]# list
[bluetooth]# 
any other command will give: "no default controller available".

systemd bluetooth.service is enabled.

Let me know if more info is needed (I don´t do this every day),  or if I should contact a maintainer directly.
Comment 1 Artem S. Tashkinov 2024-02-10 13:09:11 UTC
What's the output of `sudo rfkill`?
Comment 2 Chris 2024-02-10 13:34:47 UTC
(In reply to Artem S. Tashkinov from comment #1)
> What's the output of `sudo rfkill`?

[root@geekom ~]# rfkill
ID TYPE      DEVICE      SOFT      HARD
 0 bluetooth hci0   unblocked unblocked
 1 wlan      phy0   unblocked unblocked
Comment 3 Artem S. Tashkinov 2024-02-10 18:31:16 UTC
I have a similar/same device and it's working fine here.

Kernel 6.7.4 + latest firmware.

No idea what's going on.
Comment 4 Chris 2024-02-10 19:24:23 UTC
(In reply to Artem S. Tashkinov from comment #3)
> I have a similar/same device and it's working fine here.
> 
> Kernel 6.7.4 + latest firmware.
> 
> No idea what's going on.

Thank you for taking a look anyway. Which Linux + version are you using? Do you get the 'Opcode 0x0c03 failed' and 'Port 007: Dev 005, If 2, Class=Wireless, Driver=[none], 480M'  with the commands above?
Comment 5 Artem S. Tashkinov 2024-02-14 23:58:47 UTC
> Which Linux + version are you using? 

Your problem is solely with the kernel. It doesn't matter which distro I use (that's Fedora but I have/use my own kernel config).

> Do you get ...

Nope, nothing.



Using git log find the person(s) who contribute to/write this driver and send them all this info.

The way kernel bugzilla is set up, many respective developers never get a wind of what's being discussed here, so they are simply not aware.
Comment 6 jeremy 2024-02-24 11:52:53 UTC
You should post results from terminal for
sudo cat /sys/kernel/debug/usb/devices| awk '/3585/' RS=

The bluetooth devs usually want that info.  I am guessing that you will need a kernel patch similar to https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/drivers/bluetooth/btusb.c?id=f0ad26ee822b197f2421462df9c358a5687fddfd but it would be at about line 610 of btusb.c and be

	{ USB_DEVICE(0x13d3, 0x3585), .driver_info = BTUSB_MEDIATEK |
						     BTUSB_WIDEBAND_SPEECH |
						     BTUSB_VALID_LE_STATES },
Comment 7 Chris 2024-02-24 15:51:58 UTC
(In reply to jeremy from comment #6)
> You should post results from terminal for
> sudo cat /sys/kernel/debug/usb/devices| awk '/3585/' RS=
> 
> The bluetooth devs usually want that info.  I am guessing that you will need
> a kernel patch similar to
> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/
> commit/drivers/bluetooth/btusb.c?id=f0ad26ee822b197f2421462df9c358a5687fddfd
> but it would be at about line 610 of btusb.c and be
> 
>       { USB_DEVICE(0x13d3, 0x3585), .driver_info = BTUSB_MEDIATEK |
>                                                    BTUSB_WIDEBAND_SPEECH |
>                                                    BTUSB_VALID_LE_STATES },

Thanks Jeremy. I compiled btusb.c with that change and it works.
For completeness, here's the requested output of 
sudo cat /sys/kernel/debug/usb/devices| awk '/3585/' RS=

T:  Bus=03 Lev=01 Prnt=01 Port=06 Cnt=04 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=13d3 ProdID=3585 Rev= 1.00
S:  Manufacturer=MediaTek Inc.
S:  Product=Wireless_Device
S:  SerialNumber=000000000
C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
I:  If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us

Note You need to log in before you can comment on or make changes to this bug.