user@argobox:~/journal/2025-12-28-the-bluetooth-stutter-that-wasnt-my-fault
$ cat entry.md

The Bluetooth Stutter That Wasn't My Fault

○ NOT REVIEWED

The Bluetooth Stutter That Wasn’t My Fault

Date: 2025-12-28 Issue: Audio cutting out and crackling every 10-30 seconds Device: Samsung Galaxy Buds 2 Pro Root Cause: ERTM (Enhanced Retransmission Mode) incompatibility Fix Time: 15 minutes once I found it, 3 hours of diagnosis before that


The Symptom

Music playing fine. Then skip. Then fine. Then crackle. Then silence for 2 seconds. Then fine again.

Like using earbuds with poor reception, except I’m sitting right next to my computer.

This happened every 10-30 seconds. Consistently. Made the earbuds basically unusable.


What Wasn’t The Problem

Before finding the actual issue, I checked everything else:

  • PipeWire? Running fine. All three components healthy (pipewire, pipewire-pulse, wireplumber).
  • BlueZ? Version 5.84, recent enough.
  • Pairing? Device showed as paired, trusted, connected.
  • Codec? Using A2DP (high-quality stereo), not the terrible HSP/HFP mode.

Everything looked correct. But the audio kept stuttering.


The Actual Problem

cat /sys/module/bluetooth/parameters/disable_ertm
N

That N was the problem.

ERTM (Enhanced Retransmission Mode) is a Bluetooth feature that provides reliable data transmission with acknowledgments and packet retransmission. Sounds good in theory.

In practice, Samsung Galaxy Buds have notoriously bad ERTM implementations. The Linux Bluetooth stack and Samsung’s firmware disagree on how ERTM should work, causing constant reconnection attempts and audio dropouts.


The Fix

Create a modprobe config to disable ERTM:

# /etc/modprobe.d/bluetooth-usb.conf
options bluetooth disable_ertm=1

Then reload the Bluetooth module:

modprobe -r btusb
modprobe btusb
rc-service bluetooth restart

Verify it took effect:

cat /sys/module/bluetooth/parameters/disable_ertm
Y

That’s it. Audio is now flawless.


Additional Optimizations

While I was in there, I also added some connection interval optimizations to /etc/bluetooth/main.conf:

[General]
FastConnectable = true
ReconnectAttempts = 7
ReconnectIntervals = 1,2,4,8,16,32,64

[LE]
MinConnectionInterval = 7
MaxConnectionInterval = 9
ConnectionLatency = 0

What these do:

  • FastConnectable - Faster connection when taking earbuds out of case
  • Reconnect settings - Better recovery from temporary connection drops
  • Connection intervals - Tighter timing (7-9 units = ~8-11ms) for lower latency

The default connection interval range is absurdly wide (up to 4 seconds between packets). That’s fine for a keyboard, terrible for audio streaming.


Why Samsung Earbuds Are Problematic

It’s not just me. Samsung Galaxy Buds (all models) have documented Linux compatibility issues:

  1. Dual-bud synchronization - One bud is primary, relays to the secondary. Timing sensitive.
  2. Samsung-specific Bluetooth extensions - Non-standard features that confuse Linux.
  3. Aggressive power saving - The buds sleep between packets, causing stutters with wrong timing.
  4. ERTM implementation bugs - Whatever Samsung did, it doesn’t match what Linux expects.

The Improvement

MetricBeforeAfter
StutteringEvery 10-30 secondsNone
CracklingOccasionalNone
Connection dropsSometimesRare
Reconnection time15-30 seconds5-10 seconds
Audio latency~150-200ms~80-120ms

The A2DP Reminder

If audio sounds muffled and terrible, you’re probably on the wrong codec:

# Check current profile
pactl list cards | grep -i "bluez\|profile"

# Force high-quality A2DP
pactl set-card-profile bluez_card.XX_XX_XX_XX_XX_XX a2dp_sink

Some applications (especially ones that try to use the microphone) will switch to HSP/HFP mode, which is 8kHz mono and sounds awful. Always force A2DP for media playback.


The Trade-offs

Disabling ERTM and using tight connection intervals does have costs:

  • Battery - Maybe 5-10% more drain on the earbuds (negligible with charging case)
  • Reliability - Without retransmission, dropped packets are lost (rarely noticeable)

Worth it for audio that doesn’t cut out every 30 seconds.


What Still Doesn’t Work Great

Even with this fix:

  • Microphone quality - Bluetooth mics on Linux are limited by HFP codec (8kHz). Use external USB mic for calls.
  • ANC control - Can’t adjust active noise cancellation from Linux. Need Samsung app on phone.
  • Touch customization - Touch controls work, but customizing them requires the Android app.
  • Battery level - Sometimes reports incorrectly.

These are BlueZ limitations, not fixable with config changes.


Rollback If Needed

If anything breaks:

# Remove the modprobe config
rm /etc/modprobe.d/bluetooth-usb.conf

# Restore original Bluetooth config
cp /etc/bluetooth/main.conf.backup.* /etc/bluetooth/main.conf

# Reload
modprobe -r btusb
modprobe btusb
rc-service bluetooth restart

The Lesson

When Bluetooth audio is choppy, it’s not always interference or distance. Sometimes it’s a protocol incompatibility that requires a single kernel parameter to fix.

The fix took 15 minutes once I knew what to look for. The diagnosis took 3 hours of checking everything else first.


Samsung Galaxy Buds 2 Pro: great earbuds, terrible Linux compatibility out of the box. One line in /etc/modprobe.d/ makes them work perfectly.