You are not logged in.
Pages: 1
Topic closed
Using pipewire and bluetooth headset, getting stuttering sound and lagging with sound on video.
From the wiki :
Bluetooth devices
PipeWire handles Bluetooth audio devices if the pipewire-pulse package is installed. More specifically, the media session daemon checks for /etc/pipewire/media-session.d/with-pulseaudio, and enables its bluez5 module automatically if the file exists.The configuration is located in the bluez-monitor configuration file, either /etc/pipewire/media-session.d/bluez-monitor.conf (for system-wide configuration) or ~/.config/pipewire/media-session.d/bluez-monitor.conf (for user-specific configuration). A template for the configuration file can be copied from /usr/share/pipewire/media-session.d/bluez-monitor.conf.
ls /etc/pipewire/media-session.d/with-pulseaudio
ls: cannot access '/etc/pipewire/media-session.d/with-pulseaudio': No such file or directory
Pipewire
extra/pipewire 1:0.3.38-1 [installed]
extra/pipewire-alsa 1:0.3.38-1 [installed]
extra/pipewire-media-session 1:0.3.38-1 [installed]
extra/pipewire-pulse 1:0.3.38-1 [installed]
community/helvum 0.3.1-3 [installed]
Bluetooth
extra/bluez 5.61-1 [installed]
extra/bluez-libs 5.61-1 [installed]
extra/bluez-utils 5.61-1 [installed]
community/bluez-tools 0.2.0-5 [installed]
community/python-pybluez 0.23-1 [installed]
What else can I check? I am connected via wifi on 5MHZ band.
Last edited by hwallace (2021-10-10 20:17:32)
Offline
Fan of Giorgio Moroder & Mohammad Ammax enemy
Offline
Bro, what if I don't even have "/etc/pipewire/media-session.d/" folder. And the rest folders in pipewire are empty
Offline
The solution was to dump pipewire.
Of course this was 2.5 years ago so maybe it's better now? Don't know don't care.
Offline
The solution was to dump pipewire.
Of course this was 2.5 years ago so maybe it's better now? Don't know don't care.
As you still wrote it, maybe you could add a couple of details on what you exactly did
Offline
Hey, I know this is kinda late, sorry for the necro bump!
But I want to help anyone who finds this thread and is still struggling with this issue. So here's a fix that worked for me:
TL;DR how to fix:
The real solution for PipeWire Bluetooth stuttering is using a real-time (RT) Linux kernel. This kernel handles task scheduling much better for audio streaming, eliminating lag and stuttering.
What probably won't work:
- Tweaking PipeWire configs or adjusting rtkit priorities alone usually won't fix it.
- Bluetooth codec hacks, restarting services, or switching Wi-Fi bands might help a bit but won't solve the core problem.
- The root cause is how the standard kernel schedules CPU time, which interrupts audio processing.
Why the RT kernel?
RT means real-time. It guarantees minimal latency and prioritizes CPU time for tasks that need it like audio streaming. On a typical Linux desktop, this means smoother sound, less lag, and better Bluetooth performance without dropouts or stuttering.
How to switch kernels & fix Nvidia drivers:
Here are the main commands I used on Arch Linux (your setup might differ):
sudo pacman -S linux-rt linux-rt-headers
sudo pacman -S nvidia-dkms ## for nvidia users
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-set-default "Arch Linux, with Linux linux-rt"
And then reboot to your new kernel!
- Install the linux-rt kernel and its headers.
- Use nvidia-dkms instead of plain nvidia so the driver compiles for any kernel, including RT.
- Regenerate your GRUB config to include the new kernel.
- Set the RT kernel entry as the default boot option.
After reboot, you should be running the RT kernel and your Bluetooth audio via PipeWire should stop stuttering.
Note:
These steps may vary depending on your distro, bootloader, or system setup, but the general idea is the same: real-time kernel = smooth audio.
Hope this helps anyone stuck with Bluetooth lag on PipeWire.
Offline
RT kernels and BT are normally two concepts that aren't mixing. And for "normal" audio you don't usually need the latency guarantees an RT kernel gives you. However thanks for the on-topic solution that seems to have fixed things for you. But in any case this thread is so old now, if anyone still has the issue they should open a new one.
Closing.
Offline
Pages: 1
Topic closed