omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Bluetooth HFP microphone captures complete silence on OnePlus Bullets Wireless Z2 and JBL Tune 770NC

Open arsinghin opened this issue 2 months ago • 10 comments

System details

Omarchy 4.0.4-1 Linux kernel 7.1.9-arch1-2 PipeWire 1.6.8 BlueZ 5.87 bluez-utils 5.87 Bluetooth adapter: Realtek Hyprland Affected Bluetooth devices: - OnePlus Bullets Wireless Z2 - JBL Tune 770NC Same microphone problem also reproduced previously on Linux Mint Cinnamon.

What's wrong?

Bluetooth microphone input does not work correctly with multiple Bluetooth headsets/headphones.

I tested:

  • OnePlus Bullets Wireless Z2
  • JBL Tune 770NC

With both devices:

  • Bluetooth pairing and connection work.
  • A2DP playback works normally.
  • HFP/HSP microphone profiles are available.
  • The Bluetooth microphone source is exposed by PipeWire.
  • pw-record can successfully record from the source.
  • HFP/eSCO transport can be established.
  • However, the resulting microphone recording contains effectively complete digital silence.

For example, recording directly through PipeWire and analyzing the WAV with FFmpeg consistently gives:

mean_volume: -91.0 dB
max_volume:  -91.0 dB

I tested both HFP modes:

HFP CVSD  -> microphone source available -> silence
HFP mSBC  -> microphone source available -> silence

I also bypassed applications such as Chrome/Discord and tested directly with pw-record and pw-cat, so this does not appear to be an application-specific microphone permission or routing issue.

During troubleshooting, btmon showed successful HFP/eSCO connection establishment, for example:

Synchronous Connect Complete
Status: Success
Link type: eSCO
Air mode: CVSD

However, WirePlumber repeatedly reports:

spa.bluez5: Failure in Bluetooth audio transport
/org/bluez/hci0/dev_<redacted>/sep2/fd0

I also observed PipeWire Bluetooth nodes transitioning into an error state.

I tried changing the WirePlumber Bluetooth auto-connect configuration to include HFP/HSP:

bluez5.auto-connect = [
    hfp_hf
    hsp_hs
    a2dp_sink
    a2dp_source
]

and restarted:

systemctl --user restart wireplumber pipewire pipewire-pulse

This did not resolve the issue.

I also confirmed:

bluetooth.autoswitch-to-headset-profile = true

Manual HFP profile selection still produces silent recordings.

Important cross-platform observation

The same microphone hardware works normally on:

  • Windows 10
  • Windows 11
  • Android

The same problem also occurred previously on Linux Mint Cinnamon with both Bluetooth devices.

Therefore, this is not limited to a single Bluetooth device and does not appear to be specific to one particular Linux desktop application.

I am not sure which layer is failing, but the current evidence points somewhere in the Linux Bluetooth HFP audio path, potentially involving BlueZ, PipeWire spa.bluez5, WirePlumber, the Bluetooth adapter/kernel, or HFP compatibility.

Minimal reproduction

  1. Connect the Bluetooth headset.
  2. Switch to HFP:
pactl set-card-profile bluez_card.<redacted> headset-head-unit-cvsd
  1. Record directly:
pw-record --target bluez_input.<redacted> /tmp/bt-test.wav
  1. Analyze:
ffmpeg -i /tmp/bt-test.wav -af volumedetect -f null -

Observed:

mean_volume: -91.0 dB
max_volume: -91.0 dB

Request

I would like help identifying where the microphone audio is being lost.

In particular, what would be the best diagnostic to determine whether HFP audio packets are actually reaching BlueZ and PipeWire, and whether spa.bluez5 is failing to decode/forward them into PCM?

I can provide additional btmon, bluetoothd, kernel, PipeWire, and WirePlumber debug logs if needed.

arsinghin avatar Sep 16 '26 12:09 arsinghin

Confirming on a third Bluetooth vendor + a different headset in the same JBL Tune NC family

I can reproduce this exact bug with a different distro, different BT chipset vendor, and a related headset, which rules out a single-vendor driver as the root cause.

System

  • Debian GNU/Linux forky/sid (testing), KDE Plasma
  • Kernel: 7.2.0 x86_64
  • PipeWire 1.6.8-1, pipewire-pulse 1.6.8-1, libspa-0.2-bluetooth 1.6.8-1
  • WirePlumber 0.5.17-1 (libwireplumber-0.5-0 same)
  • BlueZ 5.87-3 (Debian revision of upstream 5.87), bluez-alsa-utils 4.3.1-3.1+b1
  • Bluetooth adapter: Intel BE200 (lsusb: 8087:0036 Intel Corp. BE200 Bluetooth), firmware intel/ibt-0291-0291.sfi, fw version 176-26.26 — not Realtek, unlike the original report
  • Headset: JBL Tune 780NC (bluetoothd modalias bluetooth:v0094p0004d0100) — same JBL Tune NC family as the 770NC reported here

Symptoms — identical to OP

  • A2DP playback: works fine.
  • Switching to headset-head-unit (mSBC) or headset-head-unit-cvsd: profile switches "successfully" in pactl, but:
    spa.bluez5: Failure in Bluetooth audio transport /org/bluez/hci0/dev_<redacted>/sep1/fd0
    pw.node: (bluez_output.<redacted>.1-XXX) running -> error (Received error event)
    
    (also seen against a raw fd path: .../fd50)
  • When the transport does come up without logging an error, parecord/pw-record from bluez_input.<redacted> produces a file that is technically valid audio (correct sample rate/duration) but is pure digital silence — measured peak sample amplitude ≈ 1e-39 (effectively zero / denormal float), consistent with OP's -91.0 dB ffmpeg measurement.
  • hci0 stats while this happens show SCO packets actually flowing both directions (RX sco:12997 TX sco:12972, with errors:16), so — like OP saw in btmon — the eSCO link itself is established and carrying traffic; the payload is being lost or zeroed somewhere between the SCO socket and the PCM node in spa-bluez5/WirePlumber, not at the air interface.

Possible regression window (new data point) This was working normally for me until ~2 days before I noticed it broken. My apt history shows the only Bluetooth/audio-stack-relevant upgrade in that window was:

wireplumber: 0.5.15-1 -> 0.5.17-1
libwireplumber-0.5-0: 0.5.15-1 -> 0.5.17-1
bluez: 5.87-2 -> 5.87-3 (Debian packaging revision, same upstream 5.87)

I haven't been able to downgrade to confirm (Debian testing doesn't keep old .debs in the local cache), but if anyone can reproduce on WirePlumber 0.5.15 vs 0.5.17 with the same headset, that'd narrow this down fast — the symptom (transport reports success/no fatal error but PCM is silent, plus intermittent Failure in Bluetooth audio transport) showing up right at a WirePlumber point release smells like a regression in the BlueZ monitor rather than something kernel-driver- or vendor-specific.

Reload workaround (partial, doesn't actually fix it) For what it's worth, modprobe -r btusb && modprobe btusb (+ rfkill unblock bluetooth + reconnecting the device) makes the Failure in Bluetooth audio transport error message go away, but the recorded audio is still silence — so that's not a real fix, just changes which symptom you see.

Happy to pull more btmon/kernel/WirePlumber debug logs if it helps narrow down where in spa-bluez5 the SCO payload is getting dropped.

rodrigobprado avatar Sep 16 '26 14:09 rodrigobprado

Fourth headset vendor, older Intel silicon, newer kernel — plus an HCI trace: eSCO comes up cleanly and then carries zero packets

Reproducing on Omarchy with a Huawei headset and a 2015-era Intel adapter. I captured a btmon trace across the profile switch, since the thread was waiting on packet-level data — and it points at a different stage than I expected, and arguably a second failure mode distinct from @rodrigobprado's BE200 report.

System

  • Omarchy 4.0.4-1
  • Kernel 7.2.5-3-omarchy (package linux-omarchy 7.2.5-3) — newer than OP's 7.1.9 and the 7.2.0 Debian report
  • PipeWire 1:1.6.8-1, WirePlumber 0.5.17-1, BlueZ 5.87-2
  • Adapter: Intel Wireless-AC 3168 (lsusb: 8087:0aa7), BT 4.2, Legacy ROM 2.x revision 5.0 build 25 week 20 2015, firmware intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq, Intel BT fw patch 0x43 completed & activated — clean load, no hci0 resets
  • Headset: Huawei FreeBuds Pro 5 (modalias bluetooth:v027Dp4114d0000)

Across the three reports the bug now spans Realtek, Intel BE200 (BT 5.4, 2023) and Intel AC 3168 (BT 4.2, 2015), with OnePlus, JBL Tune NC and Huawei headsets, on kernels 7.1.9 / 7.2.0 / 7.2.5. Hard to pin on one vendor's driver.

Userspace symptoms

A2DP playback is perfect — a2dp-sink, AAC, stable across repeated disconnect/reconnect cycles. Both HFP profiles are offered and the switch reports success (Active Profile: headset-head-unit), bluez_input.* appears as a Source, and then:

spa.bluez5: Failure in Bluetooth audio transport /org/bluez/hci0/dev_<redacted>/fd55
pw.node: (bluez_input.<redacted>.0-67)  suspended -> error (Received error event)
pw.node: (bluez_output.<redacted>.1-70) running   -> error (Received error event)

Identical for MSBC and CVSD. The capture yields no frames at all — a 44-byte WAV header and nothing else, with the Source stuck in SUSPENDED, never reaching running:

$ parecord --device=bluez_input.<redacted> --rate=16000 --channels=1 \
      --format=s16le --file-format=wav mic.wav     # terminated after 6s
$ ls -l mic.wav
-rw-r--r-- 1 user user 44 mic.wav
# python wave: rate=16000 ch=1 frames=0 peak=0 rms=0.0

That already differs from OP and @rodrigobprado, who both get a valid-duration file of digital silence (~-91 dB / ~1e-39 peak).

The HCI trace (btmon -w, across one A2DP → HFP → A2DP cycle)

HFP codec negotiation succeeds — AT+BCC, +BCS: 2, AT+BCS=2, so mSBC is agreed. Then:

< HCI Command: Enhanced Setup Synch.. (0x01|0x003d) plen 59  #6  5.210208
        Handle: 256
        Transmit/Receive Coding Format: Codec: Transparent (0x03)
        Transmit/Receive Codec Frame Size: 60
        Input/Output Data Path: HCI
        Max latency: 13
        Packet type: 0x0380
        Retransmission effort: Optimize for link quality (0x02)
> HCI Event: Command Status (0x0f) plen 4                    #8  5.213593
      Enhanced Setup Synchronous Connection (0x01|0x003d) ncmd 1
        Status: Success (0x00)

... second, overlapping setup request ...

< HCI Command: Enhanced Setup Sync.. (0x01|0x003d) plen 59  #24  5.317676
> HCI Event: Command Status (0x0f) plen 4                   #25  5.321589
      Enhanced Setup Synchronous Connection (0x01|0x003d) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

> HCI Event: Synchronous Connect Complete (0x2c) plen 17    #26  5.334629
        Status: Success (0x00)
        Handle: 257
        Address: <redacted> (Huawei Device Co., Ltd.)
        Link type: eSCO (0x02)
        Transmission interval: 0x0c
        Retransmission window: 0x04
        RX packet length: 60
        TX packet length: 60
        Air mode: Transparent (0x03)

So the eSCO link is established successfully, on handle 257, with exactly the parameters mSBC wants (transparent air mode, 60-byte frames, HCI data path).

And then, for the remaining ~5 s of the capture while parecord is actively reading, not one SCO data packet appears in either direction. The next traffic of any kind is the teardown at t+10.3 s:

< ACL: Handle 256 ... "+CIEV: 2,0"

The whole capture is 1589 bytes / 168 decoded lines for ~10 s — consistent with an idle eSCO channel, not a busy one.

Why I think this is a second presentation, not the same one

  • BE200 / Realtek: SCO packets flow both directions, payload is silence.
  • AC 3168 here: eSCO negotiated and up, zero packets ever exchanged, parecord gets zero frames.

Both end in spa.bluez5: Failure in Bluetooth audio transport, but the failing stage looks different — there, data moves and is empty; here, nothing ever writes to or reads from a perfectly good eSCO handle. If those are one bug, the mechanism has to explain both; if they're two, this thread may be conflating them.

Possibly independent, also in the trace

BlueZ issues a second Enhanced Setup Synchronous Connection ~107 ms after the first, while the first is still outstanding, and the adapter rejects it with Invalid HCI Command Parameters (0x12). There's also a spurious Create Connection Cancel mid-setup answered with ACL Connection Already Exists (0x0b). Neither appears fatal — the eSCO still comes up — but both look like something worth a separate look.

Ruled out on this system

  • Not in-ear detection / idle buds — reproduced while wearing them.
  • Not codec-specific — MSBC and CVSD fail identically.
  • Not the bluez5.roles whitelist — widening to [ a2dp_source a2dp_sink hfp_ag hsp_ag ] exposes the HFP profiles and they select fine; the transport still fails.
  • Not pairing/bond state — Paired: yes Bonded: yes Trusted: yes throughout, with A2DP working the whole time.
  • Not eSCO link setup — per the trace above, that part succeeds.

Note for anyone landing here: don't set bluez5.autoswitch-profile = true to chase the mic. Any app opening the mic switches to HFP, the transport fails, and it takes working A2DP playback down with it. Leaving it false keeps playback safe and still lets you select HFP by hand for testing.

Glad to share the raw btsnoop, or re-run with different packet-type / retransmission-effort settings if that would help isolate why the channel stays idle.

Deozelot avatar Sep 22 '26 03:09 Deozelot

Root cause found: a rejected duplicate SCO setup makes the kernel delete the successful SCO connection

Following up on my previous comment with the HCI trace. Turning on WIREPLUMBER_DEBUG=3,spa.bluez5:5 gave the missing piece, and the chain now runs all the way from userspace into net/bluetooth. I believe this explains why the bug is adapter-agnostic across every report here.

1. PipeWire calls sco_do_connect() twice on the same transport

22:18:54 spa.bluez5.native sco_acquire_cb: transport 0x…750: enter sco_acquire_cb
22:18:54 spa.bluez5.native sco_do_connect: transport 0x…750: enter sco_do_connect, codec=MSBC
22:18:54 spa.bluez5.native sco_create_socket: transparent=1
22:18:54 spa.bluez5.native sco_do_connect: transport 0x…750: doing connect
...
22:18:55 spa.bluez5.source.media [media-source.c:1104:do_start]: transport 0x…750 acquire
22:18:55 spa.bluez5.native sco_acquire_cb: transport 0x…750: enter sco_acquire_cb
22:18:55 spa.bluez5.native sco_do_connect: transport 0x…750: enter sco_do_connect, codec=MSBC
22:18:55 spa.bluez5.native sco_create_socket: transparent=1
22:18:55 spa.bluez5.native sco_do_connect: transport 0x…750: doing connect

Same transport pointer both times — once when the profile switches and the nodes are created, then again from media-source.c:do_start when an app actually opens the source.

2. That produces two overlapping Enhanced Setup Synchronous Connection commands, 107 ms apart. The first succeeds; the second is rejected.

From the btmon trace in my previous comment:

< HCI Command: Enhanced Setup Synch.. (0x01|0x003d)  #6   5.210208   Handle: 256
> HCI Event: Command Status                          #8   5.213593   Status: Success (0x00)

< HCI Command: Enhanced Setup Sync..  (0x01|0x003d) #24   5.317676   Handle: 256
> HCI Event: Command Status                         #25   5.321589   Status: Invalid HCI Command Parameters (0x12)

> HCI Event: Synchronous Connect Complete (0x2c)    #26   5.334629
        Status: Success (0x00)
        Handle: 257
        Link type: eSCO (0x02)
        Air mode: Transparent (0x03)

Note both commands carry Handle: 256 — the ACL handle. The eSCO link that successfully comes up is handle 257.

3. The kernel's error handler for the rejected command tears down the successful eSCO conn

hci_cs_enhanced_setup_sync_conn() on non-zero status calls hci_setup_sync_conn_status(hdev, cp->handle, status) — and cp->handle is the ACL handle, 256:

static void hci_setup_sync_conn_status(struct hci_dev *hdev, __u16 handle, __u8 status)
{
	acl = hci_conn_hash_lookup_handle(hdev, handle);
	if (acl) {
		link = list_first_entry_or_null(&acl->link_list, struct hci_link, list);
		if (link && link->conn) {
			link->conn->state = BT_CLOSED;
			hci_connect_cfm(link->conn, status);
			hci_conn_del(link->conn);
		}
	}
}

It resolves the failed command's ACL handle to whatever SCO link is attached to that ACL — which is the perfectly good eSCO conn from step 2 — then sets it BT_CLOSED, confirms it with the failure status, and hci_conn_del()s it. There is no check that the link being destroyed is the one the failed command was actually for, nor that it isn't already BT_CONNECTED.

Then in sco.c:

static void sco_connect_cfm(struct hci_conn *hcon, __u8 status)
{
	if (!status) { ... sco_conn_ready(conn); ... }
	else
		sco_conn_del(hcon, bt_to_errno(status));
}

and bt_to_errno(0x12) is EINVAL (net/bluetooth/lib.c).

4. Userspace sees EINVAL and correctly gives up

sco_ready() reads the pending socket error first, and bails before it ever gets to MTU setup:

22:18:55 spa.bluez5.native [backend-native.c:2722:sco_ready]: transport 0x…750: ready
22:18:55 spa.bluez5.native [backend-native.c:2776:sco_ready]: transport 0x…750: acquire failed: Invalid argument (-22)
22:18:55 spa.bluez5           [bluez5-dbus.c:3326]: Failure in Bluetooth audio transport /org/bluez/hci0/dev_<redacted>/fd58
22:18:55 spa.bluez5.native [backend-native.c:2901:sco_event]: transport 0x…750: SCO socket error: Invalid argument (-22)

Confirming it never reached the MTU path: there is no autodetected mtu = …, no getsockopt(SCO_OPTIONS) failed, and no acquire complete, read_mtu=… anywhere in the log. It took the early goto done right after the getsockopt(SO_ERROR) read, exactly as sco_ready() is written to.

Why this explains the whole thread

  • Adapter-agnostic — the fault is in net/bluetooth error handling, not in any vendor driver. Consistent with Realtek + Intel BE200 + Intel AC 3168 + MT7921 + QCA9377 all reproducing.
  • Codec-agnostic — the double acquire happens regardless, so MSBC and CVSD both die. Matches every report.
  • Works on Windows/Android — different userspace, no duplicate setup, so the kernel path is never hit.
  • Explains both observed presentations. Mine: the conn is deleted, so zero SCO packets ever flow and parecord gets 0 frames. @rodrigobprado's: SCO packets flow but carry silence — plausibly the same race landing with different timing (second command arriving before vs. after Synchronous Connect Complete), so the socket survives but is detached from a live conn. Worth checking whether their trace also shows a duplicate setup and a 0x12.

Two independent places this could be fixed

  1. Kernel — hci_setup_sync_conn_status() should not destroy a SCO/eSCO link that is already BT_CONNECTED; a failed new setup request shouldn't reap an established conn on the same ACL.
  2. PipeWire — sco_acquire_cb/sco_do_connect should be idempotent, i.e. not issue a second connect() when the transport is already connecting or connected. That removes the trigger.

Version-checked: I pulled net/bluetooth/{hci_event.c,sco.c,lib.c} at tag v7.2.5 from the stable tree and diffed the three functions above against current mainline — hci_setup_sync_conn_status(), sco_connect_cfm() and bt_to_errno() are byte-identical in both. So this is not a fixed-in-newer situation; the path is live on mainline today. I have the raw btsnoop and the full WirePlumber debug log and can attach either.

Environment as in my previous comment (Omarchy 4.0.4-1, kernel 7.2.5-3-omarchy, PipeWire 1.6.8, WirePlumber 0.5.17, BlueZ 5.87-2, Intel AC 3168, Huawei FreeBuds Pro 5).

Deozelot avatar Sep 22 '26 03:09 Deozelot

Reported the kernel side upstream with the full chain: https://github.com/bluez/bluez/issues/2562

Short version for anyone triaging: the eSCO link does establish (Synchronous Connect Complete: Success), and is then destroyed by the kernel's error handler for a second, rejected Enhanced Setup Synchronous Connection — hci_setup_sync_conn_status() resolves the failed command's ACL handle and deletes whatever SCO link hangs off that ACL, which is the working one. bt_to_errno(0x12) == EINVAL, so the socket is poisoned and PipeWire correctly gives up in sco_ready().

The duplicate setup comes from PipeWire calling sco_do_connect() twice on one transport (profile switch, then media-source.c:do_start); I'm filing that against PipeWire separately as the trigger. Fixing either side should resolve this.

Also cross-referencing bluez/bluez#2545 (MT7921, same kernel/PipeWire/WirePlumber versions) — possibly the same root cause, though I can't confirm it: that report shows corrupted SCO / unknown connection handle kernel messages and I see none here.

Deozelot avatar Sep 22 '26 03:09 Deozelot

Workaround for anyone hitting this: remove mSBC from the codec list.

# ~/.config/wireplumber/wireplumber.conf.d/52-bluez-hfp-no-msbc.conf
monitor.bluez.properties = {
  bluez5.codecs = [ sbc sbc_xq aac cvsd ]
}

Then systemctl --user restart wireplumber and reconnect the device.

Measured on Intel AC 3168 + Huawei FreeBuds Pro 5: with mSBC enabled, 0 successful captures in 20 controlled attempts. With mSBC removed, 6/6 captures contained real audio. A2DP playback is unaffected and still negotiates AAC. The cost is narrowband CVSD mic quality instead of wideband mSBC.

Why it works: when mSBC codec negotiation completes, PipeWire frees the SCO transport while its connect is still in flight. The replacement transport issues a second Enhanced Setup Synchronous Connection, which the controller rejects with 0x12 because the first already established an eSCO link — and the kernel error handler for that rejection reaps the working connection, leaving the socket with EINVAL. It also never disconnects the link at the controller, so every later attempt gets 0x0a until the ACL drops. Dropping mSBC removes the codec switch, so none of that happens.

Full analysis, traces and kernel line references: https://github.com/bluez/bluez/issues/2562

Important if you test this: check the content of your recording, not its length. A failing capture can produce a full-length WAV of pure zeros, which is exactly the "digital silence" several people here have reported.

Deozelot avatar Sep 22 '26 04:09 Deozelot

I can reproduce the HFP/SCO failure with a OnePlus Bullets Wireless Z2 on the same PC where the headset works correctly under Windows 10.

Environment

  • Linux kernel: 7.2.5-3-omarchy
  • BlueZ: 5.87
  • PipeWire: 1.6.8
  • WirePlumber: 0.5.17
  • Bluetooth adapter: Realtek RTL8723B, USB ID 0bda:b008

A2DP works normally. HFP can be selected successfully with CVSD:

headset-head-unit: Headset Head Unit (HSP/HFP, codec CVSD)

The Bluetooth source is created, but recording from it produces completely silent audio:

mean_volume: -91.0 dB max_volume: -91.0 dB

The HCI trace shows that the synchronous connection succeeds:

Setup Synchronous Connection Status: Success Synchronous Connect Complete Link type: eSCO Air mode: CVSD

However, the connection is subsequently terminated. The btmon analysis reports a BR-SCO connection but 0 SCO packets.

I also tested:

  • CVSD with mSBC disabled
  • forcing the HFP/CVSD profile
  • disabling USB Bluetooth autosuspend
  • unloading/reloading btusb

None changed the behavior.

Additionally, WirePlumber crashes during the HFP/SCO testing with faults inside libspa-bluez5.so, including:

general protection fault ... in libspa-bluez5.so

and

segfault ... in libspa-bluez5.so

The Realtek firmware loads successfully:

rtl8723b_fw.bin rtl8723b_config.bin

There are no corresponding Bluetooth errors in the kernel log during the normal HFP attempt.

Since the same headset works correctly on Windows 10 on the same hardware, this appears to be specific to the Linux Bluetooth HFP/SCO path.

I have a BTSnoop capture and the relevant WirePlumber crash information available if they are useful.

arsinghin avatar Sep 22 '26 13:09 arsinghin

Another Realtek data point. The no-mSBC workaround does not help on this adapter; it makes things worse. This matches the RTL8723B report above.

Environment

  • Adapter: Realtek RTL8852BU (USB 13d3:3571, fw 0x127cfd78)
  • Headset: Sony WF-C710N (works for calls on Windows on the same PC)
  • Omarchy 4.0.4, BlueZ 5.87-2, PipeWire 1.6.8-1, WirePlumber 0.5.17-1
  • Kernels: 7.2.5-3-omarchy and stock 7.2.3-arch1-3. Both behave the same.

Results (10 s pw-record from the raw bluez_input…0 node while talking; profile switched by hand, autoswitch off)

Case Result
mSBC, first call-mode entry after systemctl --user restart pipewire pipewire-pulse wireplumber + earbud reconnect Works (83–92% non-zero samples, only gap is ~0.6 s at start)
mSBC, second and later entries in the same PipeWire session Exact zeros. Kernel: SCO packet for unknown connection handle N
Earbud reconnect alone, or adapter power-cycle alone Still silent / stream dies in ~100 ms
CVSD (headset-head-unit-cvsd) 0/4: silent or dead stream
CVSD only, via the bluez5.codecs = [ sbc sbc_xq aac cvsd ] workaround 0/3: transport fails within 62–169 ms, every attempt, including the first after a reset

On the 7.2.5 kernel, one fresh-boot first entry was also silent; on 7.2.3 the fresh-boot first entry worked. That's one sample each, so I don't read a kernel difference into it.

Side effect worth knowing: when the headset flips into HFP mid-stream (WirePlumber autoswitch on mic open), the failure can also wedge A2DP output. The node stays running but never ticks until PipeWire restarts. Kernel logged corrupted SCO packet in that case.

So on Realtek, mSBC is the codec that works (once per PipeWire session) and CVSD is the one that doesn't, the reverse of the Intel AC 3168 result. That fits the double-setup explanation in bluez/bluez#2562 better than a codec-specific one. No btmon capture, sorry (no root in that session).

kinggs avatar Oct 02 '26 11:10 kinggs

Related: #9638 (switch to HFP when selecting headset input), #10779 (panel opening mic), #12405 (HFP/SCO freeze).

Since you also saw this on Mint, it may be BlueZ/PipeWire. Can you grab pactl list sources + active profile (pactl list cards) while the silent mic is selected?

jandrusk avatar Oct 13 '26 16:10 jandrusk

Another data point: MediaTek MT7921 (USB 0e8d:0616) on a desktop board. The HFP microphone captures silence with both mSBC and CVSD, so the no-mSBC workaround does not help here either.

Environment

  • Board: MSI B650M GAMING WIFI (MS-7E30), BIOS 1.F2, onboard MediaTek MT7921 combo (BT over USB 0e8d:0616)
  • BT firmware build: 20260724143815 (linux-firmware-mediatek 20260916-1)
  • Kernel 7.2.8-9-omarchy, BlueZ 5.87-2, PipeWire 1.6.9-1, WirePlumber 0.5.18-1
  • Headset: Razer BlackShark V2 Pro (Bluetooth mode)

Results (direct pw-record from bluez_input.* while speaking, profile switched by hand, autoswitch off; captures checked for content, not just length)

Case Result
mSBC (default), headset-head-unit Silent. btmon shows Synchronous Connect Complete: Success (handle 3584) but SCO RX = 0. Kernel: corrupted SCO packet and SCO packet for unknown connection handle 3584
CVSD only (bluez5.codecs = [ sbc sbc_xq aac cvsd ]), first HFP entry after a fresh reconnect 88% exact-zero samples, peak 2530/32767, Whisper transcribes nothing. No kernel SCO errors this time
CVSD only, A2DP -> HFP again without reconnecting 88% exact-zero samples, peak 326. spa.bluez5: Failure in Bluetooth audio transport .../sep2/fd0, bluez_output...: running -> error

Also tried without success: btusb reload, USB re-enumeration (Failed to apply iso setting (-110)), btusb autosuspend disabled.

Two side effects that may help others:

  • Once during this testing the kernel logged a soft lockup in btusb_work.
  • Switching the card profile A2DP -> HFP once crashed Quickshell (SIGSEGV in QQuickRepeater::regenerate() while PipeWire nodes changed).

The same headset's analog mic works fine through the onboard Realtek ALC897, so capture on the host is fine; only the SCO path is silent. Happy to test the v3 kernel series from bluez/bluez#2562 or collect btmon traces if useful.

valentinosara avatar Oct 21 '26 19:10 valentinosara

Moved to #17734. I first posted my case here because of the matching kernel messages (corrupted SCO packet, SCO packet for unknown connection handle 257), but the mechanism looks different. A phone routes its calls to the PC, so the PC is the hands-free unit and the phone opens the SCO link. Only LC3-SWB fails, and mSBC works. I'm leaving this pointer for anyone who lands here with a phone.

jpaferreira-git avatar Nov 05 '26 13:11 jpaferreira-git