Bluetooth headphones kill USB microphone
Hello, I am experiencing an issue with pipewire and wireplumber. After a recent update (last week), my external USB microphone ceases to work after connecting Bluetooth headphones.
I can reproduce it by the following:
- USB microphone connected, Bluetooth headphones disconnected
- Go to https://talky.io and click start chat
- In the audio settings section, I can see the microphone bar moving when I speak, indicating the mic is working.
- Connect Bluetooth headphones
- Soon after (5 seconds or so), the microphone bar is not moving anymore, after a while the site displays an error "Media lost."
I am running Arch Linux with pipewire in the following versions:
local/easyeffects 7.1.5-1
Audio Effects for Pipewire applications
local/gst-plugin-pipewire 1:1.0.4-2
Multimedia graph framework - pipewire plugin
local/helvum 0.5.1-1
GTK patchbay for PipeWire
local/libpipewire 1:1.0.4-2
Low-latency audio/video router and processor - client library
local/libwireplumber 0.5.0-1
Session / policy manager implementation for PipeWire - client library
local/pipewire 1:1.0.4-2
Low-latency audio/video router and processor
local/pipewire-audio 1:1.0.4-2
Low-latency audio/video router and processor - Audio support
local/pipewire-pulse 1:1.0.4-2
Low-latency audio/video router and processor - PulseAudio replacement
local/qemu-audio-pipewire 8.2.2-1
QEMU PipeWire audio driver
local/wireplumber 0.5.0-1
Session / policy manager implementation for PipeWire
My microphone is: Snab Microtone HF-50 USB (lsusb shows C-Media Electronics, Inc. Blue Snowball ) My headphones are: Sony Sony WH-1000XM5
I have collected two pw-dump's - when microphone is working pwdump-before.log and when it's not pwdump-after.log, for easier investigation.
There are couple of interesting changes between them, when observed using git diff
:
- Microphone state changes from
"running"
to"idle"
("alsa.long_card_name": "MICE MICROPHONE HF-50 Microphone at usb-0000:0d:00.3-4, full speed"
)
- "state": "running",
+ "state": "idle",
-
Format
andBuffer
definition of the microphone changes to empty
- "Format": [
- {
- "mediaType": "audio",
- "mediaSubtype": "dsp",
- "format": "F32P"
- }
- ],
- "Buffers": [
- {
- "buffers": { "default": 1, "min": 1, "max": 32 },
- "blocks": 1,
- "size": { "default": 32768, "min": 64, "max": 2147483647 },
- "stride": 4
- }
- ],
+ "Format": [ ],
+ "Buffers": [ ],
-
"node.name": "bluez_input.AC:80:0A:33:F2:23"
"media.name": "WH-1000XM5 output"
state changes from"suspended"
to"running"
- "state": "suspended",
+ "state": "running",
- The
WH-1000XM5 output
getsFormat
populated
- "Format": [ ],
+ "Format": [
+ {
+ "mediaType": "audio",
+ "mediaSubtype": "raw",
+ "format": "F32P",
+ "channels": 1,
+ "position": [ "MONO" ]
+ }
+ ],
- The
"media.name": "Bluetooth internal capture stream for WH-1000XM5 input"
changes from"idle"
to"running"
- "state": "idle",
+ "state": "running",
I suspect this to be the culprit, as the headphones are in a Headset, not Handsfree mode and should not be supplying microphone input and it probably somehow overrides my external USB mic. 6. The "Bluetooth internal capture stream for WH-1000XM5 input"
gets Format and Buffers.
- "Format": [ ],
- "Buffers": [ ],
+ "Format": [
+ {
+ "mediaType": "audio",
+ "mediaSubtype": "dsp",
+ "format": "F32P"
+ }
+ ],
+ "Buffers": [
+ {
+ "buffers": { "default": 1, "min": 1, "max": 32 },
+ "blocks": 1,
+ "size": { "default": 32768, "min": 64, "max": 2147483647 },
+ "stride": 4
+ }
+ ],
- Some
"type": "PipeWire:Interface:Port",
gets quantification and rates set to 0
- "minQuantum": 1.000000,
- "maxQuantum": 1.000000,
- "minRate": 512,
- "maxRate": 512,
+ "minQuantum": 0.000000,
+ "maxQuantum": 0.000000,
+ "minRate": 0,
+ "maxRate": 0,
- Some
"type": "PipeWire:Interface:Link",
get reassigned output node and port ids.
"info": {
- "output-node-id": 52,
- "output-port-id": 66,
+ "output-node-id": 90,
+ "output-port-id": 94,
"input-node-id": 96,
"input-port-id": 83,
"change-mask": [ "state", "format", "props" ],
"state": "active",
"error": null,
"format": {
"mediaType": "audio",
"mediaSubtype": "dsp",
"format": "F32P"
},
"props": {
"client.id": 31,
"factory.id": 20,
"link.input.node": 96,
"link.input.port": 83,
- "link.output.node": 52,
- "link.output.port": 66,
+ "link.output.node": 90,
+ "link.output.port": 94,
"object.id": 86,
- "object.serial": 292
+ "object.serial": 303
}
- The
"type": "PipeWire:Interface:Client",
gets new id, serial and pid data
{
"id": 95,
"type": "PipeWire:Interface:Client",
"version": 3,
"permissions": [ "r", "w", "x", "m" ],
"info": {
"change-mask": [ "props" ],
"props": {
"application.language": "en_US.UTF-8",
"application.name": "pw-dump",
"application.process.binary": "pw-dump",
"application.process.host": "marcin-pc",
- "application.process.id": 6432,
+ "application.process.id": 6854,
"application.process.user": "marcin",
"clock.power-of-two-quantum": true,
- "core.name": "pipewire-marcin-6432",
+ "core.name": "pipewire-marcin-6854",
"core.version": "1.0.4",
"cpu.max-align": 32,
"default.clock.max-quantum": 2048,
"default.clock.min-quantum": 32,
"default.clock.quantum": 1024,
"default.clock.quantum-floor": 4,
"default.clock.quantum-limit": 8192,
"default.clock.rate": 48000,
"default.video.height": 480,
"default.video.rate.denom": 1,
"default.video.rate.num": 25,
"default.video.width": 640,
"link.max-buffers": 64,
"log.level": 0,
"mem.allow-mlock": true,
"mem.warn-mlock": false,
"module.id": 2,
"object.id": 95,
- "object.serial": 293,
+ "object.serial": 307,
"pipewire.access": "unrestricted",
"pipewire.protocol": "protocol-native",
"pipewire.sec.gid": 1000,
- "pipewire.sec.pid": 6432,
+ "pipewire.sec.pid": 6854,
"pipewire.sec.socket": "pipewire-0-manager",
"pipewire.sec.uid": 1000,
"remote.name": "[pipewire-0-manager,pipewire-0]",
"settings.check-quantum": false,
"settings.check-rate": false,
"window.x11.display": ":1"
}
}
}
This is the end of the diff.