7

I bought a bluetooth headphone that always works in my Android, but in my Ubuntu when I connect it and try to play any video, be it in youtube or a .mp4 opened locally, it won't play. If I disconnect the bluetooth, it plays. I discovered a ritual that needs to be done in order for the headphone to work:

I first connect the bluetooth, then I move its profile in sound settings from High Fidelity Playback to Headset Head Unit, and I click "Test Sound", play a sound an hear some noises. Then I disconnect the bluetooth and connect it again and change to High Fidelity Playback again and test the sound, now it works and I hear "front, left" when I test the sound. Then everything works fine.

Is there a way to fix it? It's very annoying to do it every time I disconnect from my PC.

UPDATE: even now that I updated to Zetsy it still have this same problem

2

4 Answers 4

2

Bluetooth on Linux always has been a pain. I would suggest either doing a fresh install of Zesty, buy a new Bluetooth headset that can just be used with the Ubuntu device, and/or buy a new wired headset/phone.

3
  • +1 for Bluetooth being a pain (especially for audio).
    – user595510
    Aug 18, 2017 at 0:12
  • 1
    Why do you expect a fresh install to help? Aug 22, 2017 at 21:13
  • @EliahKagan Upgrading can cause problems. Aug 25, 2017 at 14:49
2

I have similar problems with Bluetooth.

Luckily pylover has turned the ritual into a program.

See here:

https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae

This program generally works for me.

1
+100

Try this: I saw this somewhere, but I dont remember the source now.

hcitool dev - shows the mac of the bluetooth device You would need this to insert it later in the file below ( if not available, create it )

#/etc/bluetooth/asound.conf
pcm.btheadset {
   type plug
   slave {
       pcm {
           type bluetooth
           device xx:xx:xx:xx:xx:xx
           profile "auto"
       }
   }
   hint {
       show on
       description "BT Headset"
   }
}
ctl.btheadset {
  type bluetooth
}

Another file ( if not available, create it )

#/etc/bluetooth/audio.conf

[General]
Enable=Source,Sink,Media,Socket

This below command will fetch an user interface and many things can be done.

sudo apt-get install pavucontrol
-1

The Python program in this GitHub gist fixes problems playing videos in web browsers while connected to Bluetooth audio devices.

To use it, run a2adp.py in any IDE (such as VS Code).

0

You must log in to answer this question.

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