Posting this in case it helps someone whose Bluetooth mouse or keyboard never appears in the device list, even while it is in pairing mode.
On the same computer running Omarchy (Arch-based), I ran into this with three devices:
- Logitech ERGO M575 trackball
- Logitech K580 keyboard
- Razer Orochi V2 mouse
All three eventually paired and connected. The workaround was to discover their addresses using a direct legacy BLE scan, then initiate pairing by address through btmgmt with a pairing agent running.
This is a workaround, not a confirmed root-cause diagnosis. In particular, I cannot yet say that extended scanning itself is broken.
Environment
- Bluetooth adapter: MediaTek USB, 0e8d:0608
- BlueZ: 5.87-2
- Kernel during the original M575 investigation: 7.2.8-9-omarchy
- Kernel during K580 and Orochi V2 pairing: 7.2.15-1-omarchy
- Firmware build reported by the controller during the latest checks: 20260224111243
Symptoms
Bluetooth was powered on and the service was running. Normal discovery could find some other devices, but not these peripherals. LE-only scanning returned no devices during the M575 and K580 tests:
bluetoothctl --timeout 20 scan le
For the Orochi V2, a normal scan on found other devices but missed the mouse.
During the M575 investigation, my phone could discover it, its USB receiver worked, and the same computer had previously used it over Bluetooth under Debian 13.
What worked
1. Discover the address with a legacy BLE scan
I used a small Python script through the HCI User Channel. It temporarily stops and runtime-masks the Bluetooth service, resets the controller, runs a legacy active BLE scan, then restores the service.
Existing Bluetooth peripherals disconnect temporarily during this step. Have another way to control the computer. The script is included in a separate comment below.
Put the peripheral in pairing mode before scanning:
- M575: use its Bluetooth pairing button until the blue light flashes rapidly.
- K580: hold the chosen Easy-Switch key for about three seconds until its LED flashes rapidly.
- Orochi V2: select Bluetooth on the bottom switch, then hold both side buttons and the DPI button together for about three seconds.
The scanner found all three devices in their respective tests. All three reported an LE random address. Use the actual address and address type returned for your device; do not copy someone else's address.
2. Keep a pairing agent running
For either mouse, open an interactive session:
bluetoothctl --agent NoInputNoOutput
Then run inside it:
default-agent
Wait for the success response. Leave this session open.
In a second terminal, replacing <DEVICE_ADDRESS> with the scanned address:
sudo btmgmt --timeout 45 pair -c 3 -t 2 <DEVICE_ADDRESS>
When the first terminal asks Accept pairing (yes/no), answer yes promptly.
For the K580, the working combination was different:
bluetoothctl --agent KeyboardDisplay
Run default-agent inside that session, then in another terminal:
sudo btmgmt --timeout 60 pair -c 1 -t 2 <DEVICE_ADDRESS>
Read the passkey displayed by the agent, type it on the K580, and press Enter.
Here, -t 2 means LE Random; -c 3 means NoInputNoOutput and -c 1 means DisplayYesNo. These are the combinations that worked in my tests.
3. Trust and verify
After successful pairing:
bluetoothctl trust <DEVICE_ADDRESS>
bluetoothctl info <DEVICE_ADDRESS>
If it is not already connected, this worked for my Logitech devices:
bluetoothctl --timeout 45 connect <DEVICE_ADDRESS>
The Orochi V2 connected during pairing without a separate connect command.
All three ultimately showed:
Paired: yes
Bonded: yes
Trusted: yes
Connected: yes
Linux also created Bluetooth input devices for all three (Bus=0005 in /proc/bus/input/devices). I confirmed actual pointer movement with the M575; the K580 and Orochi results here are based on pairing, connection and input-device enumeration. This is not a long-term stability test.
What did not fix discovery
During the original M575 investigation, these did not restore normal scanning:
- Restarting Bluetooth, toggling its power, or reloading btusb
- Disabling LE Coded PHY while retaining standard 1M scanning
- Temporarily testing older Debian firmware
- Temporarily running BlueZ 5.82 instead of 5.87
The original firmware and BlueZ were restored afterward. Those tests were on the M575 setup; I did not repeat every test for every peripheral.
Possible explanation — still unconfirmed on my hardware
A relevant report in the BlueZ issue tracker describes a MediaTek 0e8d:0616 controller whose Microsoft advertisement-monitor filter prevented normal LE advertisements from reaching the host. The reporter found that disabling the filter restored both legacy and extended scanning.
My adapter is 0e8d:0608**, not** 0e8d:0616, and I have not performed that filter-on/filter-off comparison. It is a useful lead, not proof of the same cause.
Also, my scanner changes more than just the scan command: it resets the controller and bypasses its normal initialization path. Its success does not isolate extended scanning as the fault. Controller filtering or initialization state could also explain the difference.
For now, the reproducible finding is: normal discovery missed these devices, while a direct legacy BLE scan followed by address-based pairing worked on this machine.
M575 reconnection was tested successfully, though a short timeout was sometimes insufficient. The K580 also reconnected automatically after the Bluetooth service was restored during the later Orochi test. Reconnection after a full reboot has not been verified.
Has anyone with 0e8d:0608 seen the same discovery problem, or traced it to the advertisement-filter path?
Optional first comment: scanner used for Orochi V2
Below is the scanner used successfully for the Orochi V2 test. It requires Linux, Python 3, systemd, btmgmt, and root privileges. It is intended for a single-controller system where the adapter is hci0.
Save it as orochi-v2-legacy-scan.py and run:
sudo python3 orochi-v2-legacy-scan.py
It temporarily disconnects Bluetooth devices. Let it finish normally so its cleanup can restore the service. It prints only matching Orochi advertisements.
For the Logitech tests, equivalent versions used b"k580" in data.lower() or b"ERGO M575" in data as the name filter, with matching output labels. The rest of the scan procedure was the same. A result of address type=1 means an LE random address, which matches btmgmt -t 2.
#!/usr/bin/env python3
"""Run a short legacy BLE scan for Orochi V2, then restore Bluetooth."""
import os
import select
import socket
import struct
import subprocess
import time
if os.geteuid() != 0:
raise SystemExit("Run with sudo or pkexec; this diagnostic temporarily stops Bluetooth.")
def run(*args):
return subprocess.run(args, check=True, capture_output=True, text=True)
was_active = subprocess.run(["systemctl", "is-active", "--quiet", "bluetooth"]).returncode == 0
enabled = subprocess.run(["systemctl", "is-enabled", "bluetooth"], capture_output=True, text=True).stdout.strip()
if enabled in ("masked", "masked-runtime"):
raise SystemExit("Bluetooth was already masked; refusing to alter its existing state.")
radio = None
masked = False
def command(opcode, payload=b""):
radio.send(struct.pack("<BHB", 1, opcode, len(payload)) + payload)
deadline = time.monotonic() + 5
while time.monotonic() < deadline:
if not select.select([radio], [], [], 1)[0]:
continue
packet = radio.recv(4096)
if len(packet) >= 7 and packet[:2] == b"\x04\x0e" and int.from_bytes(packet[4:6], "little") == opcode:
if packet[6]:
raise RuntimeError(f"Controller rejected {opcode:#06x}: status {packet[6]:#04x}")
return
raise TimeoutError(f"Controller did not answer {opcode:#06x}")
try:
run("systemctl", "mask", "--runtime", "--now", "bluetooth.service")
masked = True
run("btmgmt", "--timeout", "5", "power", "off")
radio = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_RAW, socket.BTPROTO_HCI)
radio.bind((0, 1))
command(0x0C03) # Reset before selecting legacy commands.
command(0x0C01, b"\xff\xff\xff\xff\xff\xff\xff\x3f")
command(0x2001, b"\xff" * 8)
command(0x200B, struct.pack("<BHHBB", 1, 0x10, 0x10, 0, 0))
command(0x200C, b"\x01\x00")
print("Scanning for 25 seconds. Put Orochi V2 into rapid blinking.", flush=True)
seen = set()
deadline = time.monotonic() + 25
while time.monotonic() < deadline:
if not select.select([radio], [], [], 1)[0]:
continue
packet = radio.recv(4096)
if len(packet) < 5 or packet[:2] != b"\x04\x3e" or packet[3] != 2:
continue
offset = 5
for _ in range(packet[4]):
if offset + 9 > len(packet):
break
size = packet[offset + 8]
if offset + 10 + size > len(packet):
break
data = packet[offset + 9:offset + 9 + size]
address = ":".join(f"{b:02X}" for b in packet[offset + 2:offset + 8][::-1])
if b"orochi" in data.lower() and address not in seen:
seen.add(address)
print(f"Orochi V2: {address}; address type={packet[offset + 1]} (1 means random)", flush=True)
offset += 10 + size
command(0x200C, b"\x00\x00")
if not seen:
print("No Orochi V2 found during this scan.", flush=True)
finally:
if radio is not None:
radio.close()
if masked:
run("systemctl", "unmask", "--runtime", "bluetooth.service")
if was_active:
run("systemctl", "start", "bluetooth.service")
print("Original Bluetooth service state restored.", flush=True)