Cannot connect bluetooth headphones

Issues related to applications and software problems
Post Reply
mefix
Posts: 3
Joined: 2019/07/05 10:04:53

Cannot connect bluetooth headphones

Post by mefix » 2019/07/05 10:28:53

I'm running CentOS Linux release 7.6.1810 (Core) on a Lenovo Thinkpad T480s.
I can't connect my AKG Y50BT bluetooth headphones.
They appear in GNOME's bluetooth settings and sometimes they even seem to be connected, but then after a short period of time, they get disconnected again.

If I try to connect them manually using bluetoothctl, it looks as follows:

Code: Select all

$ sudo bluetoothctl 
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# scan on
Discovery started
[NEW] Device 34:DF:2A:28:C2:7F AKG Y50BT
[bluetooth]# scan off
Discovery stopped
[bluetooth]# trust 34:DF:2A:28:C2:7F
[CHG] Device 34:DF:2A:28:C2:7F Trusted: yes
Changing 34:DF:2A:28:C2:7F trust succeeded
[bluetooth]# pair 34:DF:2A:28:C2:7F
Attempting to pair with 34:DF:2A:28:C2:7F
[CHG] Device 34:DF:2A:28:C2:7F Connected: yes
[CHG] Device 34:DF:2A:28:C2:7F ServicesResolved: yes
[CHG] Device 34:DF:2A:28:C2:7F Paired: yes
Pairing successful
[CHG] Device 34:DF:2A:28:C2:7F ServicesResolved: no
[CHG] Device 34:DF:2A:28:C2:7F Connected: no
[bluetooth]# connect 34:DF:2A:28:C2:7F
Attempting to connect to 34:DF:2A:28:C2:7F
[CHG] Device 34:DF:2A:28:C2:7F Connected: yes
[CHG] Device 34:DF:2A:28:C2:7F UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 34:DF:2A:28:C2:7F UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 34:DF:2A:28:C2:7F UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 34:DF:2A:28:C2:7F UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 34:DF:2A:28:C2:7F UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 34:DF:2A:28:C2:7F UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 34:DF:2A:28:C2:7F ServicesResolved: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device 34:DF:2A:28:C2:7F ServicesResolved: no
[CHG] Device 34:DF:2A:28:C2:7F Connected: no
The bluetoothd log says the following:

Code: Select all

$ sudo journalctl -u bluetooth
Jul 05 12:12:03 foo bluetoothd[22809]: 34:DF:2A:28:C2:7F: error updating services: Connection refused (111)
Jul 05 12:12:11 foo bluetoothd[22809]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Jul 05 12:12:12 foo bluetoothd[22809]: connect error: Connection refused (111)
Jul 05 12:12:14 foo bluetoothd[22809]: connect error: Connection refused (111)
Installed bluetooth related packages:

Code: Select all

$ yum list installed | grep -i blue
NetworkManager-bluetooth.x86_64      1:1.12.0-10.el7_6              
blueberry.noarch                     1.1.20-6.el7                
bluedevil.x86_64                     2.1-1.el7                     
bluez.x86_64                         5.44-4.el7_4                 
bluez-cups.x86_64                    5.44-4.el7_4             
bluez-hid2hci.x86_64                 5.44-4.el7_4            
bluez-libs.x86_64                    5.44-4.el7_4               
bluez-libs-devel.x86_64              5.44-4.el7_4           
bluez-tools.x86_64                   0.2.0-0.7.git20170912.7cb788c.el7
gnome-bluetooth.x86_64               1:3.28.2-1.el7      
gnome-bluetooth-libs.x86_64          1:3.28.2-1.el7    
libbluedevil.x86_64                  2.1-1.el7                    
pulseaudio-module-bluetooth.x86_64   10.0-5.el7    
hciconfig:

Code: Select all

$ hciconfig 
hci0:	Type: Primary  Bus: USB
	BD Address: D4:6D:6D:60:8B:E0  ACL MTU: 1021:4  SCO MTU: 96:6
	UP RUNNING PSCAN ISCAN 
	RX bytes:116064 acl:110 sco:0 events:6018 errors:0
	TX bytes:622857 acl:105 sco:0 commands:3409 errors:0
bluetoothd status

Code: Select all

$ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-07-05 11:33:52 CEST; 46min ago
     Docs: man:bluetoothd(8)
 Main PID: 22809 (bluetoothd)
   Status: "Running"
    Tasks: 1
   CGroup: /system.slice/bluetooth.service
           └─22809 /usr/libexec/bluetooth/bluetoothd

Jul 05 11:47:46 foo bluetoothd[22809]: connect error: Connection refused (111)
Jul 05 11:47:49 foo bluetoothd[22809]: connect error: Connection refused (111)
Jul 05 11:48:58 foo bluetoothd[22809]: 34:DF:2A:28:C2:7F: error updating services: Connection refused (111)
Jul 05 11:49:02 foo bluetoothd[22809]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not ...ed (107)
Jul 05 11:49:02 foo bluetoothd[22809]: connect error: Connection refused (111)
Jul 05 11:49:05 foo bluetoothd[22809]: connect error: Connection refused (111)
Jul 05 12:12:03 foo bluetoothd[22809]: 34:DF:2A:28:C2:7F: error updating services: Connection refused (111)
Jul 05 12:12:11 foo bluetoothd[22809]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not ...ed (107)
Jul 05 12:12:12 foo bluetoothd[22809]: connect error: Connection refused (111)
Jul 05 12:12:14 foo bluetoothd[22809]: connect error: Connection refused (111)
kernel:

Code: Select all

$ uname -a
Linux foo 5.1.16-1.el7.elrepo.x86_64 #1 SMP Wed Jul 3 10:53:38 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
PulseAudio modules:

Code: Select all

$ pactl list modules | grep -i name
	Name: module-device-restore
	Name: module-stream-restore
	Name: module-card-restore
	Name: module-augment-properties
	Name: module-switch-on-connect
	Name: module-udev-detect
	Name: module-alsa-card
	Argument: device_id="1" name="usb-Lenovo_ThinkPad_USB-C_Dock_Audio_000000000000-00-Audio" card_name="alsa_card.usb-Lenovo_ThinkPad_USB-C_Dock_Audio_000000000000-00-Audio" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
	Name: module-alsa-card
	Argument: device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
	Name: module-bluetooth-policy
	Name: module-bluetooth-discover
	Name: module-bluez5-discover
	Name: module-esound-protocol-unix
	Name: module-native-protocol-unix
	Name: module-default-device-restore
	Name: module-rescue-streams
	Name: module-always-sink
	Name: module-intended-roles
	Name: module-suspend-on-idle
	Name: module-systemd-login
	Name: module-position-event-sounds
	Name: module-role-cork
	Name: module-filter-heuristics
	Name: module-filter-apply
	Name: module-x11-publish
	Name: module-x11-cork-request
	Name: module-x11-xsmp
I've read that sometimes the modules module-bluetooth-policy and module-bluetooth-discover are not loaded. You can clearly see that these are loaded in PulseAudio.

Both my own user as well as the pulse user are member of the lp group.

I still have no clue how ALSA, PulseAudio and the bluetooth daemon work together.

Any hint appreciated.

stephenfin
Posts: 1
Joined: 2019/07/08 15:28:37

Re: Cannot connect bluetooth headphones

Post by stephenfin » 2019/07/08 15:30:44

I saw the same issue on Fedora 30. This seems to be an issue with kernel 5.15 and should be fixed with 5.17. See https://bbs.archlinux.org/viewtopic.php ... 7#p1852327 for more information. If you can downgrade to an earlier kernel until that's resolved, you should be able to work around the issue.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot connect bluetooth headphones

Post by TrevorH » 2019/07/08 15:43:22

Since CentOS doesn't use a 5.x kernel at all - ours are all 3.10.0-xxx.y.z - I do not think that this will help much.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

mefix
Posts: 3
Joined: 2019/07/05 10:04:53

Re: Cannot connect bluetooth headphones

Post by mefix » 2019/07/09 07:17:44

Yeah I know, CentOS came with a 3.x.x kernel.
However, the ethernet interface of my Lenovo USB-C dock didn't work with these "old" kernels.
So I upgraded to the mainline kernel.

Good news is:
I got a kernel update to 5.2.0-1.el7.elrepo.x86_64 this morning and my bluetooth headphones work again. :D

mefix
Posts: 3
Joined: 2019/07/05 10:04:53

Re: Cannot connect bluetooth headphones

Post by mefix » 2019/07/09 07:27:51

Is there a way to mark a thread as "solved" in this forum?

Post Reply