2

Problem: When my Bluetooth Headset (auvisio ZX-3182) autoconnects to my Ubuntu 20.04 the bluetooth daemon confirms a connection,

~$ hcitool con
Connections:
    > ACL 76:XX:XX:XX:XX:75 handle 256 state 1 lm MASTER

however PulseAudio (15.0) does not recognize the connected bluetooth device as a sound card automatically

~$ pactl list sinks short
0   alsa_output.pci-0000_00_1f.3.analog-stereo  module-alsa-card.c  s16le 2ch 48000Hz   RUNNING

~$ pacmd list-cards
1 card(s) available.
    index: 0
    name: <alsa_card.pci-0000_00_1f.3>
    driver: <module-alsa-card.c>

although the headset has the capabilities of being a sound card:

~$ hcitool info 76:XX:XX:XX:XX:75
Requesting information ...
    BD Address:  76:XX:XX:XX:XX:75
    Device Name: ZX-3182
    LMP Version: 5.1 (0xa) LMP Subversion: 0x22bb
    Manufacturer: not assigned (1494)
    Features page 0: 0xbf 0xfe 0x8d 0xfa 0xd8 0x3d 0x79 0x83
        <3-slot packets> <5-slot packets> <encryption> <slot offset> 
        <timing accuracy> <role switch> <sniff mode> <RSSI> 
        <channel quality> <SCO link> <HV2 packets> <HV3 packets> 
        <u-law log> <A-law log> <CVSD> <power control> 
        <transparent SCO> <broadcast encrypt> <EDR ACL 2 Mbps> 
        <enhanced iscan> <interlaced iscan> <interlaced pscan> 
        <inquiry with RSSI> <extended SCO> <AFH cap. slave> 
        <AFH class. slave> <LE support> <3-slot EDR ACL> 
        <5-slot EDR ACL> <pause encryption> <AFH cap. master> 
        <AFH class. master> <EDR eSCO 2 Mbps> <extended inquiry> 
        <simple pairing> <encapsulated PDU> <err. data report> 
        <non-flush flag> <LSTO> <inquiry TX power> <extended features> 
    Features page 1: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    Features page 2: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

What works: When I connect to the bluetooth headset manually, the headset is recognised by PulseAudio correctly and I can use it as a A2DP headset as well as a HFS/HPS dual-mode headset+headphone. Only if the headset autoconnects, it is not recognised by PulseAudio.

What the logs say: Nothing, no error message. I looked into

  • ~$ tail /var/log/syslog: No relevant output
  • ~$ systemctl --user status pulseaudio: No relevant output
  • ~$ dmesg | tail
    [ 6751.711444] perf: interrupt took too long (3202 > 3167), lowering kernel.perf_event_max_sample_rate to 62250
    [ 6853.470790] input: ZX-3182 (AVRCP) as /devices/virtual/input/inputXX

Questions:

  • Does anybody know this behaviour, that autoconnected bluetooth devices are not recognized by PulseAudio?
  • Does anybody have a tip where to find a log message to come closer to the actual error?
  • Can I find out which processes are using the bluetooth connection? Maybe another process is "catching" the bluetooth connection before pulseaudio can get it?

What I already tried:

Any other ideas? Thanks for your help.

2 Answers 2

0

I had the same problem for a long time and was just able to (kind of) resolve the problem today for me:

Trusting the bluetooth headset in blueman (or however you manage your bluetooth devices) helped.

However, the volume is now super low when connecting automatically - although pulseaudio shows the same volume as when connecting manually.

1
  • Hi, thx for taking up the issue. Unfortenately, this did not work in my case. I tried bluetoothctl trust xx:xx:xx:xx:xx:xx which finished successfully, but the behaviour is still the same.
    – Oli4
    Jul 22, 2022 at 14:12
0

Turns out that this behaviour changes from headphones to headphones. I tried several different headphones afterwards and some autoconnect successfully with sound and some don't. So it seems to be on a model-by-model basis, whether it is working or not.

A workaround that I used was to write a small script sudo nano /opt/bin/headset-reconnect.sh:

#!/bin/bash

bluetoothctl disconnect $1
bluetoothctl connect $1

Made it executable via sudo chmod +x /opt/bin/headset-reconnect.sh and finally added a custom keyboard shortcut under Settings -> Keyboard -> Keyboard-Shortcuts -> Custom Keyboard-Shortcuts that would call /usr/bin/headset-reconnect xx:xx:xx:xx:xx:xx with the bluetooth mac address of my headphones.

With this workaround I just had to press my defined keyboard shortcut to connect to my headphones after putting them in my ears.

Not perfect, but at least some kind of solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .