MediaTek Bluetooth device not working

Bluetooth is not function with openSUSE TUMBLEWEED, but did work in windows 10.
Laptop: ASUS TUF GAMING F15 FX506LH
Some information from win10:


MediaTek Bluetooth Adapter
hardware id
USB\VID_13D3&PID_3563&REV_0100&MI_00
USB\VID_13D3&PID_3563&MI_00
drivers
C:\WINDOWS\system32\DRIVERS\BT_RAM_CODE_MT7961_1_2_hdr.bin
C:\WINDOWS\system32\DRIVERS\bthport.sys
C:\WINDOWS\system32\DRIVERS\BTHUSB.SYS
C:\WINDOWS\system32\DRIVERS\mtkbt0.dat
C:\WINDOWS\system32\DRIVERS\mtkbtfilterx.sys

I use KDE desktop, the bluetooth icon in systray is always grey.
Click on the icon shows no device.
In system settings → Bluetooth, shows :Bluetooth is disabled,and click on “Enable” never works.
Some info:

ray@LAPTOP-E83P4N41:~> uname -a
Linux LAPTOP-E83P4N41 5.12.13-1-default #1 SMP Mon Jun 28 06:37:23 UTC 2021 (74bd8c0) x86_64 x86_64 x86_64 GNU/Linux

ray@LAPTOP-E83P4N41:~> lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 322e:202c Sonix Technology Co., Ltd. USB2.0 HD UVC WebCam
Bus 001 Device 005: ID 0b05:1898 ASUSTek Computer, Inc. TUF GAMING M5
Bus 001 Device 004: ID 13d3:3563 IMC Networks Wireless_Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

LAPTOP-E83P4N41:/home/ray # rfkill list all
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

ray@LAPTOP-E83P4N41:~> bluetoothctl 
Agent registered
[bluetooth]# show
No default controller available

ray@LAPTOP-E83P4N41:~> dmesg | grep Bluetooth
    7.438065] Bluetooth: Core ver 2.22
    7.438085] Bluetooth: HCI device and connection manager initialized
    7.438088] Bluetooth: HCI socket layer initialized
    7.438090] Bluetooth: L2CAP socket layer initialized
    7.438092] Bluetooth: SCO socket layer initialized
    7.589306] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    7.589310] Bluetooth: BNEP filters: protocol multicast
    7.589316] Bluetooth: BNEP socket layer initialized

I can see the firmware in

/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz

Seem like kernel didn’t recognize the device.
Any help is welcome, thx.

What is the status of bluetooth.service?

> sudo systemctl status bluetooth.service 
[sudo] password for root:  
**●** bluetooth.service - Bluetooth service 
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled) 
     Active: **active (running)** since Sun 2021-07-04 08:06:26 CEST; 6h ago 
       Docs: man:bluetoothd(8) 
   Main PID: 3228 (bluetoothd) 
     Status: "Running" 
      Tasks: 1 (limit: 4915) 
        CPU: 52ms 
     CGroup: /system.slice/bluetooth.service 
             └─3228 /usr/libexec/bluetooth/bluetoothd

If it is not running, try running startin it with debug enabled: “/usr/lib/bluetooth/bluetoothd -n -d”

Here’s the output:bluetooth.service is running

ray@LAPTOP-E83P4N41:~> sudo systemctl status bluetooth.service
[sudo] password for root: 
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2021-07-04 19:36:26 CST; 1h 28min ago
       Docs: man:bluetoothd(8)
   Main PID: 1369 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 4915)
        CPU: 15ms
     CGroup: /system.slice/bluetooth.service
             └─1369 /usr/libexec/bluetooth/bluetoothd


Jul 04 19:36:26 localhost systemd[1]: Starting Bluetooth service...
Jul 04 19:36:26 localhost bluetoothd[1369]: Bluetooth daemon 5.58
Jul 04 19:36:26 localhost systemd[1]: Started Bluetooth service.
Jul 04 19:36:26 localhost bluetoothd[1369]: Starting SDP server
Jul 04 19:36:26 localhost bluetoothd[1369]: Bluetooth management interface 1.19 initialized

Did you try what is suggested on bluetoothctl: No default controller available

  1. rfkill
LAPTOP-E83P4N41:/home/ray # rfkill list all
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
2: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
  1. I can’t find any bluez-utils package
LAPTOP-E83P4N41:/home/ray # zypper se bluez-utils
Loading repository data...
Reading installed packages...
No matching items found.
  1. Refer to the bugzilla, “rmmod btusb” and “modprobe btusb” again,
    dmesg shows same result as I state above.
    Maybe it’s not the same situation.
    Anything I can try?

This might also be caused by power saving measures, in which case adding the kernel parameter btusb.enable_autosuspend=n is a potential solution.

Do you try this one?

Also post as root:

journalctl -b | grep -Ei 'blue|firm|wlan|mediatek'

Yes, I used Yast -> Bootloader to add "btusb.enable_autosuspend=n ",
then shoutdown my laptop, and boot again.
Nothing changed.
Bluetooth icon still gray, and can’t enable.

Here the output:

LAPTOP-E83P4N41:/home/ray # journalctl -b | grep -Ei 'blue|firm|wlan|mediatek'
Jul 05 08:15:26 localhost kernel: i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
Jul 05 08:15:26 localhost kernel: nouveau 0000:01:00.0: pmu: firmware unavailable
Jul 05 08:15:27 localhost kernel: usb 1-14: Manufacturer: MediaTek Inc.
Jul 05 00:15:28 localhost kernel: ACPI: thermal: [Firmware Bug]: Invalid critical threshold (0)
Jul 05 00:15:29 localhost NetworkManager[809]: <info>  [1625415329.1655] manager[0x563391115030]: monitoring kernel firmware directory '/lib/firmware'.
Jul 05 00:15:29 localhost NetworkManager[809]: <info>  [1625415329.2307] Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/1.30.4/libnm-device-plugin-bluetooth.so)
Jul 05 00:15:29 localhost kernel: mt7921e 0000:03:00.0: WM Firmware Version: ____010000, Build Time: 20210612122753
Jul 05 00:15:29 localhost kernel: mt7921e 0000:03:00.0: Firmware init done
Jul 05 00:15:29 localhost NetworkManager[809]: <info>  [1625415329.8213] device (wlan0): driver supports Access Point (AP) mode
Jul 05 00:15:29 localhost NetworkManager[809]: <info>  [1625415329.8220] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Jul 05 00:15:29 localhost kernel: mt7921e 0000:03:00.0 wlp3s0: renamed from wlan0
Jul 05 00:15:29 localhost kernel: Bluetooth: Core ver 2.22
Jul 05 00:15:29 localhost kernel: Bluetooth: HCI device and connection manager initialized
Jul 05 00:15:29 localhost kernel: Bluetooth: HCI socket layer initialized
Jul 05 00:15:29 localhost kernel: Bluetooth: L2CAP socket layer initialized
Jul 05 00:15:29 localhost kernel: Bluetooth: SCO socket layer initialized
Jul 05 00:15:29 localhost NetworkManager[809]: <info>  [1625415329.8603] device (wlan0): interface index 3 renamed iface from 'wlan0' to 'wlp3s0'
Jul 05 00:15:29 localhost systemd[1]: Startup finished in 3.793s (firmware) + 2.826s (loader) + 2.121s (kernel) + 3.199s (initrd) + 1.922s (userspace) = 13.862s.
Jul 05 00:15:29 localhost systemd[1]: Starting Bluetooth service...
Jul 05 00:15:29 localhost bluetoothd[1370]: Bluetooth daemon 5.58
Jul 05 00:15:29 localhost systemd[1]: Started Bluetooth service.
Jul 05 00:15:29 localhost systemd[1]: Reached target Bluetooth.
Jul 05 00:15:29 localhost bluetoothd[1370]: Starting SDP server
Jul 05 00:15:30 localhost bluetoothd[1370]: Bluetooth management interface 1.19 initialized
Jul 05 00:15:30 localhost kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Jul 05 00:15:30 localhost kernel: Bluetooth: BNEP filters: protocol multicast
Jul 05 00:15:30 localhost kernel: Bluetooth: BNEP socket layer initialized
Jul 05 00:15:40 localhost kded5[1690]: bluedevil: Created
Jul 05 00:15:41 LAPTOP-E83P4N41 kded5[1690]: bluedevil: ObexManager operational changed false
Jul 05 00:15:41 LAPTOP-E83P4N41 dbus-daemon[1556]: [session uid=1000 pid=1556] Activating service name='org.bluez.obex' requested by ':1.14' (uid=1000 pid=1690 comm="/usr/bin/kded5 ")
Jul 05 00:15:41 LAPTOP-E83P4N41 kded5[1690]: bluedevil: Bluetooth operational changed true
Jul 05 00:15:41 LAPTOP-E83P4N41 kded5[1690]: bluedevil: Agent registered
Jul 05 00:15:41 LAPTOP-E83P4N41 kded5[1690]: bluedevil: Requested default Agent
Jul 05 00:15:41 LAPTOP-E83P4N41 dbus-daemon[1556]: [session uid=1000 pid=1556] Successfully activated service 'org.bluez.obex'
Jul 05 00:15:41 LAPTOP-E83P4N41 kded5[1690]: bluedevil: ObexManager operational changed true
Jul 05 00:15:41 LAPTOP-E83P4N41 kded5[1690]: bluedevil: ObexAgent registered
Jul 05 00:15:54 LAPTOP-E83P4N41 systemsettings5[2112]: file:///usr/share/kpackage/kcms/kcm_bluetooth/contents/ui/Bluetooth.qml:33:13: QML InlineMessage: Cannot anchor to an item that isn't a parent or sibling.
Jul 05 00:15:54 LAPTOP-E83P4N41 systemsettings5[2112]: file:///usr/share/kpackage/kcms/kcm_bluetooth/contents/ui/Bluetooth.qml:33:13: QML InlineMessage: Cannot anchor to an item that isn't a parent or sibling.



Your log does not show anything suspicious to me, I see even an ObexAgent did successfully register, the only thing is that “bluetoothctl show” should show the adapter but it does not for you.

I wonder if that has anything to do with access rights, so can you try running “bluetoothctl power on” and “bluetoothctl show” as root?

Still got no luck…

LAPTOP-E83P4N41:/home/ray # bluetoothctl power on
No default controller available
LAPTOP-E83P4N41:/home/ray # bluetoothctl show
No default controller available

Thank you anyway.

Quite a mystery, can you do “sudo btmon” and share the output?

Maybe strace can help, for me:

$ strace -f -o /tmp/bt_show.log bluetoothctl show 
Controller 00:09:DD:5F:2A:2E (public) 
        Name: linux-d7n9 
        Alias: linux-d7n9 
        Class: 0x007c0104 
        Powered: yes 
        Discoverable: no 
        DiscoverableTimeout: 0x000000b4 
        Pairable: yes 
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb) 
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb) 
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb) 
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb) 
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb) 
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) 
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb) 
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb) 
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb) 
        UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb) 
        UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb) 
        UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb) 
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb) 
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb) 
        UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001) 
        Modalias: usb:v1D6Bp0246d053A 
        Discovering: no

You can find the resulting output as https://susepaste.org/87628627

ray@LAPTOP-E83P4N41:~> export LANG=C; sudo btmon
[sudo]password for root: 
Bluetooth monitor ver 5.58
= Note: Linux version 5.12.13-1-default (x86_64)                                                 0.024545
= Note: Bluetooth subsystem version 2.22                                                         0.024548
= New Index: 00:00:00:00:00:00 (Primary,USB,hci0)                                         [hci0] 0.024548
@ MGMT Open: bluetoothd (privileged) version 1.19                                       {0x0001} 0.024549



btmon Stop Here, have to Ctrl-C to quit.

starce got no further info:

ray@LAPTOP-E83P4N41:~> strace -f -o /tmp/bt_show.log bluetoothctl show
No default controller available

That is odd, for me it is reporting:

= New Index: 00:09:DD:5F:2A:2E (Primary,USB,hci0)                                 [hci0] 0.155822
= Open Index: 00:09:DD:5F:2A:2E                                                   [hci0] 0.155823
= Index Info: 00:09:DD:5F:2A:2E (Cambridge Silicon Radio)                         [hci0] 0.155823
**@ MGMT Open: bluetoothd** (privileged) version 1.19                               {0x0001} 0.155824

00:00:00:00:00:00 is an illegal MAC address, so that makes me think of a hardware problem.

strace got no further info:

ray@LAPTOP-E83P4N41:~> strace -f -o /tmp/bt_show.log bluetoothctl show
No default controller available

No, the info is in /tmp/bt_show.log :wink:

You can post it using “susepaste -e 151200 -n swyear /tmp/bt_show.log” but given the btmon output I doubt if the log will be helpful.

Ha Ha ! XD

ray@LAPTOP-E83P4N41:~> sudo btmon    
[sudo] password for root:  
Bluetooth monitor ver 5.58
= Note: Linux version 5.12.13-1-default (x86_64)                                                 0.850243
= Note: Bluetooth subsystem version 2.22                                                         0.850244
= New Index: 00:00:00:00:00:00 (Primary,USB,hci0)                                         [hci0] 0.850245
**@ MGMT Open: bluetoothd** (privileged) version 1.19                                       {0x0001} 0.850245


ray@LAPTOP-E83P4N41:~> strace -f -o /tmp/bt_show.log bluetoothctl show
No default controller available

The log is in
https://susepaste.org/33420409

Thank you.

Question:
Why do you use colors in your Code-Tag?
Its difficult to read for me because I can see not all colors (red/green blind)

Better is not to use.

Sorry, I’ll remember that.
Next time I will paste in a plane text.

ray@LAPTOP-E83P4N41:~> sudo btmon
[sudo] root 的密碼:
Bluetooth monitor ver 5.58
= Note: Linux version 5.12.13-1-default (x86_64)                                                 0.115623
= Note: Bluetooth subsystem version 2.22                                                         0.115624
= New Index: 00:00:00:00:00:00 (Primary,USB,hci0)                                         [hci0] 0.115625
@ MGMT Open: bluetoothd (privileged) version 1.19                                       {0x0001} 0.115625



I’ve file a bug in https://bugzilla.suse.com/show_bug.cgi?id=1188064