LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-15-2019, 09:10 AM   #1
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 90

Rep: Reputation: 17
How to force bluetooth headphones to connect via A2DP in Ubuntu 19.04?


I have a pair of Sony bluetooth headphones, paired with my laptop. When I turn them on, they automatically connect in HSP mode. If I go into Bluetooth Settings on my laptop and disconnect them, then reconnect them, they connect in A2DP mode and I can listen to music.
Is there any way to make them connect in A2DP mode automatically? I've already tried adding
Code:
Disable=Headset
and
Code:
MultiProfile = multiple
to my /etc/bluetooth/main.conf based on advice I've seen on StackOverflow, but that that has had no effect.
 
Old 10-15-2019, 09:51 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by skykooler View Post
I have a pair of Sony bluetooth headphones, paired with my laptop. When I turn them on, they automatically connect in HSP mode. If I go into Bluetooth Settings on my laptop and disconnect them, then reconnect them, they connect in A2DP mode and I can listen to music.
Is there any way to make them connect in A2DP mode automatically? I've already tried adding
Code:
Disable=Headset
and
Code:
MultiProfile = multiple
to my /etc/bluetooth/main.conf based on advice I've seen on StackOverflow, but that that has had no effect.
May want to look here: https://rastating.github.io/setting-...-ubuntu-18-04/

You may be able to set your preferred device that way, so that your headphones identify as a A2DP, rather than as an input-device/microphone. Setting the preference for your input device lower than the output device might (?) get it to automatically go A2DP.
 
Old 10-15-2019, 12:04 PM   #3
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 90

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by TB0ne View Post
May want to look here: https://rastating.github.io/setting-...-ubuntu-18-04/

You may be able to set your preferred device that way, so that your headphones identify as a A2DP, rather than as an input-device/microphone. Setting the preference for your input device lower than the output device might (?) get it to automatically go A2DP.
The thing is, it doesn't even display the A2DP option until being disconnected and reconnected once. And pactl only shows it as a single device, whichever profile it's currently connected as.

Last edited by skykooler; 10-15-2019 at 12:07 PM.
 
Old 10-16-2019, 07:32 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by skykooler View Post
The thing is, it doesn't even display the A2DP option until being disconnected and reconnected once. And pactl only shows it as a single device, whichever profile it's currently connected as.
A few things to try. First, make sure these things are installed:
Code:
sudo apt install pulseaudio pulseaudio-utils pavucontrol pulseaudio-module-bluetooth
Then, either add these lines to /etc/bluetooth/audio.conf (or create the file if it does NOT exist):
Code:
    [General]
    Enable=Source,Sink,Media,Socket
And either reboot or restart the system. That *MIGHT* work. Can also try putting:
Code:
alias soundon = 'pacmd set-card-profile <BLUETOOTH NAME> a2dp_sink'
..into your .bashrc, and you can find the name with
Code:
pacmn list-card
...where it will be, obviously, the field labeled "name".
 
Old 10-24-2019, 01:14 PM   #5
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 90

Original Poster
Rep: Reputation: 17
That did not work; it still connects as HSP on first connection. It also still will not switch to A2DP if I select that mode in Audio Settings, or when running that command; it only switches after disconnecting and reconnecting via the Bluetooth panel.
 
Old 02-26-2020, 08:54 AM   #6
skykooler
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 90

Original Poster
Rep: Reputation: 17
This problem seems to be fixed in Ubuntu 19.10.
 
Old 06-14-2021, 05:14 AM   #7
otocon
LQ Newbie
 
Registered: Jun 2021
Posts: 1

Rep: Reputation: Disabled
This issue seems to be back in Ubuntu 21.04. I'm using Jabra Elite 75t. Tried all things mentioned here to no avail. Updated from Ubuntu 20.10 where it worked just fine. @skykooler do you know what changed in Ubuntu 19.10 that fixed it?
 
  


Reply

Tags
audio, bluetooth, headphone, headset



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth headphones as an A2DP sink flyinggeorge Linux - Hardware 6 08-21-2014 07:49 PM
Stereo bluetooth headphones vs Wired Headphones WHITE_POWER General 2 06-04-2013 03:35 PM
[SOLVED] Bluetooth (A2DP) headphones in KDE dlachausse Slackware 4 02-06-2013 06:51 AM
Debian Squeeze: connect to A2DP (bluetooth) through command line math1985 Linux - Hardware 1 11-12-2012 05:14 PM
[SOLVED] bluetooth dongle with A2DP protocol RedNeck-LQ Linux - Hardware 2 01-21-2011 06:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration