Here I discuss my futzing to get my airpods to work with Ubuntu.
The key thing seemed to be to switch from ad2p to hsp/hfp. And I guess really hfp, since there's apparently not support for hsp.
-
Use bluetooth manager to pair with the airpods.
-
If you right-click on the airpods, you want to be able to select "Audio profile" and then choose "Headset Head Unit" (rather than "High fidelity playback")
-
Install ofono
sudo apt install ofono
-
Configure pulseaudio to use ofono by editing
/etc/pulse/default.paso that the lineload-module module-bluetooth-discoverbecomes
load-module module-bluetooth-discover headset=ofono -
Add the
pulseuser to thebluetoothgroupsudo usermod -aG bluetooth pulse
-
Add the following to
/etc/dbus-1/system.d/ofono.conf(before</busconfig>):<policy user="pulse"> <allow send_destination="org.ofono"/> </policy> -
Install
ofono-phonesim; I needed to add a ppasudo add-apt-repository ppa:smoser/bluetooth
Then I needed to edit
/etc/apt/sources.list.d/smoser-ubuntu-bluetooth-groovy.listto changegroovy(20.10) tofocal(20.04).Then I could add
ofono-phonesim:sudo apt install ofono-phonesim
-
Start an ofono modem
ofono-phonesim -p 12345 /usr/share/phonesim/default.xml
-
Modify
/etc/ofono/phonesim.confto use it:[phonesim] Driver=phonesim Address=127.0.0.1 Port=12345 -
Restart oFono:
sudo service ofono restart-
Then I could go back to the bluetooth manager, right-click the airpods, and select "Audio Profile" and then "Headset Head Unit".
-
After restarting my system, I needed to re-run the
ofono-phonesimcommand, but then it still didn't work. I needed to clone ofono and run the scriptenable-modem:git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git cd ofono/test ./enable-modem
The key sites that helped:
-
https://askubuntu.com/questions/831331/failed-to-change-profile-to-headset-head-unit/1236379#1236379
-
https://askubuntu.com/questions/1242450/when-will-add-ofono-phomesim-to-the-focal-repository-20-04
-
Sites I looked at previously:
- airpods as headphones sound nice
- airpods as headset: seems like both the headphones and the mic are really crappy quality...not worth the trouble
- so best to just leave them as headphones
- but on galago pro, while I could pair and connect/disconnect airpods, I'm having trouble getting pulseaudio to recognize them
- what worked was [this answer]:
- unpair the airpods
sudo pkill pulseaudio- re-pair the airpods
- upgrading to PopOS 20.10 fixed this problem