Pairing with Bluetooth LE mice fails on a Huawei Matebook 13 AMD laptop with Realtek RTL8822CE Wifi/Bluetooth combo adapter

Bug #1887968 reported by Julian
62
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Linux
Confirmed
High
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm using Ubuntu 20.04 on a Huawei Matebook 13 AMD laptop which seems to use a Realtek RTL8822CE Wifi/Bluetooth combo adapter.

I've been unsuccessful to pair with 2 different bluetooth mice. However bluetooth seems to work with other devices. I'm under the impression that this problem only happens with Bluetooth LE devices.

Trying to pair using bluetoothctl fails with the org.bluez.Error.AuthenticationCanceled error:

[bluetooth]# pair E5:5B:67:2A:09:76
Attempting to pair with E5:5B:67:2A:09:76
[CHG] Device E5:5B:67:2A:09:76 Connected: yes
[CHG] Device E5:5B:67:2A:09:76 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled

A quick google search for org.bluez.Error.AuthenticationCanceled reported nothing relevant.

Running btmon while trying to pair with the device gives me the following:

Bluetooth monitor ver 5.53
= Note: Linux version 5.4.0-40-generic (x86_64) 0.998188
= Note: Bluetooth subsystem version 2.22 0.998193
= New Index: E8:6F:38:9C:2B:3C (Primary,USB,hci0) [hci0] 0.998194
= Open Index: E8:6F:38:9C:2B:3C [hci0] 0.998195
= Index Info: E8:6F:38:9C:2B:3C (Realtek Semiconductor Corporation) [hci0] 0.998197
@ MGMT Open: bluetoothd (privileged) version 1.14 {0x0001} 0.998198
@ MGMT Open: btmon (privileged) version 1.14 {0x0002} 0.998310
@ MGMT Command: Pair Device (0x0019) plen 8 {0x0001} [hci0] 8.162442
        LE Address: E5:5B:67:2A:09:76 (Static)
        Capability: KeyboardDisplay (0x04)
< HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 #1 [hci0] 8.162527
        Own address type: Public (0x00)
        Filter policy: Ignore not in white list (0x01)
        PHYs: 0x01
        Entry 0: LE 1M
          Type: Passive (0x00)
          Interval: 60.000 msec (0x0060)
          Window: 30.000 msec (0x0030)
> HCI Event: Command Complete (0x0e) plen 4 #2 [hci0] 8.284618
      LE Set Extended Scan Parameters (0x08|0x0041) ncmd 2
        Status: Success (0x00)
< HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6 #3 [hci0] 8.284654
        Extended scan: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
        Duration: 0 msec (0x0000)
        Period: 0.00 sec (0x0000)
> HCI Event: Command Complete (0x0e) plen 4 #4 [hci0] 8.289616
      LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 52 #5 [hci0] 8.343614
      LE Extended Advertising Report (0x0d)
        Num reports: 1
        Entry 0
          Event type: 0x0013
            Props: 0x0013
              Connectable
              Scannable
              Use legacy advertising PDUs
            Data status: Complete
          Legacy PDU Type: ADV_IND (0x0013)
          Address type: Random (0x01)
          Address: E5:5B:67:2A:09:76 (Static)
          Primary PHY: LE 1M
          Secondary PHY: No packets
          SID: no ADI field (0xff)
          TX power: 127 dBm
          RSSI: -20 dBm (0xec)
          Periodic advertising invteral: 0.00 msec (0x0000)
          Direct address type: Public (0x00)
          Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
          Data length: 0x1a
        03 19 c2 03 02 01 05 03 03 12 18 0e 09 52 61 7a .............Raz
        65 72 20 41 74 68 65 72 69 73 er Atheris
< HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6 #6 [hci0] 8.343656
        Extended scan: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
        Duration: 0 msec (0x0000)
        Period: 0.00 sec (0x0000)
> HCI Event: Command Complete (0x0e) plen 4 #7 [hci0] 8.345617
      LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
        Status: Success (0x00)
< HCI Command: LE Extended Create Connection (0x08|0x0043) plen 26 #8 [hci0] 8.345680
        Filter policy: White list is not used (0x00)
        Own address type: Public (0x00)
        Peer address type: Random (0x01)
        Peer address: E5:5B:67:2A:09:76 (Static)
        Initiating PHYs: 0x01
        Entry 0: LE 1M
          Scan interval: 60.000 msec (0x0060)
          Scan window: 60.000 msec (0x0060)
          Min connection interval: 30.00 msec (0x0018)
          Max connection interval: 50.00 msec (0x0028)
          Connection latency: 0 (0x0000)
          Supervision timeout: 420 msec (0x002a)
          Min connection length: 0.000 msec (0x0000)
          Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4 #9 [hci0] 8.348616
      LE Extended Create Connection (0x08|0x0043) ncmd 2
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 31 #10 [hci0] 8.390589
      LE Enhanced Connection Complete (0x0a)
        Status: Success (0x00)
        Handle: 16
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: E5:5B:67:2A:09:76 (Static)
        Local resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
        Peer resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
        Connection interval: 45.00 msec (0x0024)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x00
@ MGMT Event: Device Connected (0x000b) plen 39 {0x0002} [hci0] 8.390620
        LE Address: E5:5B:67:2A:09:76 (Static)
        Flags: 0x00000000
        Data length: 26
        Appearance: Mouse (0x03c2)
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        16-bit Service UUIDs (complete): 1 entry
          Human Interface Device (0x1812)
        Name (complete): Razer Atheris
@ MGMT Event: Device Connected (0x000b) plen 39 {0x0001} [hci0] 8.390620
        LE Address: E5:5B:67:2A:09:76 (Static)
        Flags: 0x00000000
        Data length: 26
        Appearance: Mouse (0x03c2)
        Flags: 0x05
          LE Limited Discoverable Mode
          BR/EDR Not Supported
        16-bit Service UUIDs (complete): 1 entry
          Human Interface Device (0x1812)
        Name (complete): Razer Atheris
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 #11 [hci0] 8.390716
        Handle: 16
> HCI Event: Command Status (0x0f) plen 4 #12 [hci0] 8.392604
      LE Read Remote Used Features (0x08|0x0016) ncmd 2
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 4 #13 [hci0] 8.413604
      LE Channel Selection Algorithm (0x14)
        Handle: 16
        Algorithm: #1 (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4 #14 [hci0] 8.638621
        Status: Success (0x00)
        Handle: 16
        Reason: Connection Failed to be Established (0x3e)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0002} [hci0] 8.638728
        LE Address: E5:5B:67:2A:09:76 (Static)
        Reason: Unspecified (0x00)
@ MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 8.638728
        LE Address: E5:5B:67:2A:09:76 (Static)
        Reason: Unspecified (0x00)
@ MGMT Event: Command Complete (0x0001) plen 10 {0x0001} [hci0] 8.638743
      Pair Device (0x0019) plen 7
        Status: Failed (0x03)
        LE Address: E5:5B:67:2A:09:76 (Static)

My system is using bluez 5.53-0ubuntu3

Thanks for your help.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.4
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-06-17 (29 days ago)
InstallationMedia: Xubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: HUAWEI HN-WX9X
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
Package: bluez 5.53-0ubuntu3
PackageArchitecture: amd64
ProcKernelCmdLine: BOOT_IMAGE=/BOOT/ubuntu_369zzd@/vmlinuz-5.4.0-40-generic root=ZFS=rpool/ROOT/ubuntu_369zzd ro quiet splash vt.handoff=1
ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
Tags: focal
Uname: Linux 5.4.0-40-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 12/25/2019
dmi.bios.vendor: HUAWEI
dmi.bios.version: 1.11
dmi.board.asset.tag: N/A
dmi.board.name: HN-WX9X-PCB
dmi.board.vendor: HUAWEI
dmi.board.version: M1020
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: HUAWEI
dmi.chassis.version: M1020
dmi.modalias: dmi:bvnHUAWEI:bvr1.11:bd12/25/2019:svnHUAWEI:pnHN-WX9X:pvrM1020:rvnHUAWEI:rnHN-WX9X-PCB:rvrM1020:cvnHUAWEI:ct10:cvrM1020:
dmi.product.family: MateBook
dmi.product.name: HN-WX9X
dmi.product.sku: C233
dmi.product.version: M1020
dmi.sys.vendor: HUAWEI
hciconfig:
 hci0: Type: Primary Bus: USB
  BD Address: E8:6F:38:9C:2B:3C ACL MTU: 1021:6 SCO MTU: 255:12
  UP RUNNING PSCAN
  RX bytes:1181 acl:0 sco:0 events:101 errors:0
  TX bytes:7568 acl:0 sco:0 commands:93 errors:0

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

  apport-collect 1887968

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in bluez (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you also add your 'journalctl -b 0' after getting the issue?

Revision history for this message
Julian (julianp) wrote : CurrentDmesg.txt

apport information

tags: added: apport-collected focal
description: updated
Revision history for this message
Julian (julianp) wrote : Dependencies.txt

apport information

Revision history for this message
Julian (julianp) wrote : Lspci.txt

apport information

Revision history for this message
Julian (julianp) wrote : Lspci-vt.txt

apport information

Revision history for this message
Julian (julianp) wrote : Lsusb.txt

apport information

Revision history for this message
Julian (julianp) wrote : Lsusb-t.txt

apport information

Revision history for this message
Julian (julianp) wrote : Lsusb-v.txt

apport information

Revision history for this message
Julian (julianp) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Julian (julianp) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Julian (julianp) wrote : ProcEnviron.txt

apport information

Revision history for this message
Julian (julianp) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Julian (julianp) wrote : ProcModules.txt

apport information

Revision history for this message
Julian (julianp) wrote : UdevDb.txt

apport information

Revision history for this message
Julian (julianp) wrote : Re: Pairing with bluetooth mice fails

Hi Sebastien,

journalctl log Attached.

Revision history for this message
Julian (julianp) wrote :

I've started bluetoothd with the debug option. Here's what happens when trying to pair with a bluetooth mouse:

bluetoothd[5497]: src/agent.c:agent_ref() 0x559521027e80: ref=2
bluetoothd[5497]: src/device.c:bonding_request_new() Requesting bonding for E5:5B:67:2A:09:76
bluetoothd[5497]: src/agent.c:agent_ref() 0x559521027e80: ref=3
bluetoothd[5497]: src/agent.c:agent_unref() 0x559521027e80: ref=2
bluetoothd[5497]: src/adapter.c:suspend_discovery()
bluetoothd[5497]: src/adapter.c:adapter_bonding_attempt() hci0 bdaddr E5:5B:67:2A:09:76 type 2 io_cap 0x04
bluetoothd[5497]: src/adapter.c:connected_callback() hci0 device E5:5B:67:2A:09:76 connected eir_len 26
bluetoothd[5497]: src/adapter.c:dev_disconnected() Device E5:5B:67:2A:09:76 disconnected, reason 0
bluetoothd[5497]: src/adapter.c:adapter_remove_connection()
bluetoothd[5497]: plugins/policy.c:disconnect_cb() reason 0
bluetoothd[5497]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr E5:5B:67:2A:09:76 type 2 status 0xe
bluetoothd[5497]: src/device.c:device_bonding_complete() bonding 0x55952102d670 status 0x0e
bluetoothd[5497]: src/device.c:device_bonding_failed() status 14
bluetoothd[5497]: src/agent.c:agent_unref() 0x559521027e80: ref=1
bluetoothd[5497]: src/adapter.c:resume_discovery()
bluetoothd[5497]: src/adapter.c:pair_device_complete() Failed (0x03)
bluetoothd[5497]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr E5:5B:67:2A:09:76 type 2 status 0x3
bluetoothd[5497]: src/device.c:device_bonding_complete() bonding (nil) status 0x03
bluetoothd[5497]: src/device.c:device_bonding_failed() status 3
bluetoothd[5497]: src/adapter.c:resume_discovery()

summary: - Pairing with bluetooth mice fails
+ Pairing with Bluetooth LE mice fails on a Huawei Matebook 13 AMD laptop
+ with Realtek RTL8822CE Wifi/Bluetooth combo adapter
Changed in bluez (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bluez (Ubuntu):
status: New → Confirmed
Revision history for this message
Paulo Horta (p-horta) wrote :

I'm having the same problem with an Huawei Matebook D14 2020 R5 with their bluetooth mouse.
What I noticed using bluetoothctl is that the mouse device ID changes:
D9:73:24:7E:1A:0E (random)

I've seen 0E, 0F, 0C, 0B, etc.

I don't know if it's suppose to be like that or not.

Revision history for this message
moguchev (leo1legrand) wrote :

I'm having this problem too with an Huawei Matebook 13 2020 with Microsoft 3600 bloetooth mouse.

[CHG] Device D7:1B:68:EE:63:C5 Trusted: yes
Changing D7:1B:68:EE:63:C5 trust succeeded
[bluetooth]# pair D7:1B:68:EE:63:C5
Attempting to pair with D7:1B:68:EE:63:C5
[CHG] Device D7:1B:68:EE:63:C5 Connected: yes
[CHG] Device D7:1B:68:EE:63:C5 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled

Revision history for this message
Jakub Niemczuk (halogenek) wrote :

I'm having the same problem with an Huawei Matebook 13 2020 R5 with Xiaomi Mi Portable Mouse bluetooth mouse.

Can't connect with any tool.
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no

Revision history for this message
Julian (julianp) wrote :

There's a kernel bug open tracking this issue: https://bugzilla.kernel.org/show_bug.cgi?id=208965

Changed in linux:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Maksim Moskalik (gravelandmp3) wrote :

I checked on kernel 5.9.12 Ubuntu 20.04 Huawei amd D13 , problem not solved

Revision history for this message
Olivier V (forum-viennet) wrote :

Hi,

This bug affects me too on rtl8822_cu.

Bisected here : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1906515

And reported here : https://bugzilla.kernel.org/show_bug.cgi?id=210453

Revision history for this message
Olivier V (forum-viennet) wrote :

I compiled 5.10 kernel downloaded here git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
and applied the patch given here https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2.

I works perfectly on my rtl8822cu device, with suspend and resume too.

To solve the bug it is only necessary to add the patch to the next kernel.

Revision history for this message
Olivier V (forum-viennet) wrote :

Not solved in 5.10.3

Revision history for this message
Olivier V (forum-viennet) wrote :

Will be solved in 5.11 as said here : https://bugzilla.kernel.org/show_bug.cgi?id=210453#c10

no longer affects: bluez (Ubuntu)
Revision history for this message
Olivier V (forum-viennet) wrote :

Solved in 5.11.0-rc2

Revision history for this message
Olivier V (forum-viennet) wrote :

Solved in 5.10.6 (installed and tried today).

Bug can be marked as solved.

Revision history for this message
Filippo (lexotan) wrote :

I installed 5.10.6 and 5.10.7 in linux mint 20.1 (via "ubuntu mainline kernel installer") and the issue remains: i'm trying to pair Huawei bluetooth mouse to my matebook 13 AMD.

Revision history for this message
Light (light221b) wrote :

I've got a matebook D16 ryzen 7, and also a huawei bluetooth mouse swift, Ubuntu 21.10 , kernel version 5.13, and i can't pair my mouse either, i've tried running all those bluetooth commands : power on , agent on, default-agent, scan on , trust, and pair, but i got an error message , so in fact, the problem about pairing a bluetooth mouse ramains.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.