Sony MDR-1000X on Linux

Sony MDR-1000X on Linux

The Sony MDR-1000X and it's successors the WH-1000XM2 and WH-1000XM3 are some of the best bluetooth headphones out there. With it's easy to use integrated touch pad on the right side and the great noise cancelling they are an ideal daily driver at the office. Using them on Linux is quiet straight forward with some caveats on high quality audio.

This guide is based Gentoo Linux version, but any recent Linux distribution should work.

Required packages:

  • bluez (USE Flags: alsa, btpclient)
  • pulseaudio (with bluetooth support)

First we need to start the bluetooth service, with systemd run systemctl start bluetooth. To enable it forever run sytemctl enable bluetooth.

First let's make sure your bluetooth device is not hardware blocked.

# rfkill list
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

If it's soft blocked run rfkill unblock <id>, if the controller is hard blocked unblock it by a physical switch or a keyboard function key.

After this you are are ready to pair the headphones with bluetoothctl. Make sure your user is in the plugdev / bluetooth group (depending on the distribution).

[bluetooth]# list
Controller XX:YY:XX:YY:XX:YY [default]
[bluetooth]# select XX:YY:XX:YY:XX:YY
[bluetooth]# power on

# Start the bluetooth agent
[bluetooth]# agent on
[bluetooth]# default-agent

# Start scanning
[bluetooth]# scan on
[NEW] Device ZZ:ZZ:ZZ:ZZ:ZZ:ZZ MDR-1000X

# Pair and trust the device (needs to be done only once)
[bluetooth]# pair ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
[bluetooth]# trust ZZ:ZZ:ZZ:ZZ:ZZ:ZZ

# Now we can connect to it
[bluetooth]# connect ZZ:ZZ:ZZ:ZZ:ZZ:ZZ

Now the headphones should be connected (You should also hear "bluetooth connected" on the Sony MDR-1000X) and available as output and input device. Check the logs with journalctl -u bluetooth.

If you want to use the headphones for audio, make sure that the profile is set to High Fidelity Playback (A2DP Sink) for example in pavucontrol. The touchpad controls on the Sony MDR-1000X should work out of the box.

LDAC / aptX-HD

LDAC is the high quality codecs Sony uses to compete with aptX-HD. In order to use it you first need to install pulseaudio-modules-bt and libldac.

Next edit /etc/pulse/default.pa and add the following lines to it:

load-module module-bluetooth-discover a2dp_config="ldac_eqmid=sq"
load-module module-bluez5-discover a2dp_config="ldac_eqmid=sq"

You can also try hq (LDAC High Quality) or auto instead of sq (Standard Quality), in the tests I did the hq mode had some issues with dropouts and cracks.

Next restart pulseaudio and reconnect the headphones:

pulseaudio -k
pulseaudio --start

With pactl list sinks | grep -e bluez -e a2dp_codec you can the codec used.

Reconnecting (manually)
[bluetooth]# list
Controller XX:YY:XX:YY:XX:YY [default]
[bluetooth]# select XX:YY:XX:YY:XX:YY
[bluetooth]# power on
[bluetooth]# devices
Device ZZ:ZZ:ZZ:ZZ:ZZ:ZZ MDR-1000X
[bluetooth]# connect ZZ:ZZ:ZZ:ZZ:ZZ:ZZ
Battery level

You can obtain the battery level of the headset with dbus (if your module supports it).

# Replace ZZ with your device address (underscores instead of colons)
dbus-send --print-reply=literal --system --dest=org.bluez /org/bluez/hci0/dev_ZZ_ZZ_ZZ_ZZ_ZZ_ZZ org.freedesktop.DBus.Properties.Get string:"org.bluez.Battery1" string:"Percentage"