No H2DP sound in bluetooth headphones

Hello! I’m new on this forum (and in openSUSE as well) and maybe I should start this topic in a Hardware category, but seems like the problem is whis PipeWire, so I’ll start it here.
I’ve just installed openSUSE Tumbleweed and found that I have no H2DP sound sound in my BH317 bluetooth headphones, only HSP/HFP. When I try to set up H2DP in Plasma System Settings this option is available, but I hear only silens. Can anybody help me?

bluetoothctl

[BH317]# Agent registered
[BH317]# devices
Device 4C:72:74:08:55:EC BH317
[BH317]# info 4C:72:74:08:55:EC
Device 4C:72:74:08:55:EC (public)
        Name: BH317
        Alias: BH317
        Class: 0x00260404 (2491396)
        Icon: audio-headset
        Paired: yes
        Bonded: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        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: A/V Remote Control Cont.. (0000110f-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
        Battery Percentage: 0x64 (100)

Seems like everything is ok with bluetooth

pactl list sinks

Sink #461
        State: SUSPENDED
        Name: bluez_output.4C_72_74_08_55_EC.1
        Description: BH317
        Driver: PipeWire
        Sample Specification: s16le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        Base Volume: 65536 / 100% / 0,00 dB
        Monitor Source: bluez_output.4C_72_74_08_55_EC.1.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                api.bluez5.address = "4C:72:74:08:55:EC"
                api.bluez5.codec = "sbc_xq"
                api.bluez5.profile = "a2dp-sink"
                api.bluez5.transport = ""
                bluez5.loopback = "false"
                card.profile.device = "1"
                device.id = "84"
                device.routes = "1"
                factory.name = "api.bluez5.a2dp.sink"
                device.description = "BH317"
                node.name = "bluez_output.4C_72_74_08_55_EC.1"
                node.pause-on-idle = "false"
                priority.driver = "1010"
                priority.session = "1010"
                spa.object.id = "1"
                factory.id = "12"
                clock.quantum-limit = "8192"
                device.api = "bluez5"
                media.class = "Audio/Sink"
                media.name = "BH317"
                node.driver = "true"
                port.group = "stream.0"
                node.loop.name = "data-loop.0"
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "79"
                object.serial = "461"
                client.id = "47"
                api.bluez5.class = "0x260404"
                api.bluez5.connection = "connected"
                api.bluez5.device = ""
                api.bluez5.icon = "audio-headset"
                api.bluez5.path = "/org/bluez/hci0/dev_4C_72_74_08_55_EC"
                bluez5.profile = "off"
                device.alias = "BH317"
                device.bus = "bluetooth"
                device.form_factor = "headset"
                device.icon_name = "audio-headset-bluetooth"
                device.name = "bluez_card.4C_72_74_08_55_EC"
                device.string = "4C:72:74:08:55:EC"
        Ports:
                headset-output: Гарнитура (type: Headset, priority: 0, available)
        Active Port: headset-output
        Formats:
                pcm

I’ve found a hint here: PipeWire - ArchWiki (5.1.12) and it looks like my case, but I’m unsure because I have no such configs neitherr in /etc, nor in ~/.config, though wirepluber is installed. Mayby ArchWiki is a bit outdated and newer versions of wireplumer keep thair config anywhere else?

In my attempts to found pipewire’s configs I’ve discovered a strange thing: systemctl cannot found neither pipewire.service, nor wireplumber.service, nor even pulseaudio service as well. Though, pipewire and wireplumber are running according to process list.

$ps aux | grep pipewire
horahty     1825  0.0  0.1 107676 11512 ?        S<sl июл22   0:01 /usr/bin/pipewire
horahty     1828  0.0  0.2 191208 19976 ?        S<sl июл22   1:39 /usr/bin/pipewire-pulse
horahty    39186  0.0  0.0   6676  4144 pts/2    S+   16:00   0:00 grep --color=auto pipewire

$ ps aux | grep wireplumber
horahty     1827  0.1  0.2 632672 16800 ?        S<sl июл22   3:10 /usr/bin/wireplumber -p main
horahty    39188  0.0  0.0   6676  4140 pts/2    S+   16:00   0:00 grep --color=auto wireplumber

$ systemctl list-units | cat
 UNIT   LOAD   ACTIVE SUB       DESCRIPTION
...
 alsa-restore.service                                                                                       loaded active exited    Save/Restore Sound Card State
  auditd.service                                                                                             loaded active running   Security Audit Logging Service
  avahi-daemon.service                                                                                       loaded active running   Avahi mDNS/DNS-SD Stack
  bluetooth.service                                                                                          loaded active running   Bluetooth service
  bolt.service                                                                                               loaded active running   Thunderbolt system service
  chronyd.service                                                                                            loaded active running   NTP client/server
  cron.service                                                                                               loaded active running   Command Scheduler
  cups.service                                                                                               loaded active running   CUPS Scheduler
  dbus-broker.service                                                                                        loaded active running   D-Bus System Message Bus
  display-manager-legacy.service                                                                             loaded active running   X Display Manager
  dracut-shutdown.service                                                                                    loaded active exited    Restore /run/initramfs on shutdown
  firewalld.service                                                                                          loaded active running   firewalld - dynamic firewall daemon
  getty@tty1.service                                                                                         loaded active running   Getty on tty1
  getty@tty3.service                                                                                         loaded active running   Getty on tty3
  getty@tty4.service                                                                                         loaded active running   Getty on tty4
  getty@tty5.service                                                                                         loaded active running   Getty on tty5
  getty@tty6.service                                                                                         loaded active running   Getty on tty6
  irqbalance.service                                                                                         loaded active running   irqbalance daemon
  kbdsettings.service                                                                                        loaded active exited    Apply settings from /etc/sysconfig/keyboard
  kernel-sysctl.service                                                                                      loaded active exited    Apply Kernel Variables for 6.15.6-1-default
  kmod-static-nodes.service                                                                                  loaded active exited    Create List of Static Device Nodes
  lvm2-monitor.service                                                                                       loaded active exited    Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
  mcelog.service                                                                                             loaded active running   Machine Check Exception Logging Daemon
  ModemManager.service                                                                                       loaded active running   Modem Manager
  NetworkManager-wait-online.service                                                                         loaded active exited    Network Manager Wait Online
  NetworkManager.service                                                                                     loaded active running   Network Manager
  nvidia-persistenced.service                                                                                loaded active running   NVIDIA Persistence Daemon
  plymouth-quit-wait.service                                                                                 loaded active exited    Hold until boot process finishes up
  plymouth-read-write.service                                                                                loaded active exited    Tell Plymouth To Write Out Runtime Data
  plymouth-start.service                                                                                     loaded active exited    Show Plymouth Boot Screen
  polkit.service                                                                                             loaded active running   Authorization Manager
  postfix.service                                                                                            loaded active running   Postfix Mail Transport Agent
  power-profiles-daemon.service                                                                              loaded active running   Power Profiles daemon
  rtkit-daemon.service                                                                                       loaded active running   RealtimeKit Scheduling Policy Service
  smartd.service                                                                                             loaded active running   Self Monitoring and Reporting Technology (SMART) Daemon
  soft-reboot-cleanup.service                                                                                loaded active exited    Cleanup system data after soft-reboot
  switcheroo-control.service                                                                                 loaded active running   Switcheroo Control Proxy service
  systemd-backlight@backlight:intel_backlight.service                                                        loaded active exited    Load/Save Screen Backlight Brightness of backlight:intel_backlight
  systemd-binfmt.service                                                                                     loaded active exited    Set Up Additional Binary Formats
  systemd-fsck@dev-disk-by\x2duuid-122d83e6\x2dc309\x2d4c0c\x2d8863\x2d03de4976e71b.service                  loaded active exited    File System Check on /dev/disk/by-uuid/122d83e6-c309-4c0c-8863-03de4976e71b
  systemd-fsck@dev-disk-by\x2duuid-E204\x2d77BC.service                                                      loaded active exited    File System Check on /dev/disk/by-uuid/E204-77BC
  systemd-journal-flush.service                                                                              loaded active exited    Flush Journal to Persistent Storage
  systemd-journald.service                                                                                   loaded active running   Journal Service
  systemd-logind.service                                                                                     loaded active running   User Login Management
  systemd-modules-load.service                                                                               loaded active exited    Load Kernel Modules
  systemd-random-seed.service                                                                                loaded active exited    Load/Save OS Random Seed
  systemd-remount-fs.service                                                                                 loaded active exited    Remount Root and Kernel File Systems
  systemd-sysctl.service                                                                                     loaded active exited    Apply Kernel Variables
  systemd-tmpfiles-setup-dev-early.service                                                                   loaded active exited    Create Static Device Nodes in /dev gracefully
  systemd-tmpfiles-setup-dev.service                                                                         loaded active exited    Create Static Device Nodes in /dev
  systemd-tmpfiles-setup.service                                                                             loaded active exited    Create System Files and Directories
  systemd-udev-load-credentials.service                                                                      loaded active exited    Load udev Rules from Credentials
  systemd-udev-trigger.service                                                                               loaded active exited    Coldplug All udev Devices
  systemd-udevd.service                                                                                      loaded active running   Rule-based Manager for Device Events and Files
  systemd-user-sessions.service                                                                              loaded active exited    Permit User Sessions
  systemd-vconsole-setup.service                                                                             loaded active exited    Virtual Console Setup
  udisks2.service                                                                                            loaded active running   Disk Manager
  upower.service                                                                                             loaded active running   Daemon for power management
  user-runtime-dir@1000.service                                                                              loaded active exited    User Runtime Directory /run/user/1000
  user@1000.service                                                                                          loaded active running   User Manager for UID 1000
  wpa_supplicant.service                                                                                     loaded active running   WPA Supplicant daemon
  wtmpdb-update-boot.service                                   
...

But I have sound both from my headphones, though in HSP/HFP, and from built-in speakers in my laptop. System is fresh, newly installed few days ago. I would be grateful to any idea about this.

Oh, I’ve forgot --user argument. What a foolish mistake!
But well, I’ve created wireplumber directory in ~/.config and then added a wireplumber.conf.d/bluez-config.conf as the ArchWiki recomended with such lines:

$ cat wireplumber.conf.d/bluez-config.conf 
mounitor.bluez.properties = {
        bluez5.enable-sbc-xq = true
        bluez5.enable-msbc = true
        bluez5.codecx = [ sbc sbc_xq ]
}

And then I did
$ systemctl --user restart wireplumber
And… Nothing. I still have no A2DP sound :disappointed:
I started to think that maybe the idea to switch back to PulseAudio is not as bad

I don’t know what that is going to achieve, but it looks like a mistyping.
Maybe monitor.bluez.properties = { has a chance to work?

And pw-top run as your user should show what is going on as seen from pipewire.

1 Like

Yes, it’s definitely my mistyping, but with monitor it still doesn’t work.

$pw-top
S   ID  QUANT   RATE    WAIT    BUSY   W/Q   B/Q  ERR FORMAT           NAME     
S   29      0      0    ---     ---   ---   ---     0                  Dummy-Driver
S   30      0      0    ---     ---   ---   ---     0                  Freewheel-Driver
S   62      0      0    ---     ---   ---   ---     0                  Midi-Bridge
S   43      0      0    ---     ---   ---   ---     0                  bluez_midi.server
S   57      0      0    ---     ---   ---   ---     0                  alsa_output.pci-0000_00_1f.3.analog-st
S   55      0      0    ---     ---   ---   ---     0                  alsa_input.pci-0000_00_1f.3.analog-ste
S   61      0      0    ---     ---   ---   ---     0                  v4l2_input.pci-0000_00_14.0-usb-0_5_1.
S   42      0      0    ---     ---   ---   ---     0                  bluez_input.4C:72:74:08:55:EC 
S   37      0      0    ---     ---   ---   ---     0                  bluez_capture_internal.4C:72:74:08:55:
S   96      0      0    ---     ---   ---   ---     0                  bluez_output.4C_72_74_08_55_EC.1 

This is with plugged headphones, but without playing soud. When I start playing last two lines shows this

...
R   82   1024  48000 131,0us  39,3us  0,01  0,00    0    S16LE 2 48000 bluez_output.4C_72_74_08_55_EC.1
R   86   1024  48000  71,4us  61,1us  0,00  0,00    0    F32LE 2 48000  + Google Chrome

Looks like everithing is ok and soud is playin, but I hear nothing. Volume in on 100%.

Try running qpwgraph.

For more graphical tools, see:

https://linuxmusicians.com/viewtopic.php?t=26839

1 Like

Well, it shows connections between app and headphones, when i try to play sound, but still silence.
Also, I’ve paired headphones with my phone to check them and they work, so problem is somewhere in software

Can you check pactl list sinks

For me it gives with the headphone working:

Sink #79
        State: RUNNING
        Name: bluez_output.9C_0C_35_D3_36_9F.1
        Description: Fairbuds XL
        Driver: PipeWire
        Sample Specification: s24le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 41283 /  63% / -12.04 dB,   front-right: 41283 /  63% / -12.04 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: bluez_output.9C_0C_35_D0_C6_98.1.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        Properties:
                api.bluez5.address = "9C:0C:35:D3:36:9F"
                api.bluez5.codec = "aptx_hd"
                api.bluez5.profile = "a2dp-sink"
                api.bluez5.transport = ""
                bluez5.loopback = "false"
                card.profile.device = "1"
                device.id = "72"
                device.routes = "1"
                factory.name = "api.bluez5.a2dp.sink"
                device.description = "Fairbuds XL"
                node.name = "bluez_output.9C_0C_35_D3_36_9F.1"
                node.pause-on-idle = "false"
                priority.driver = "1010"
                priority.session = "1010"
                spa.object.id = "1"
                factory.id = "12"
                clock.quantum-limit = "8192"
                device.api = "bluez5"
                media.class = "Audio/Sink"
                media.name = "Fairbuds XL"
                node.driver = "true"
                port.group = "stream.0"
                node.loop.name = "data-loop.0"
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "74"
                object.serial = "79"
                client.id = "47"
                api.bluez5.class = "0x240418"
                api.bluez5.connection = "connected"
                api.bluez5.device = ""
                api.bluez5.icon = "audio-headphones"
                api.bluez5.path = "/org/bluez/hci0/dev_9C_0C_35_D3_36_9F"
                bluez5.profile = "off"
                device.alias = "Fairbuds XL"
                device.bus = "bluetooth"
                device.form_factor = "headphone"
                device.icon_name = "audio-headphones-bluetooth"
                device.name = "bluez_card.9C_0C_35_D3_36_9F"
                device.product.id = "0xffff"
                device.string = "9C:0C:35:D0:C6:98"
                device.vendor.id = "bluetooth:000a"
        Ports:
                headphone-output: Headphone (type: Headphones, priority: 0, available)
        Active Port: headphone-output
        Formats:
                pcm

I’ve posted pactl list sink in my first message, but there was without playing any sound. Here is when sound is playing:

Sink #1460
        State: RUNNING
        Name: bluez_output.4C_72_74_08_55_EC.1
        Description: BH317
        Driver: PipeWire
        Sample Specification: s16le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        Base Volume: 65536 / 100% / 0,00 dB
        Monitor Source: bluez_output.4C_72_74_08_55_EC.1.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE DECIBEL_VOLUME LATENCY 
        Properties:
                api.bluez5.address = "4C:72:74:08:55:EC"
                api.bluez5.codec = "sbc_xq"
                api.bluez5.profile = "a2dp-sink"
                api.bluez5.transport = ""
                bluez5.loopback = "false"
                card.profile.device = "1"
                device.id = "71"
                device.routes = "1"
                factory.name = "api.bluez5.a2dp.sink"
                device.description = "BH317"
                node.name = "bluez_output.4C_72_74_08_55_EC.1"
                node.pause-on-idle = "false"
                priority.driver = "1010"
                priority.session = "1010"
                spa.object.id = "1"
                factory.id = "12"
                clock.quantum-limit = "8192"
                device.api = "bluez5"
                media.class = "Audio/Sink"
                media.name = "BH317"
                node.driver = "true"
                port.group = "stream.0"
                node.loop.name = "data-loop.0"
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "102"
                object.serial = "1460"
                client.id = "60"
                api.bluez5.class = "0x260404"
                api.bluez5.connection = "connected"
                api.bluez5.device = ""
                api.bluez5.icon = "audio-headset"
                api.bluez5.path = "/org/bluez/hci0/dev_4C_72_74_08_55_EC"
                bluez5.profile = "off"
                device.alias = "BH317"
                device.bus = "bluetooth"
                device.form_factor = "headset"
                device.icon_name = "audio-headset-bluetooth"
                device.name = "bluez_card.4C_72_74_08_55_EC"
                device.string = "4C:72:74:08:55:EC"
        Ports:
                headset-output: Гарнитура (type: Headset, priority: 0, available)
        Active Port: headset-output
        Formats:
                pcm

I can’t find here any hints, it looks like everything is working and my pactl output seems to be the same is yours, only PIN and device name are different

Your Sink # number is quite high, do you know of any reason that is?

Also, do you have another audio sink that is working? It might be the source not providing audio.

I have no idea about Sink number, to be honest. There is another suspended sink of my laptop’s speakers, it has high number too. Here is missed output of command from previous message:

Sink #1436
        State: SUSPENDED
        Name: alsa_output.pci-0000_00_1f.3.analog-stereo
        Description: Встроенное аудио Аналоговый стерео
        Driver: PipeWire
        Sample Specification: s32le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 26214 /  40% / -23,88 dB,   front-right: 26214 /  40% / -23,88 dB
                balance 0,00
        Base Volume: 65536 / 100% / 0,00 dB
        Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        Properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.class = "generic"
                alsa.components = "HDA:10ec0236,103c85f2,00100002 HDA:8086280b,80860101,00100000"
                alsa.device = "0"
                alsa.driver_name = "snd_hda_intel"
                alsa.id = "ALC236 Analog"
                alsa.long_card_name = "HDA Intel PCH at 0xb4418000 irq 145"
                alsa.mixer_name = "Realtek ALC236"
                alsa.name = "ALC236 Analog"
                alsa.resolution_bits = "16"
                alsa.subclass = "generic-mix"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.sync.id = "00000000:00000000:00000000:00000000"
                api.alsa.card.longname = "HDA Intel PCH at 0xb4418000 irq 145"
                api.alsa.card.name = "HDA Intel PCH"
                api.alsa.path = "front:0"
                api.alsa.pcm.card = "0"
                api.alsa.pcm.stream = "playback"
                audio.channels = "2"
                audio.position = "FL,FR"
                card.profile.device = "6"
                device.api = "alsa"
                device.class = "sound"
                device.icon_name = "audio-card-analog"
                device.id = "54"
                device.profile.description = "Аналоговый стерео"
                device.profile.name = "analog-stereo"
                device.routes = "2"
                factory.name = "api.alsa.pcm.sink"
                media.class = "Audio/Sink"
                device.description = "Встроенное аудио"
                node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
                node.nick = "ALC236 Analog"
                node.pause-on-idle = "false"
                object.path = "alsa:acp:PCH:6:playback"
                port.group = "playback"
                priority.driver = "1009"
                priority.session = "1009"
                factory.id = "19"
                clock.quantum-limit = "8192"
                client.id = "60"
                node.driver = "true"
                node.loop.name = "data-loop.0"
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "57"
                object.serial = "1436"
                api.acp.auto-port = "false"
                api.acp.auto-profile = "false"
                api.alsa.card = "0"
                api.alsa.split-enable = "true"
                api.alsa.use-acp = "true"
                api.dbus.ReserveDevice1 = "Audio0"
                api.dbus.ReserveDevice1.Priority = "-20"
                device.bus = "pci"
                device.bus_path = "pci-0000:00:1f.3"
                device.enum.api = "udev"
                device.form_factor = "internal"
                device.name = "alsa_card.pci-0000_00_1f.3"
                device.nick = "HDA Intel PCH"
                device.plugged.usec = "6842166"
                device.product.id = "0x02c8"
                device.product.name = "Comet Lake PCH-LP cAVS"
                device.subsystem = "sound"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.vendor.id = "0x8086"
                device.vendor.name = "Intel Corporation"
                spa.object.id = "2"
                device.string = "0"
        Ports:
                analog-output-speaker: Динамики (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
                analog-output-headphones: Наушники (type: Headphones, priority: 9900, availability group: Legacy 4, not available)
        Active Port: analog-output-speaker
        Formats:
                pcm

I don’t know much about sound in Linux, but for me it looks suspicious that headphpones mentioned in speaker’s sink ports.

Yes, I have also a second Sink with Description: Built-in Audio Analog Stereo. I have speakers connected to it and I can run audio on them.

For you it is presumably connected to the laptop speakers, if you select it as active sink do you hear then audio? Does the laptop have an audio connector, if so can you connect a wires headphone and test that?

I would try to reset the Pipewire config

Well, my laptop has audio connector, but the headphones’ connector is broken, so I can’t test it. Also, I have neither /etc/pipewire/, nor /etc/wirepluber/ directories, only ~/.config/wireplumer/ with wireplumber.conf.d/bluez-config.conf, wich I’ve created by myself, as I wrote here early. So, I suppose, my Pipewire settings are already default. Maybe, I should try to write something in configs instead?

I did not configure anything and the headphone works. Diffing your config with mine I saw that api.bluez5.codec was different (aptx_hd vs sbc_xq) but I assumed this was because of an auto-config.

I would still suggest to start with a clean config, maybe backup-ing what you currently have.

It didn’t work out of the box, when all configs were clean. The sbc codeces were in the ArchWiki, were I’ve found this solution, but even before that they were autodetected by KDE System Settings, so I’ve decided to leave it.

Wow, finaly I have sound! I’ve checked if the codeces are installed, and found that I have only libsbc, but nothing about sbc-xq. But I tested sound only on SBC-XQ. I’ve switched on SBC and now it works :tada:
So, the problem was with the codec. Anyway, thank you for help!

1 Like

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