AGX Xavier + AC8265 + PS4 Controller = Unable to automatically reconnect

I’ve been able to replicate this problem on two AGX Xavier (hereafter shortened to just “Xavier”) boards so far:

I’ve installed an Intel AC8265 wireless card in my Xavier and installed the backport-iwlwifi-dkms package. Wireless appears stable, and I can use the bluetooth hardware. Nothing is blocked:

$ rfkill list all
0: bluedroid_pm: Bluetooth
Soft blocked: no
Hard blocked: no
1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

I can pair a PS4 controller using bluetoothctl:

# sudo bluetoothctl
[NEW] Controller CC:D9:AC:08:D7:97 cpr-agx-test [default]
[bluetooth]# scan on
[NEW] Device DC:...:90 Wireless Controller
[bluetooth]# scan off
[bluetooth]# trust DC:..:90
[bluetooth]# pair DC:...:90
Attempting to pair with DC:0C:2D:89:E1:90
[CHG] Device DC:...:90 Connected: yes
[CHG] Device DC:...:90 UUIDs: 00...fb
[CHG] Device DC:...:90 UUIDs: 00..fb
[CHG] Device DC:...:90 ServicesResolved: yes
[CHG] Device DC:...:90 Paired: yes
Pairing successful
[bluetooth]# connect DC:...:90
Attempting to connect to DC:...:90
Connection successful

At this point the controller shows up as /dev/input/js0, and the button/axis inputs all show up correctly in jstest.

BUT – and this is the actual problem

When I turn the controller off and then turn it back on again it appears to connect and then immediately shuts down. Echoing the output of bluetoothctl I see this:

[CHG] Device DC:...:90 Connected: no
[CHG] Device DC:...:90 Connected: yes
[CHG] Device DC:...:90 Connected: no

Running sudo journalctl -u bluetooth -f shows:

$ sudo journalctl -u bluetooth -f
Apr 12 14:14:46 cpr-agx-test bluetoothd[6281]: src/adapter.c:connected_callback() hci0 device DC:...:90 connected eir_len 5
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: src/adapter.c:dev_disconnected() Device DC:...:90 disconnected, reason 3
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: src/adapter.c:adapter_remove_connection()
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: plugins/policy.c:disconnect_cb() reason 3
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr DC:...:90 type 0 status 0xe
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: src/device.c:device_bonding_failed() status 14
Apr 12 14:14:47 cpr-agx-test bluetoothd[6281]: src/adapter.c:resume_discovery()

The light on the controller briefly stops flashing and turns solid blue-white (indicating it’s paired), and then immediately shuts off. Repeatedly pressing the PS button on the controller eventually results in the controller connecting properly; sometimes it happens after 1 try, other times it takes upward of 20 tries. I have been unable to find any pattern.

The truly strange thing is that if I set up a Microsoft bluetooth mouse it reliably reconnects the first time it powers on. It’s only the PS4 controller that seems to do this connected no/yes/no, followed by a power-off, but I’m seeing this behaviour on two separate Xaviers and two separate PS4 controllers.

At this point I’m running out of ideas to try. Most bugs I’ve found relating to “device_bonding_failed() status 14” are related to bluetooth audio output, and the fix is to do something with PulseAudio. I’ve tried loading and unloading the “module-bluetooth-{policy|discover}” and “module-bluez-{device|discover}” PulseAudio modules, in case the headphone jack on the PS4 controller was being picked up by PulseAudio and causing the problems. But no luck; the behaviour I described above persists.

Has anyone else ever run into this problem on the Xavier? And if so, how did you resolve it?

Some users told us the bluetooth seems to have disconnection problem after jetpack4.4. And they claim jetpack4.3 is still fine.

Could you check if this is your case too? I tried some bluetooth device on my side with jetpack4.5 but seems no problem.

The first disconnection reason 3 from your log indicates MGMT_DEV_DISCONN_REMOT.

It means the disconnection is initiated by the remote side (your DS4).

I’ll try JetPack 4.3 and let you know if that works. Question: If I install JetPack 4.3, and then do a full-system upgrade with sudo apt-get dist-upgrade is that functionally equivalent to installing the latest version of JetPack? i.e. if the issue is related to newer versions of JetPack should I avoid doing a complete upgrade to prevent the issue from reappearing?

Regarding the reason 3 – that’s very peculiar. I can reliably pair that same physical controller with my laptop and other x86_64 machines; it only seems to cause problems when used with the AGX Xavier as far as I’ve been able to determine.

JetPack 4.3 did appear to work. However, I recently needed to flash another Xavier, but JetPack no longer lists 4.3 as an available version to be installed. The bluetooth issue persists with JetPack 4.5.1.

Is it still possible to install JetPack 4.3? If so, how? The oldest version I can see listed in SDK Manager is 4.4.

Hi civerachb,

Please run below command to install JetPack-4.3:

$ sdkmanager --archivedversions