Skip to content

kernel config: Bluetooth LE mice and keyboards, and headphone buttons - #304

Merged
derekross merged 1 commit into
derekross:mainfrom
nesmeck:kernel-config-bt-hid
Nov 3, 2026
Merged

derekross merged 1 commit into
derekross:mainfrom
nesmeck:kernel-config-bt-hid

Conversation

@nesmeck

@nesmeck nesmeck commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Four kernel options that bluetoothd needs for common Bluetooth devices, all modules loaded on demand:

  • UHID: BLE mice and keyboards (HID over GATT) get their input devices through /dev/uhid. Without it, bluetoothd logs input-hog profile accept failed, and a paired BLE mouse connects but never reaches the desktop.
  • HID_LOGITECH and HID_LOGITECH_HIDPP: Logitech's HID++ devices, such as the MX Master, with their battery and extra buttons.
  • INPUT_UINPUT: AVRCP. bluetoothd turns headphone and speaker buttons (play, pause, volume) into key events through uinput. Without it, it logs AVRCP: failed to create uinput.

BT_RFCOMM stays off for now. With it, WirePlumber switches headphones to the headset profile whenever something opens a microphone, and on the Pixel 7 that cut the music and paused mpv (the test is in the comments below). It can come later, with a WirePlumber setting that keeps headsets on A2DP, or with call support.

None of them is on today, so every phone with Bluetooth gains them.

Device and build

  • Phone: Pixel 7 (panther)
  • Kernel release (uname -r): 7.3.0-rc6-omamobile-push1-gbb6c8a7ff379 (a Bluetooth test kernel for the Pixel 7: the board's Bluetooth node on top of what it already runs), rebuilt with these options and BT_RFCOMM, which this PR no longer adds.
  • Packages changed, with versions: none (kernel/configs/omamobile.config only)

Checks (no phone needed)

  • tools/pr-check upstream/main passes
  • tests/all passes
  • tests/packages passes (no package changed)
  • Each changed package has its version bumped (none changed)
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build.
  • What passed (device/panther/BLUETOOTH-PLAN.md BT2, in a later PR):
    • A Logitech MX Master 3 over BLE.
      • Before: input-hog profile accept failed.
      • After: /dev/uhid exists, uhid and hid_logitech_hidpp load, the kernel logs "input: MX Master 3 Mouse as /devices/virtual/misc/uhid/…" and "logitech-hidpp-device …: HID++ 4.5 device connected", and the mouse drives the shell.
    • Sony WF-1000XM5 headphones.
      • A2DP played without these options.
      • With them, bluetoothd creates a "WF-1000XM5 (AVRCP)" input device, and the headphones' play/pause and volume buttons control mpv.
  • What I did not test:
    • calls over the headset profile (SCO);
    • a classic (non-BLE) keyboard;
    • any phone other than the Pixel 7.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, @nesmeck. A BLE mouse that connects but never moves the pointer is exactly the kind of gap people hit on day one, and the before/after log lines make each option's purpose clear. I checked the fragment against the published kernel:

  • All five symbols exist on omamobile.
  • A defconfig plus our fragment, with and without this change, differs by exactly those five lines, all =m, and nothing else moves. HID_LOGITECH's dependencies (USB_HID, LEDS_CLASS, LEDS_CLASS_MULTICOLOR) are met, so it isn't silently dropped.
  • tools/pr-check is clean, CI is green, and the branch merges cleanly onto today's main and alongside kernel config: the zuma-family PCIe PHY (CONFIG_PHY_ZUMA_PCIE) #274, the other open fragment change.

UHID, the two Logitech options and INPUT_UINPUT look good to me. My one question is about BT_RFCOMM, because it changes more than a log line on every phone with Bluetooth, the Pixel 7 Pro included.

With RFCOMM, PipeWire's Bluetooth backend can offer the headset profile (HSP/HFP). That's the headset microphone you saw. But on the Pixel 7 Pro, headset audio needs the chip's SCO routing moved from PCM to HCI first (the Bluetooth row in docs/DEVICES.md, and the plan's next step). Until then I expect SCO audio to go nowhere. And WirePlumber 0.5 switches a headset to that profile automatically when something records (bluetooth.autoswitch-to-headset-profile, on by default). So my worry is this: earbuds playing music over A2DP, then a voice note, a browser call or our own push-to-talk opens a microphone, the earbuds switch to HFP, and both directions go silent until the recording ends. Today that can't happen, because without RFCOMM there's no headset profile to switch to.

Could you try it on your Pixel 7 with the WF-1000XM5?

  1. Connect them and play something over A2DP.
  2. Record about 5 seconds from the headset's microphone: pw-record --target <its source> /tmp/t.wav, with the name from wpctl status. Also try the default source, to see whether the headset microphone became the default.
  3. Report what wpctl status shows for the card's profile during and after the recording, whether the music keeps playing (or comes back), and whether /tmp/t.wav holds anything.

If the profile switches and the audio dies, I'd move BT_RFCOMM to its own PR. It would land together with the SCO routing, or with a WirePlumber setting that keeps headsets on A2DP. The other four options could go ahead on their own. If nothing breaks, or the microphone works because the Pixel 7's routing differs, then all five can go in together, and that's worth knowing for the 7 Pro too.

One small thing for the commit message: it cites device/panther/BLUETOOTH-PLAN.md BT2, which isn't in the repository yet. Squash merges keep the commit text, so please either land the plan first or say "in a later PR", as the description does. I'll update the line in device/cheetah/WAYDROID-PLAN.md that lists UHID as left off myself.

Thanks again, this makes the phones much more usable with everyday accessories.

Turn on what bluetoothd needs for common Bluetooth devices, as modules
loaded on demand:

- UHID: BLE mice and keyboards (HID over GATT) get their input devices
  through /dev/uhid. Without it bluetoothd logs "input-hog profile accept
  failed" and a paired BLE mouse never reaches the desktop.
- HID_LOGITECH and HID_LOGITECH_HIDPP: Logitech's HID++ devices, such as
  the MX Master, with their battery and extra buttons.
- INPUT_UINPUT: AVRCP, so headphone and speaker buttons (play, pause,
  volume) become key events.

BT_RFCOMM stays off for now. With it, PipeWire offers the headset
profile, and WirePlumber switches headphones to it whenever something
opens a microphone: on the Pixel 7, music over A2DP cut out and mpv
paused when a recording started. It can come with a WirePlumber setting
that keeps headsets on A2DP, or with call support.

All of it was tested on a Pixel 7 (the Pixel 7 Bluetooth plan, in a later PR):
a Logitech MX Master 3 over BLE drove the shell, and a pair of Sony
WF-1000XM5 played over A2DP with their play/pause and volume buttons
working. Every phone with Bluetooth gets the same modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nesmeck
nesmeck force-pushed the kernel-config-bt-hid branch from 9d2428a to 379f5e5 Compare November 3, 2026 04:35
@nesmeck

nesmeck commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, and good call. I ran your test on the Pixel 7 with the WF-1000XM5, on a kernel with all five options. Your worry holds, so I've moved BT_RFCOMM out. The new head is 379f5e5.

What happened (the card's active profile logged once a second, with a video playing in mpv):

Profile Audio
Before the test headset-head-unit (mSBC) audible, call quality
Set to A2DP by hand a2dp-sink normal quality
pw-record --target <headset source>, 5 s headset-head-unit for the whole recording cut out, and mpv paused
After it a2dp-sink within a second mpv still paused
15 s later, pw-record from the default source, 5 s headset-head-unit: the headset microphone had become the default source mpv still paused from the first recording
After it a2dp-sink within a second after mpv was resumed by hand, normal quality
  • bluetooth.autoswitch-to-headset-profile is true, as you said.
  • Both recordings hold real signal (48 kHz, RMS about 0.02-0.03, peak about 0.2), not silence.
  • Before the test the headphones were already on the headset profile with nothing recording, and the video was audible at call quality. I didn't catch what switched them there.

So on the Pixel 7, SCO audio does seem to reach the headphones, and the microphone records over it. That's different from what you expect on the 7 Pro. But the switch still breaks playback: when something opens a microphone, the music stops and mpv pauses until someone resumes it.

The change: BT_RFCOMM is out of this PR, and the other four options stay as tested. The commit message now says why RFCOMM stays off, and it no longer cites the plan (it says "in a later PR"). RFCOMM can come back later, with a WirePlumber setting that keeps headsets on A2DP, or with call support.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, @nesmeck, that's exactly the test I hoped for, and the table makes the result unambiguous: the switch to the headset profile cuts the music and pauses mpv, so leaving BT_RFCOMM out is right for now. It's also good to know SCO audio does reach the headphones on the Pixel 7. The four options left are all modules loaded on demand, they exist on the published kernel, and the merge onto today's main changes only these lines. Merging once the tests job is green; I'll update the Waydroid plan's UHID line myself as promised.

@derekross
derekross merged commit a85057f into derekross:main Nov 3, 2026
2 checks passed
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
… uinput (derekross#304)

Turn on what bluetoothd needs for common Bluetooth devices, as modules
loaded on demand:

- UHID: BLE mice and keyboards (HID over GATT) get their input devices
  through /dev/uhid. Without it bluetoothd logs "input-hog profile accept
  failed" and a paired BLE mouse never reaches the desktop.
- HID_LOGITECH and HID_LOGITECH_HIDPP: Logitech's HID++ devices, such as
  the MX Master, with their battery and extra buttons.
- INPUT_UINPUT: AVRCP, so headphone and speaker buttons (play, pause,
  volume) become key events.

BT_RFCOMM stays off for now. With it, PipeWire offers the headset
profile, and WirePlumber switches headphones to it whenever something
opens a microphone: on the Pixel 7, music over A2DP cut out and mpv
paused when a recording started. It can come with a WirePlumber setting
that keeps headsets on A2DP, or with call support.

All of it was tested on a Pixel 7 (the Pixel 7 Bluetooth plan, in a later PR):
a Logitech MX Master 3 over BLE drove the shell, and a pair of Sony
WF-1000XM5 played over A2DP with their play/pause and volume buttons
working. Every phone with Bluetooth gets the same modules.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants