Airpod reconnecting on Nixos

On my Apple Airpods Pro connected to Nixos vie bluetooth with KDE plasma, I get constant disconnect and reconnecting tones in the headset. The logs show this and the device number keeps incrementing after every reconnect:

Jun 17 10:11:55 z13 bluetoothd[1859]: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Jun 17 10:11:57 z13 kernel: input: Brent’s AirPods Pro (AVRCP) as /devices/virtual/input/input44
Jun 17 10:11:57 z13 bluetoothd[1859]: profiles/audio/avdtp.c:avdtp_connect_cb() connect to 01:A5:85:72:C2:31: Connection refused (111)
Jun 17 10:11:57 z13 bluetoothd[1859]: src/profile.c:ext_connect() Hands-Free Voice gateway failed connect to 01:A5:85:72:C2:31: Connection refused (111)
Jun 17 10:11:57 z13 systemd-logind[1608]: Watching system buttons on /dev/input/event19 (Brent’s AirPods Pro (AVRCP))
Jun 17 10:11:59 z13 bluetoothd[1859]: /org/bluez/hci0/dev_01_A5_85_72_C2_31/fd9: fd(41) ready
Jun 17 10:11:59 z13 rtkit-daemon[2179]: Successfully made thread 121773 of process 2639 owned by '1000' RT at priority 5.

The fix is to set this in the Nix config (which fixes the issue after a reboot):

hardware.bluetooth.settings.Policy.ReconnectAttempts = 0;

Comments

comments powered by Disqus