This guide will help you connect your Sony WH-1000XM4 headset to Ubuntu 22.04 using Bluetooth. Once connected, you'll be able to listen to music and use the microphone on apps like Microsoft Teams.
-
Open a terminal and launch
bluetoothctl
:bluetoothctl
-
Initialize the agent and set it as the default:
agent on default-agent
-
Scan for Bluetooth devices:
scan on
Look for the MAC address of your Sony WH-1000XM4 headset.
-
Stop the scanning process:
scan off
-
Pair, trust, and connect to the headset using its MAC address:
pair XX:XX:XX:XX:XX:XX trust XX:XX:XX:XX:XX:XX connect XX:XX:XX:XX:XX:XX
(Replace
XX:XX:XX:XX:XX:XX
with the MAC address of your headset.) -
Exit
bluetoothctl
:exit
Ubuntu 22.04 partially uses PipeWire by default. To fully utilize it for audio and Bluetooth, follow these steps:
- Install and start WirePlumber:
sudo apt install pipewire-media-session- wireplumber systemctl --user --now enable wireplumber.service
-
For ALSA:
sudo apt install pipewire-audio-client-libraries sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/
-
For Bluetooth:
sudo apt install libldacbt-{abr,enc}2 libspa-0.2-bluetooth pulseaudio-module-bluetooth-
After rebooting your system, you can check if PipeWire is active by running:
LANG=C pactl info | grep '^Server Name'
mkdir -p ~/.audio/bin && cd ~/.audio/bin
wget https://gist.githubusercontent.com/peters/26315cd7a8a31e3d192ed05ef9a79ba7/raw/9466f91da19b53d01cac862898cfdfcb18e3137e/wh1000xm4-audio-profile.sh
chmod +x wh1000xm4-audio-profile.sh
./wh1000xm4-audio-profile.sh
For microphone testing, click here to visit the microphone test site
Thank you very much