Pipewire + Bluetooth mSBC sound distorted

Hi there,

I know this is a never ending story but it’s driving me crazy.
I use a Sennheiser Momentum 4 connected via bluetooth to my desktop machine.
My system is configured to use pipewire for everything, the codecs are all recognized correctly and codec switching works flawless.

Most of the time I’m using the headset as a A2DP sink with aptX HD and it works without issues (sometimes there is a package loss or something when two streams start at the same time or the song switches, but this is inconsistent).

As I’m using this system for work I have to use MS Teams a lot. Doing so I’m switching to the mSBC codec, which should provide a decent quality. I used a Macbook before and the headset works flawless in this configuration.

After switching to mSBC the headsets microphone and playback sounds distorted. It’s not a crackling sound or noise, it’s more like a package loss or something like that.

It’s easy reproducible using audacity, I tried to make a sample recording (in rl it’s much more anoying as in the sample):

I would like to debug this issue and I tried everything on pipewire / bluez I could found (changing the default sample rate, disable other bt devices etc., different linux kernel)

I’m really thankful for any suggestions.

How can I get any logs from bluetooth or bluez?
journalctl for bluetooth doesn´t show anything helpful:

Bluetooth: hci0: SCO packet for unknown connection handle
and sometimes
Bluetooth: hci0: corrupted SCO packet

Where do I find the logs for pipewire?

My system is kind of beefy and I have lots of ram.

I would like to find which of those components are responsible for this issue:

  1. Pipewire / wireplumber
  2. The process priority (rtkit)
  3. bluez
  4. Linux kernel

Is there any way to rule some out?
Thanks for your help and suggestions :slight_smile:

I actually found a “fix” for anyone interested.

I’m using a self build bluetooth split keyboard (corne 5col) which uses a nicenano! chip for bluetooth connection using the ZMK firmware.

Somehow the audio issues with my headset are fixed after disconnecting the keyboard and reconnecting it. So basically after the first boot the issue is present and quite annoying, I switch the keyboard off and on again and all audio issues are resolved until the next reboot.

Doesn´t make any sense to me but resolves this issue more or less.

I rebuild the keyboard firmware and reduces the transmission strength stepwise, didn´t make any change.