R35.1 crashes when connecting BLE Xbox Controller

Crypto ecc driver seems to error during/right after pairing process with Xbox Series X/S Controller (tested on Elite S2 controller), causing an unrecoverable panic. xpadneo is installed and loaded, but it’s purely an HID driver and shouldn’t be involved in this process. Full error:

[  624.479058] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[  624.488235] Mem abort info:
[  624.491193]   ESR = 0x96000005
[  624.494411]   EC = 0x25: DABT (current EL), IL = 32 bits
[  624.499948]   SET = 0, FnV = 0
[  624.503152]   EA = 0, S1PTW = 0
[  624.506441] Data abort info:
[  624.509449]   ISV = 0, ISS = 0x00000005
[  624.513445]   CM = 0, WnR = 0
[  624.516535] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001eca94000
[  624.523212] [0000000000000000] pgd=00000001ecb05003, p4d=00000001ecb05003, pud=0000000000000000
[  624.532213] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[  624.537956] Modules linked in: nvidia_modeset(O) fuse xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c br_netfilter lzo_rle lzo_compress zram overlay ramoops reed_solomon bnep binfmt_misc snd_soc_tegra210_ope snd_soc_tegra186_dspk snd_soc_tegra186_asrc snd_soc_tegra210_iqc snd_soc_tegra186_arad snd_soc_tegra210_mvc snd_soc_tegra210_afc snd_soc_tegra210_dmic snd_soc_tegra210_adx snd_soc_tegra210_amx input_leds snd_soc_tegra210_i2s snd_soc_tegra210_admaif snd_soc_tegra210_mixer aes_ce_blk snd_soc_tegra210_sfc snd_soc_tegra_pcm crypto_simd cryptd aes_ce_cipher rtk_btusb ghash_ce btusb sha2_ce btrtl rtl8822ce sha256_arm64 btbcm snd_soc_tegra210_adsp ucsi_ccg sha1_ce btintel snd_soc_tegra_machine_driver typec_ucsi snd_soc_tegra_utils snd_soc_spdif_tx typec ofpart snd_hda_codec_hdmi snd_soc_simple_card_utils nct1008 cmdlinepart cfg80211 snd_hda_tegra snd_soc_tegra210_ahub snd_hda_codec
[  624.538057]  qspi_mtd nvadsp snd_hda_core mtd userspace_alert tegra_bpmp_thermal tegra210_adma spi_tegra114 nvidia(O) ina3221 pwm_fan loop nvgpu nvmap ip_tables x_tables
[  624.645734] CPU: 0 PID: 123 Comm: kworker/u25:0 Tainted: G           O      5.10.104-tegra #1
[  624.654508] Hardware name:  /, BIOS 1.0-d7fb19b 08/10/2022
[  624.660165] Workqueue: hci0 hci_rx_work
[  624.664112] pstate: 20c00009 (nzCv daif +PAN +UAO -TCO BTYPE=--)
[  624.670303] pc : vli_mult+0x74/0x100
[  624.673985] lr : vli_mult+0x2c/0x100
[  624.677664] sp : ffff8000117bb820
[  624.681074] x29: ffff8000117bb820 x28: 0000000000002010
[  624.686540] x27: ffff78010f326010 x26: 0000000000000040
[  624.692007] x25: ffffd04f80767380 x24: ffff7801ce1a7100
[  624.697473] x23: 0000000000000000 x22: ffff8000117bb898
[  624.702940] x21: 0000000000000000 x20: ffff7801ce1a7100
[  624.708405] x19: 0000000000000004 x18: 0000000000000018
[  624.713868] x17: ffff8000117bb798 x16: 0000000000000003
[  624.719334] x15: ffff8000117bb750 x14: ffff8000117bb7b0
[  624.724799] x13: ffff8000117bb790 x12: ffff8000117bb738
[  624.730264] x11: 0000000000000000 x10: 0000000000000000
[  624.735729] x9 : b55171de7242460c x8 : 0000000000000000
[  624.741195] x7 : 3260eb02a6086b19 x6 : 0000000000000000
[  624.746661] x5 : 0000000000000000 x4 : 0000000000000000
[  624.752126] x3 : 00000000fffffffd x2 : 0000000000000001
[  624.757591] x1 : 0000000000000000 x0 : 0000000000000007
[  624.763057] Call trace:
[  624.765570]  vli_mult+0x74/0x100
[  624.768897]  vli_mod_mult_fast+0x58/0xa0
[  624.772931]  ecc_is_pubkey_valid_partial+0x114/0x1e0
[  624.778036]  ecc_is_pubkey_valid_full+0x30/0xb0
[  624.782700]  ecc_make_pub_key+0xb4/0x140
[  624.786733]  ecdh_compute_value+0x164/0x180
[  624.791036]  generate_ecdh_public_key+0xe0/0x1a0
[  624.795787]  generate_ecdh_keys+0x3c/0x50
[  624.799913]  sc_send_public_key+0xf0/0x1a0
[  624.804125]  smp_recv_cb+0x13c4/0x16e0
[  624.807985]  l2cap_recv_frame+0xb40/0x16a0
[  624.812197]  l2cap_recv_acldata+0x20c/0x210
[  624.816496]  hci_rx_work+0x230/0x290
[  624.820179]  process_one_work+0x1c4/0x4a0
[  624.824304]  worker_thread+0x54/0x430
[  624.828071]  kthread+0x148/0x170
[  624.831400]  ret_from_fork+0x10/0x24
[  624.835084] Code: 7a441260 54000409 d280000a 4b040165 (f8645aa9)
[  624.841371] ---[ end trace fa2a9de23c9d6c38 ]---
[  624.851137] Kernel panic - not syncing: Oops: Fatal exception
[  624.857048] SMP: stopping secondary CPUs
[  624.861313] Kernel Offset: 0x504f6e940000 from 0xffff800010000000
[  624.867583] PHYS_OFFSET: 0xffff880000000000
[  624.871891] CPU features: 0x0040006,4a80aa38
[  624.876287] Memory Limit: none
[  624.884440] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]---

Hi makinbacon21,

Please share the steps.
We can try to reproduce your issue. Thanks!

Hi @carolyuu, thanks for checking in. Sorry for the late response!
Step 1: install the xpadneo kernel module (unrelated to the error but required for proper controller functionality) as per instructions here: atar-axis/xpadneo: Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S) (github.com)

Step 2: Pair a Bluetooth LE-enabled Xbox controller (Xbox One S controller or later with latest firmware flashed from Xbox Accessories; I used Elite Series 2) manually via commandline:

sudo bluetoothctl
scan on
scan off
pair <controller MAC>
trust <controller MAC>
connect <controller MAC>

I was unable to get past the pair stage. The command completed, but the kernel then panicked and the OS froze unrecoverably and eventually rebooted.

Hi makinbacon21,

Check with our internal team, we only tested NVIDIA SHIELD Thunderstrike controller and it works fine.

It seems to be specific to the controller…I tried some others and it seems to just be the Xbox ones with issues. An Xbox One X/S controller on the pre-BLE firmware paired in bluetoothctl fine, but when asked to connect, bluez errored:

[Xbox Wireless Controller]# connect 5C:BA:37:87:88:8A
Attempting to connect to 5C:BA:37:87:88:8A
Failed to connect: org.bluez.Error.NotAvailable

The Xbox Elite Series 2 controller with the BLE firmware causes the panic. It successfully pairs, but proceeds to die. I’m gonna update the Xbox One X/S controller to the BLE firmware and see if that has the same effect.

Yup–exact same behavior. @carolyuu it seems to be Xbox controllers over BLE (older Xbox One X/S controllers with new firmware or newer Xbox Series X/S controllers or the Elite Series 2 controlller).

^ still happening btw

I am affected by this bug as well with an Elite Series 2. Steps:

  • Update the firmware from windows using the xbox accessories app (https://xbox.com/accessories-app)
  • Click connect from bluetooth manager
  • Bam, whole system is brought down

This is with the 5.10.104-tegra kernel from L4T 35.3.1 on an AGX Orin Devkit

EDIT: I originally tested with the xpadneo driver installed as well, but the crash repros without the driver installed as well.

@makinbacon21 I know it’s been a year, but do you recall which controller you ended up going with? Still seeing this issue on latest Jetpack

the controllers that don’t work seem to be the BLE Xbox controllers (Xbox One controllers with the update and Xbox Series controllers) along with some other BLE controllers but the one I specifically tested was the Xbox Elite Series 2 controller. Anything non-BLE seems to work. Kinda amazed they haven’t yet run into this given how many controllers use BLE these days. I guess they just use Shield controllers for testing…

1 Like

Yeah, it seems to affect some Logitech devices as well, see here:

Edit: oops, wrong link

Wow, known issue since 2022! Such a nice way to lose customers ^_^

See the ecox32 post, more details and steps-to-reproduce added

Yeah! 11 months without so much as an acknowledgement from Nvidia that there is actually an issue, and barely an attempt to to reproduce the issue or even understand the problem! 🤯

1 Like

Sorry for the lates response.

Please try the proposed fix at Internal Error from Kernel When Connecting a Bluetooth Device - #25 by Eric567

Our tem is reviewing and to correct this error, the status will be updted there.

Thanks