Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Bluetooth sound unstable

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

[Solved] Bluetooth sound unstable

#1 Post by alienspy »

Hello! I have a Bluetooth headphones and its sound interrupts with total silence every few minutes for a several seconds. On other devices, including Linux Mint XFCE laptop, everything works fine. I have tried different Bluetooth hardware modules, one simple USB stick, and another one, with info below, is on the Wifi PCIE module. Same result.

I have Debian 12 Gnome on this desktop.

inxi -Eaz

Code: Select all

Bluetooth:
Bluetooth:
  Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 1-10:5 chip-ID: 8087:0032 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter>
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff
    link-mode: peripheral accept service-classes: rendering, capturing, audio,
    telephony

Is there any way to possibly fix this? Thanks.

I don't know is it a disconnection problem or a sound problem.
Last edited by alienspy on 2024-03-18 10:30, edited 1 time in total.

arzgi
Posts: 1198
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 32 times

Re: Bluetooth sound unstable

#2 Post by arzgi »

I have switched to pipewire, but had the same problem with pulseaudio. I had this in my notes to remedy;

Code: Select all

sudo  service bluetooth status

sudo vim /etc/bluetooth/main.conf

FastConnectable = true
ReconnectAttemps = 7

~/.config/pulse/default.pa:

# automatically switch to newly-connected devices
load-module module-switch-on-connect
vim is just an editor, use one youlike, and if you don't have sudo installed, those sudo lines can be done as root.

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#3 Post by alienspy »

arzgi wrote: 2023-10-13 11:40 ~/.config/pulse/default.pa:

# automatically switch to newly-connected devices
load-module module-switch-on-connect
[/code]

vim is just an editor, use one youlike, and if you don't have sudo installed, those sudo lines can be done as root.
Thank you for your reply! I have tested a hypothesis that a "choppy" sound can be caused by keyboard connected by radio and interfering the waves. But no, it doesnt affect in my case. I also connected a BT speaker and it works fine, so the problem is with these headphones particularly.

I will try your method soon, thx. But, there is no /.config/pulse/default.pa in my case, as i use Gnome and it has Pipewire by default. Any advice for PipeWire?

Also there is a section in Debian Wiki for choppy sound. HERE

But... I don't well understand what is "choppy" in english, as i am not a native speaker. In my situation sound just interrupts with silence for a few seconds rather often. And what "load" means in this context. Load of what..? Sound?

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#4 Post by alienspy »

arzgi wrote: 2023-10-13 11:40 ~/.config/pulse/default.pa:

# automatically switch to newly-connected devices
load-module module-switch-on-connect
Nope, your advices didn't help...

I tried

Code: Select all

/etc/pipewire/pipewire-pulse.conf.d/switch-on-connect.conf (or ~/.config/pipewire/pipewire-pulse.conf.d/switch-on-connect.conf)

# override for pipewire-pulse.conf file
pulse.cmd = [
    { cmd = "load-module" args = "module-always-sink" flags = [ ] }
    { cmd = "load-module" args = "module-switch-on-connect" }
]
But it doesn't affect sound quality.

But i also noticed that HSP/HFP codec in Handsfree mode works better. Unfortunately i can't see AptX, LDAC or AAC codecs. And can't find the solution to add them on Debian 12. Or at least i don't see it (with different BT devices), as wiki says "While newer audio codecs such as AptX and LDAC are available in PipeWire"

Same question here (proposed solution there is unavailable) - https://www.reddit.com/r/debian/comment ... bluetooth/

UPD

I have checked on other machine with Debian 12 XFCE and PusleAudio. It works fine there...

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#5 Post by alienspy »

Hm. I noticed that commands written below
First view the quantum using the pw-top command and then increase the quantum value using this command, until the audio becomes smoother.

Code: Select all

pw-metadata -n settings 0 clock.force-quantum 2048
Once you find the right quantum value for your situation, you can make the value permanent by creating a config file ~/.config/pipewire/pipewire.conf.d/choppy-under-load.conf with the following content and restart pipewire related daemons.

Code: Select all

context.properties = {
   default.clock.quantum = 2048
   default.clock.min-quantum = 2048
}
Don't affect pw-top top results. That mysterious for me "quant" number stays the same. Also i noticed that VLC has quant number higher than Celluloid (mpv)

But... somehow after all the meddling with configs i don't have sound interrupts now. But i can't say the reason unfortunately. I will try to reproduce the issue and solving steps on other machine a bit later.

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#6 Post by alienspy »

Hm, that's strange. On second attempt PipeWire works fine on this Debian 12 XFCE also, before i did any manual configs. I don't need PW here, just for the sake of interest. Maybe there was some update, influencing bluetooth/sound?

UPD. Nothing important and relatable to the subject in apt history log, except bluez-firmware and bluez-tools, i think

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#7 Post by alienspy »

Nope. I was too quick to celebrate, the problem prevails. And i bought another Headphones, with support of different codecs: SBC, AAC, Aptx. But sound is again unstable on all codecs, except HSP mSBC. But sound quality is awful. If it is a common problem with Debian 12 Gnome, internet must be overwhelmed with complaints, but i don't see much. Can't understand if not the headphones then whats the problem.

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: Bluetooth sound unstable

#8 Post by sunrat »

Do you have libspa-0.2-bluetooth installed?
Maybe try to use the backports version - https://packages.debian.org/bookworm-ba ... -bluetooth . There is also a much newer version of Pipewire available in backports which is reported to work fine on Bookworm.

I use neither Gnome nor Pipewire, only KDE Plasma, but Bluetooth works fine for my Jabra earbuds with my Thinkpad Yoga.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#9 Post by alienspy »

sunrat wrote: 2024-03-10 20:38 Do you have libspa-0.2-bluetooth installed?
Yes!
Maybe try to use the backports version - https://packages.debian.org/bookworm-ba ... -bluetooth .
I will, thanks!

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#10 Post by alienspy »

sunrat wrote: 2024-03-10 20:38 Maybe try to use the backports version - https://packages.debian.org/bookworm-ba ... -bluetooth .
Oh my gosh, it removed GDM/Gnome... AGAIN.

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: Bluetooth sound unstable

#11 Post by sunrat »

alienspy wrote: 2024-03-11 10:59
sunrat wrote: 2024-03-10 20:38 Maybe try to use the backports version - https://packages.debian.org/bookworm-ba ... -bluetooth .
Oh my gosh, it removed GDM/Gnome... AGAIN.
Surely it would have warned it proposed to do that and gave you the chance to abort.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#12 Post by alienspy »

sunrat wrote: 2024-03-11 12:28 Surely it would have warned it proposed to do that and gave you the chance to abort.
Yes, my bad. Again. Didn't notice. I didn't assume that it is such an important package.

I have found a possibility to test the problem on a laptop with Debian 12 XFCE and Pulseaudio. There is a same problem. Another computer, another audio framework. Unlucky headphones second time..? If the problem is in Debian (Linux Mint FXCE on other laptop is fine), there must be tons of complaints, but that is not the case.

I will try Liqourix kernel now. Maybe it has other power-saving options, which can be the case, as i understood.

https://liquorix.net/#features

User avatar
alienspy
Posts: 158
Joined: 2023-02-12 15:37
Has thanked: 97 times
Been thanked: 5 times

Re: Bluetooth sound unstable

#13 Post by alienspy »

Good news. Looks like I have solved the problem. As a last resort I have bought another one bluetooth receiver, third one. It has Realtek RTL8763BW chip and two antennas. And finally all works fine. I have spent some hours, using Bluetooth headphones, waiting for problems, but they hadn’t occur. Small problem is that LTS Kernel 6.1 doesn’t support this device, so I have used Liquorix kernel, which I have installed earlier. Though, I don’t need this kernel, as it haven’t helped me with sound interrupts, which was my hope at first. So… I bought more old bluetooth receiver with Realtek RTL8761BUV chip with antenna and it also works fine, and also works with stable 6.1 kernel.

I am glad that situation found its resolution, though it is strange for me that USB-dongle Bluetooth receiver (I don’t know the exact model) and receiver on an internal wi-fi adapter (AX 210) have worked so poorly both. Though I was in the distance not more than 2 meters from receiver.

Thanks for help

Post Reply