Public bug reported:

Pipewire/BlueZ is constantly sending audio data to Bluetooth headphones
even when no audio is playing.

This causes three problems:
1. Prevents any other device sending audio to the headphones when Bluetooth 
multipoint connection is use. 
2. Additional battery drain on a laptop due to unnecessary Bluetooth traffic.
3. Additional battery drain on the headphones for the same reason.

The first problem is the primary reason for creating this bug report, it
can prevent the headphones from being used with two devices
simultaneously (e.g. computer and mobile phone) when only one device
plays audio at any one time (a so-called 'multipoint connection').

The issue can be easily diagnosed by running 'sudo btmon' and noticing
that very similar packets are continually being transmitted, even when
no audio is being played, likely representing silence encoded as
Bluetooth A2DP packets. When audio is played via the computer, these
packets look like encoded data (the audio encoded as Bluetooth A2DP
packets).

Sometimes this does not cause an issue, it all depends on what
connection the headphones deem as the primary connection, if the
computer is deemed the priority then the silence being continually
transmitted prevents audio from the other connected device being heard.
If the other connected device is deemed the priority then its audio will
be heard instead and the silence from the computer ignored.

Note that Android works properly in this aspect: when no audio is
playing, it does not continually send audio packets to the headphones
allowing the other device to play audio correctly, irrespective of which
device is deemed the priority by the headphones.

$ lsb_release -rd
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
richard@richard-dell:~
$ sudo apt-cache policy bluez
bluez:
  Installed: 5.64-0ubuntu1
  Candidate: 5.64-0ubuntu1
  Version table:
 *** 5.64-0ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
richard@richard-dell:~
$ sudo apt-cache policy pipewire-media-session 
pipewire-media-session:
  Installed: 0.4.1.r11.ga870086-2~ubuntu22.04
  Candidate: 0.4.1.r11.ga870086-2~ubuntu22.04
  Version table:
 *** 0.4.1.r11.ga870086-2~ubuntu22.04 500
        500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     0.4.1-2ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
richard@richard-dell:~
$ sudo apt-cache policy pipewire-pulse
pipewire-pulse:
  Installed: 0.3.58-1~ubuntu22.04
  Candidate: 0.3.58-1~ubuntu22.04
  Version table:
 *** 0.3.58-1~ubuntu22.04 500
        500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3.48-1ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
richard@richard-dell:~
$ sudo apt-cache policy pipewire-audio-client-libraries 
pipewire-audio-client-libraries:
  Installed: (none)
  Candidate: 0.3.58-1~ubuntu22.04
  Version table:
     0.3.58-1~ubuntu22.04 500
        500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main amd64 Packages
        500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main i386 Packages
        100 /var/lib/dpkg/status
     0.3.48-1ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

$ bluetoothctl info
Device 80:C7:55:FB:B1:4E (public)
        Name: RB-M700B
        Alias: RB-M700B
        Class: 0x00240404
        Icon: audio-headset
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Vendor specific           (00000000-0000-0000-0099-aabbccddeeff)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)

** Affects: bluez (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bluez in Ubuntu.
https://bugs.launchpad.net/bugs/1990081

Title:
  Computer continually sends audio to bluetooth headphones

Status in bluez package in Ubuntu:
  New

Bug description:
  Pipewire/BlueZ is constantly sending audio data to Bluetooth
  headphones even when no audio is playing.

  This causes three problems:
  1. Prevents any other device sending audio to the headphones when Bluetooth 
multipoint connection is use. 
  2. Additional battery drain on a laptop due to unnecessary Bluetooth traffic.
  3. Additional battery drain on the headphones for the same reason.

  The first problem is the primary reason for creating this bug report,
  it can prevent the headphones from being used with two devices
  simultaneously (e.g. computer and mobile phone) when only one device
  plays audio at any one time (a so-called 'multipoint connection').

  The issue can be easily diagnosed by running 'sudo btmon' and noticing
  that very similar packets are continually being transmitted, even when
  no audio is being played, likely representing silence encoded as
  Bluetooth A2DP packets. When audio is played via the computer, these
  packets look like encoded data (the audio encoded as Bluetooth A2DP
  packets).

  Sometimes this does not cause an issue, it all depends on what
  connection the headphones deem as the primary connection, if the
  computer is deemed the priority then the silence being continually
  transmitted prevents audio from the other connected device being
  heard. If the other connected device is deemed the priority then its
  audio will be heard instead and the silence from the computer ignored.

  Note that Android works properly in this aspect: when no audio is
  playing, it does not continually send audio packets to the headphones
  allowing the other device to play audio correctly, irrespective of
  which device is deemed the priority by the headphones.

  $ lsb_release -rd
  Description:    Ubuntu 22.04.1 LTS
  Release:        22.04
  richard@richard-dell:~
  $ sudo apt-cache policy bluez
  bluez:
    Installed: 5.64-0ubuntu1
    Candidate: 5.64-0ubuntu1
    Version table:
   *** 5.64-0ubuntu1 500
          500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
          100 /var/lib/dpkg/status
  richard@richard-dell:~
  $ sudo apt-cache policy pipewire-media-session 
  pipewire-media-session:
    Installed: 0.4.1.r11.ga870086-2~ubuntu22.04
    Candidate: 0.4.1.r11.ga870086-2~ubuntu22.04
    Version table:
   *** 0.4.1.r11.ga870086-2~ubuntu22.04 500
          500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main amd64 Packages
          100 /var/lib/dpkg/status
       0.4.1-2ubuntu1 500
          500 http://gb.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
  richard@richard-dell:~
  $ sudo apt-cache policy pipewire-pulse
  pipewire-pulse:
    Installed: 0.3.58-1~ubuntu22.04
    Candidate: 0.3.58-1~ubuntu22.04
    Version table:
   *** 0.3.58-1~ubuntu22.04 500
          500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main amd64 Packages
          100 /var/lib/dpkg/status
       0.3.48-1ubuntu1 500
          500 http://gb.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
  richard@richard-dell:~
  $ sudo apt-cache policy pipewire-audio-client-libraries 
  pipewire-audio-client-libraries:
    Installed: (none)
    Candidate: 0.3.58-1~ubuntu22.04
    Version table:
       0.3.58-1~ubuntu22.04 500
          500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main amd64 Packages
          500 
https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu 
jammy/main i386 Packages
          100 /var/lib/dpkg/status
       0.3.48-1ubuntu1 500
          500 http://gb.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

  $ bluetoothctl info
  Device 80:C7:55:FB:B1:4E (public)
          Name: RB-M700B
          Alias: RB-M700B
          Class: 0x00240404
          Icon: audio-headset
          Paired: yes
          Trusted: yes
          Blocked: no
          Connected: yes
          LegacyPairing: no
          UUID: Vendor specific           (00000000-0000-0000-0099-aabbccddeeff)
          UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
          UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
          UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
          UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
          UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
          UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
          UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1990081/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to