You are not logged in.

#1 2018-01-16 20:35:02

heshakomeu
Member
Registered: 2017-09-14
Posts: 16

[SOLVED] Bluetooth headset conflicts with streaming services

Hey all,

So last night, I decided to work on getting bluetooth working on my Arch partition on my Thinkpad x230. The process went wonderfully: I followed the "Bluetooth Headset" wiki page and had bluetooth working within ten minutes with bluetoothctl. However, I noticed the program "Blueman" on the "Bluetooth" wiki page, and was attracted to the graphical interface it promised. I went ahead and installed all the needed packages, following the Arch wiki religiously each step of the way, but when I tried to connect to my Bluetooth headset, I was getting:

 process org.bluez.obex exited with status 1 

as well as blueman-applet possibly failing to start (I'd get a long screen of text that I couldn't interact with and I couldn't put in any commands unless I Cntrl + C'd and quit the program). After trying a few suggested solutions, such as "rm -rf /var/lib/bluetooth" followed by a laptop reboot and trying to manually start obexd-service manually from /usr/lib/bluetooth/obexd (which the wiki is rather unclear about how to actually start it; systemctl start obexd-service, obexd, obexd.service, etc. did nothing. What does the the Blueman wiki page mean? What command was I supposed to run?), I honestly just got frustrated and decided to uninstall Blueman and delete any files I had made. I was just going to rely on bluetoothctl.

However, when I went to connect to my headset using bluetoothctl, I was getting:

Attempting to connect to [i]<MAC address>[/i]
Failed to connect: org.bluez.Error.Failed 

I ran through a number of possible solutions, but I don't remember what exactly I did. It was 1:30 in the morning and I was tired. I think it had something to do with setting permissions in /etc/dbus-1/system.d/bluetooth.conf to the "wheel" instead of the "lp" group. A quick note here: one of the solutions was to try loading the bluetooth-module-discover, but when I tried, I got:

$ pactl load-module module-bluetooth-discover
Failure: Module initialization failed

Same went for the other modules the "Bluetooth headset" wiki page recommended I try loading. Running as sudo yielded:

Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Eventually, the headset connected, but the sound was really distorted when I tried watching a YouTube video. Fine, all right, whatever. I decided I'd go to sleep and take another stab at it after a night's rest.

This morning, I decided to nuke anything sound or bluetooth-related in Arch. I uninstalled pulseaudio, pulseaudio-alsa, bluez, bluez-utils, alsa-utils, and any files that had non-optional dependencies on them. The only file I didn't uninstall was bluez-libs, because NetworkManager had a dependency on it. I've been struggling to get NetworkManager working as well (see: https://bbs.archlinux.org/viewtopic.php?id=233515), so I didn't want to mess with it further. If it's at-all relevant, I'm using netctl/dhcpcd with wifi-menu to connect to the internet currently. After uninstalling everything, I reinstalled the packages and got to connecting my headset again. I have managed to get my headphones to connect, but now, when I try to watch YouTube videos or listen to something on Soundcloud, the video/song won't load/buffer. If I disconnect the headset, they load and play fine through the laptop speakers.

I'm at a complete loss of what to do now. I know I did something to mess up my bluetooth when I tried to install Blueman, but I have no idea what. Any help would be appreciated. The biggest clue I have is that /etc/bluetooth/audio.conf does not exist, but I don't know what that means or what that affects.

Thanks for reading. If you need any more info let me know.

Last edited by heshakomeu (2018-01-17 22:18:40)

Offline

#2 2018-01-16 20:42:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Bluetooth headset conflicts with streaming services

Please edit your thread title and choose one that is a) less histrionic, and b) actually reflects your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-01-16 22:55:30

heshakomeu
Member
Registered: 2017-09-14
Posts: 16

Re: [SOLVED] Bluetooth headset conflicts with streaming services

jasonwryan wrote:

Please edit your thread title and choose one that is a) less histrionic, and b) actually reflects your issue: https://wiki.archlinux.org/index.php/Co … ow_to_post

Done.

Offline

#4 2018-01-17 13:09:34

B1omman
Member
Registered: 2016-02-16
Posts: 36

Re: [SOLVED] Bluetooth headset conflicts with streaming services

You could try using this module option:
https://wiki.archlinux.org/index.php/Wi … oexistence
(As a bonus, the options above bluetooth coexistence might solve your network issues.)

If you are using BlueZ 5 and PulseAudio, there should not be any need for /etc/bluetooth/audio.conf. The module module-bluetooth-discover should already be loaded as well if you have installed pulseaudio-bluetooth and did not change /etc/pulse/default.pa, or created any local variant.

Offline

#5 2018-01-17 20:37:50

heshakomeu
Member
Registered: 2017-09-14
Posts: 16

Re: [SOLVED] Bluetooth headset conflicts with streaming services

Thank you so much for the suggestions! And thank you for the clarifications on the module loading and lack of /etc/bluetooth/audio.conf file; as I didn't modify /etc/pulse/audio.conf after my re-install of pulseaudio, pulseaudio-bluetooth, etc., there is no reason the results I'm getting are abnormal.

I went ahead and tried out disabling bluetooth coexistence, which did look promising, but I could only connect for only a brief moment through bluetoothctl before getting "Failed to connect: org.bluez.Error.Failed " and it disconnects again. I was briefly getting this occasionally, and fixed it by removing my headset and reconnecting again, but systemctl status bluetooth reveals different errors now:

Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
connect error: Connection refused (111)
connect error: Connection refused (111)

Some quick investigation reveals the first error was possibly a bug associated with linux kernel 4.13.3-1: https://bbs.archlinux.org/viewtopic.php?id=230366 Unfortunately, the temporary solution offered seemed to be disabling bluetooth coexistence - which I have done and doesn't seem to have had an effect. The second error was a little harder to track down, but I found this post on the gentoo forums echoing my exact problem, with both first and second errors in tandem: https://forums.gentoo.org/viewtopic-t-1 … art-0.html OP in the post pointed to a section at the bottom of the Arch Wiki "Bluetooth" page with my exact issue: https://wiki.archlinux.org/index.php/Bl … ew_moments

I really should have mentioned this in the original post, but I have a dual-boot setup on my laptop. Windows 10 on one partition and Arch Linux on the other. I know dual-boots can complicate things in both partitions, but I really didn't think bluetooth was one of them. Since I didn't think it was relevant, I didn't mention it; and besides, I was able to connect without a problem before I installed Blueman. I believe my issue is that my headset isn't able to be paired with two operating systems. This is further supported by my bluetooth experience on Windows, where each time I was successfully able to connect to my headset on Linux, Windows was unable to connect to my headset until I removed it from the list of paired Bluetooth devices.

I guess my solution is to either not dual-boot or get a pair of earbuds to use with Linux. To clarify: removing the headset, scanning, and repairing the headset through bluetoothctl allowed me to use streaming services fine again. I think the combination of me reconnecting my headset properly and your suggestion of disabling bluetooth coexistence fixed it. However, I am stuck with the issue I briefly mentioned in the original post: garbled and distorted sound from my headphones. I don't think I will be addressing that problem today or in the near future; I wanted to try UbuntuMATE, and if I do go back to Arch, it'll be a clean install from scratch again.

Thanks for the help B1omman! I'll go ahead and mark this as solved.

Offline

#6 2018-01-17 22:58:37

B1omman
Member
Registered: 2016-02-16
Posts: 36

Re: [SOLVED] Bluetooth headset conflicts with streaming services

I'm sorry, but I do not think you really understood, as I might have been a bit brief.

heshakomeu wrote:

... clarifications on the module loading and lack of /etc/bluetooth/audio.conf file; as I didn't modify /etc/pulse/[default.pa] after my re-install of pulseaudio, pulseaudio-bluetooth, etc., there is no reason the results I'm getting are abnormal.

They are not abnormal. Disabling bluetooth coexistence were only supposed to fix clashes between wifi/bluetooth since both are located on the same chip.

Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)

I believe this may be why you have garbled and distorted sound from your headphones, default profile for bluetooth headphones is HSP/HFP with pulseaudio. You need to change the card profile in pulseaudio:

$ pactl list cards short
<n> bluez_card.XX_XX_XX_XX_XX_XX...

$ pacmd set-card-profile <n> a2dp_sink
heshakomeu wrote:

I guess my solution is to either not dual-boot or get a pair of earbuds to use with Linux.

It's only pairing keys, just copy one set to the other boot and you're go. Did a quick search and found this.

Offline

#7 2018-01-18 07:30:33

heshakomeu
Member
Registered: 2017-09-14
Posts: 16

Re: [SOLVED] Bluetooth headset conflicts with streaming services

Ah, thanks for the clarifications. Disabling bluetooth coexistence did nothing then, as I have a separate wifi card and bluetooth card. I thought I had included that in the original post; I now see I did not. That is extremely relevant information to have included, and I apologize for not doing so.

However, your fix for the garbled sound totally worked! I suspected it had something to do with it not being set to the correct sink, but I hadn't started to look into it. I just wanted to solve one problem at a time. Even though it wasn't the issue I was asking for help with, you still offered a solution, and that means a lot! Thanks!

I read through the article you linked on pairing keys. It looks doable, just an hour or two of work (at most). The quirk the author had with a lack of immediate headset pairing was interesting. I'll try it tomorrow; if it works out okay, I'll edit this comment and confirm.

Thanks again! You've been a big help and I've learned a ton.

Offline

Board footer

Powered by FluxBB