Ubuntu – Videos won’t play when bluetooth connected, ritual needed to make it work

bluetoothheadphonessound

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

Best Answer

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