Skip to content

Bluetooth panel loops pairing because bt-agent prompts without a terminal #9676

Description

@jacobaross

Description

Pairing a Logitech MX Anywhere 3 from the stock Bluetooth panel enters an automatic loop: the row alternates between pairing/connecting states roughly once per second without further user input. The device may connect transiently, but it is not bonded and will not reconnect.

The USB adapter, kernel driver, firmware, BlueZ service, discovery, and direct bluetoothctl pairing all work. The failure is in the stock bt-agent.service integration.

Steps to reproduce

  1. Start an Omarchy session with bt-agent.service enabled and active.
  2. Open the Bluetooth panel with Super + Ctrl + B.
  3. Put a Logitech MX Anywhere 3 into pairing mode.
  4. Click Pair once.
  5. Observe the row repeatedly alternate between pairing and connecting without any additional input.

Actual behavior

bluetoothd repeatedly rejects the authorization request, while the user service logs an interactive prompt despite having no terminal:

bluetoothd: src/device.c:new_auth() No agent available for request type 2
bluetoothd: device_confirm_passkey: Operation not permitted
bt-agent: Authorize this device pairing (yes/no)? Device: MX Anywhere 3 (...)

The prompt and pairing attempt repeat about once per second. systemctl --user stop bt-agent.service can also remain stuck in deactivating (stop-sigterm) until the bt-agent process is killed.

Expected behavior

One click should authorize a Just Works pairing, create a persistent bond, trust the device, and connect it. The panel should terminate a failed attempt instead of continually retrying.

Root cause evidence

The packaged unit says that NoInputNoOutput auto-accepts pairing:

ExecStart=/usr/bin/bt-agent -c NoInputNoOutput

However, -c NoInputNoOutput in bluez-tools selects the advertised I/O capability; it does not make every authorization callback non-interactive. On this system, bt-agent still reads an Authorize this device pairing (yes/no)? prompt from stdin. Because the systemd user service has no interactive stdin, authorization never completes while the panel continues launching pairing attempts.

After runtime-masking and killing bt-agent.service, the same mouse paired immediately through an interactive bluetoothctl agent. BlueZ then reported:

Paired: yes
Bonded: yes
Trusted: yes
Connected: yes

This differs from #6992 (missing bluez-tools) and #8614 (continuous inquiry/page timeout): /usr/bin/bt-agent is installed and active here, and the decisive failure is its unattended authorization prompt.

System details

  • Omarchy: 4.0.2-1
  • Kernel: 7.1.9.arch1-2
  • BlueZ / bluez-utils: 5.87-2
  • bluez-tools: 0.2.0-6
  • Adapter: TP-Link UB500 (2357:0604), Realtek RTL8761BU firmware loaded successfully
  • Device: Logitech MX Anywhere 3 (Bluetooth LE HID)
  • CPU: AMD Ryzen 9 9950X3D
  • GPU: AMD Radeon RX 9070 XT

Suggested direction

Use a pairing agent whose unattended Just Works behavior is explicit and testable (potentially BlueZ's maintained bluetoothctl --agent NoInputNoOutput) rather than the old bluez-tools agent, and ensure the panel treats a failed pairing attempt as terminal instead of automatically re-entering the pair/connect cycle.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions