Bluetooth audio choppy after last update

After the last update (I ran it again today just to be sure) Bluetooth audio is choppy (most of the time - with intermittent periods of clarity). This is from a desktop PC to powered speakers using a USB-Bluetooth adaptor. Tried another adaptor: no change. Tried phone to speakers in same room: no problem.

System load: <10% CPU
Memory: 8Gb / 15Gb (50% ish)

Is there scope for tinkering with this connection or exploring what’s going on?

Thanks.

Is WiFi 2G also active?

Yes, I know the issue seems to have originated with an update but the problem perfectly matches WiFi 2G interference.

I disabled 2.4Ghz in the router but it made no difference.

A possible power management issue at play? The below will only help if this is the case.

Examine the USB devices with
lsusb
For example I have
Bus 001 Device 005: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Then plug the bus and device number in like this (your may be different)…
udevadm info -q path -n /dev/bus/usb/001/005
to get the sysfs path eg
/devices/pci0000:00/0000:00:14.0/usb1/1-8
Check the power management setting for this device with
~> cat /sys/bus/usb/devices/1-8/power/control
I get autowhich means it is active.

It is possible to turn off power management for a given device using a udev rule by creating a custom rule eg
sudo nano /etc/udev/rules.d/99-bluetooth-usb-power.rules
with a suitable entry eg
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="0a2a", TEST=="power/control", ATTR{power/control}="on"
Use the vendor and product IDs pertaining to your device as enumerated via lsusb
then

sudo udevadm control --reload
sudo udevadm trigger

If you want to disable USB power management globally, you can add the usbcore.autosuspend=-1 boot parameter to your GRUB config.

Okay, 2.4 GHz active. Testing with 2.4GHz disabled in the router is a good start but no definitive answer, apart from WiFi there are other 2.4 GHz interferes, old cordless landline phones, ZigBee etc. and with the router WiFi down the clients might go active scanning or it is a neighbor WiFi.

Unfortunately I do not know a way to prove this choppy behavior is due to interference, but can you tell a bit more about the connection, what is the distance between the PC and the BT-speaker?

My BT headset is working fine, there is some WiFi active and I did create HCI trace using:

sudo btmon -w /tmp/ramdisk/bt4.log

Did have it run for ~1 sec before hitting Ctrl-C and did plot it (make sure gnuplot is installed):

 759 ACL packets
        TX Latency: 3-23 msec (~7 msec)
        TX speed: ~307 Kb/s
        TX Latency: 3-23 msec (~4 msec)
        TX speed: ~491 Kb/s
Full output
$ btmon -a /tmp/ramdisk/bt4.log 
Bluetooth monitor ver 5.79
Trace contains 1266 packets

Found BR/EDR controller with index 65535
  BD_ADDR 00:00:00:00:00:00
  0 commands
  0 events
  0 ACL packets
  0 SCO packets
  0 ISO packets
  0 vendor diagnostics
  2 system notes
  0 user logs
  1 control messages 
  0 unknown opcodes

Found BR/EDR controller with index 0
  BD_ADDR 00:1A:7D:D3:D1:A3 (Cambridge Silicon Radio)
  0 commands
  501 events
  759 ACL packets
  0 SCO packets
  0 ISO packets
  0 vendor diagnostics
  0 system notes
  0 user logs
  0 control messages 
  0 unknown opcodes
  Found unknown connection with handle 72
        Address: 00:00:00:00:00:00 (OUI 00-00-00)
        Connection setup missing
        TX packets: 759/759
        TX Latency: 3-23 msec (~7 msec)
        TX size: 249-310 octets (~289 octets)
        TX speed: ~307 Kb/s

                                                                               
  1000 +-+-----------------------------------------------------------------+   
        +|                                                                 |   
        +|                                                      TX +-----+ |   
        +|                    +                                            |   
        +|                 +  |                                            |   
   100 +-|          +      |  |                                            |   
        +|          |      |  |                                            |   
        +|          | +    |  |  +                                         |   
        +|       +  | |    |  |  |                                         |   
        +|       |  | |    |  |  | +                                       |   
         |       |  | |    |  |  | |       +     +                         |   
    10 +-|       |  | |  + |  |  | |       |  +  |                         |   
        +|       |  | |  | |  |  | |     + |  |  |                         |   
        +|       |  | |  | |  |  | |  +  | |  |  |                         |   
        +|       |  | |  | |  |  | |  |  | |  |  |                    +    |   
        +|       |  | |  | |  |  | |  |  | |  |  |                    |    |   
     1 +-|       |  | |  | |  |  | |  |  | |  |  |                    |    |   
        +|       |  | |  | |  |  | |  |  | |  |  |                    |    |   
        ++-----------------------------------------------------------------+   
         +            +            +             +            +            +   
         0            5            10            15           20           25  
                                    Latency (ms)                               
                                                                               
  Found TX L2CAP channel with CID 580
        TX packets: 253/265
        TX Latency: 3-23 msec (~4 msec)
        TX size: 310-310 octets (~310 octets)
        TX speed: ~491 Kb/s

                                                                               
  1000 +-+-----------------------------------------------------------------+   
        +|                                                                 |   
        +|                                                      TX +-----+ |   
        +|                                                                 |   
        +|                                                                 |   
   100 +-|          +                                                      |   
        +|          |                                                      |   
        +|          | +                                                    |   
        +|       +  | |                                                    |   
        +|       |  | |                                                    |   
         |       |  | |                                                    |   
    10 +-|       |  | |    +     +                                         |   
        +|       |  | |  + |     |                                         |   
        +|       |  | |  | |     |                                         |   
        +|       |  | |  | |     |                                         |   
        +|       |  | |  | |     |            +                            |   
     1 +-|       |  | |  | |     |       +    |  +                    +    |   
        +|       |  | |  | |     |       |    |  |                    |    |   
        ++-----------------------------------------------------------------+   
         +            +            +             +            +            +   
         0            5            10            15           20           25  
                                    Latency (ms)

Would be good if you can create a 1 second trace while things are fine and another one when things are bad. Plot them and check the difference and share the complete full output like I did above.

If you like to do some tinkering, see:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.