- Python 96.8%
- Shell 3.2%
|
|
||
|---|---|---|
| data | ||
| packaging | ||
| src/hpc | ||
| tests | ||
| .gitignore | ||
| install.sh | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Linux Headphones Manager
A free and open-source Linux app for Nothing / CMF earbuds, Sony headphones and HyperX wireless headsets. It shows battery and lets you change noise cancelling, EQ and device settings, with no phone or account needed.
It has a Material You interface that takes its colour scheme from your KDE accent colour. It follows Plasma's light/dark mode live and uses your system font and icons. It's built with Python and Qt 6 (PySide6), so it also runs on GNOME, XFCE, Hyprland, Sway and other desktops, on Wayland and X11. It talks to the headphones directly over Bluetooth RFCOMM through BlueZ.
Independent community project, not affiliated with Nothing Technology or Sony. No warranty.
Features
The app only shows the controls your device actually answers for. Anything it doesn't answer for stays hidden, so you won't see buttons that do nothing.
Sony WH-1000XM4
- Battery: level and charging state.
- Noise control: Noise cancelling, Wind noise reduction, Ambient sound (level 1–20, Focus on voice) and Off.
- Equalizer:
- Presets: Bright, Excited, Mellow, Relaxed, Vocal, Treble/Bass Boost, Speech, Custom 1/2.
- Manual 5-band EQ plus Clear Bass.
- DSEE Extreme.
- Speak-to-chat: on/off, sensitivity and how long it lasts.
- Device settings: Pause when taken off, automatic power off, touch panel on/off, and voice guidance.
- Info: firmware version and the active codec (SBC/AAC/LDAC).
Nothing / CMF
- Battery: left, right and case, or a single unit for Headphone (1). Shows charging state and whether each bud is in your ear.
- Noise control: Noise cancelling (Adaptive/High/Mid/Low, where the model has them), Transparency and Off.
- EQ presets: Balanced, More bass, More treble and Voice.
- Optional features, where the model supports them:
- Audio codec (LDAC/LHDC)
- Spatial audio
- Bass enhance
- Low latency mode
- Dual connection
- In-ear detection
- Personalised sound
- Find my earbuds: plays a sound in the left/right bud.
- Info: model, firmware and serial number.
HyperX (through the USB wireless dongle)
- Battery: level and charging state, plus whether the headset is on or out of range.
- Automatic power off: Never, or after 10/20/30 minutes.
- Mic monitoring (sidetone) and voice prompts, on models that have them.
App:
- Material 3 design:
- Navigation drawer with each device's battery.
- A header card with battery rings.
- Segmented buttons, filter chips, switches and EQ sliders.
- Errors shown in a snackbar.
- Colours: dynamic colour from the KDE accent, or pick your own. The theme can be System, Light or Dark.
- Tray icon: battery in the tooltip and noise-mode switching from the menu. Closing the window keeps the app in the tray (you can turn this off).
- Notifications: when headphones connect, and a low-battery warning at a threshold you choose.
- Start at login: an XDG autostart entry that KDE lists under Autostart. Optionally starts minimised.
- Bluetooth settings: opens the KDE Bluetooth settings page for pairing.
- Reconnects automatically: when the headphones turn on.
hpctlcommand-line tool: for scripting and for debugging new models.
Supported devices
| Device | Status |
|---|---|
| Sony WH-1000XM4 | Supported (protocol V1) |
| Sony WH-1000XM3 | Experimental (same protocol as XM4) |
| Sony WH-1000XM5/XM6, WF-1000XM4/XM5, LinkBuds | Experimental (protocol V2, only used when the device advertises it) |
| Nothing Ear (3a), CMF Buds Pro 2, Nothing Headphone (1) | Supported |
| Nothing Ear, Ear (1), Ear (2), Ear (a), Ear (stick), CMF Buds | Experimental: shared protocol, needs field testing |
| HyperX Cloud II Wireless (HP and Kingston dongles), Cloud Alpha Wireless, Cloud Flight, Cloud III | Experimental (USB dongle; protocol from HeadsetControl) |
"Supported" means the protocol has been confirmed on that model by the reference projects. "Experimental" ones should work. If yours doesn't, please open an issue and include the output of hpctl --dump status.
Install
Packages
Download the latest .rpm or .deb from Releases:
sudo dnf install ./linux-headphones-manager-*.noarch.rpm # Fedora 44
sudo apt install ./linux-headphones-manager_*_all.deb # Debian 13+, Ubuntu 24.10+
Both pull in PySide6, dbus-fast and BlueZ from your distro.
The packages install a udev rule that lets you open HyperX dongles without root.
From source
Requirements:
- Python 3.10+
- BlueZ (
bluetoothdrunning) - PySide6
- dbus-fast
On Fedora:
sudo dnf install python3-pyside6 python3-dbus-fast
./install.sh
On Debian/Ubuntu (24.04+) or Arch, install python3-pyside6 / pyside6 the same way. If dbus-fast isn't packaged for your distro, pip installs it.
./install.sh installs into ~/.local, adds Linux Headphones Manager to your app menu and puts linux-headphones-manager and hpctl on your PATH. To remove it, run ./install.sh --uninstall.
To run from the source tree without installing:
PYTHONPATH=src python3 -m hpc # GUI (add --hidden to start in the tray)
PYTHONPATH=src python3 -m hpc.cli list
For HyperX headsets, allow access to the USB dongle once. The packages do this for you:
sudo install -m644 src/hpc/resources/70-linux-headphones-manager.rules /etc/udev/rules.d/
sudo udevadm control --reload && sudo udevadm trigger
Usage
- Pair the headphones once in your system's Bluetooth settings.
- Connect them as usual.
- Open Linux Headphones Manager. It finds them and connects by itself.
To start the app in the tray at login, add linux-headphones-manager --hidden to your desktop's autostart.
Command line
hpctl list # paired supported devices
hpctl status # everything the device reports
hpctl noise anc # noise cancelling
hpctl noise ambient --ambient 15 --voice # Sony: ambient level 15, focus on voice
hpctl noise anc --level 4 # Nothing: adaptive ANC
hpctl eq "Bass Boost"
hpctl set dsee on
hpctl set auto_power_off taken_off
hpctl -d AC:80:0A:DA:59:4C status # pick a device by address
hpctl --dump status # log raw frames (for bug reports)
Troubleshooting
- "Couldn't talk to the headphones": only one app can hold the control channel at a time. Close other controllers such as nadamas, Gadgetbridge-style bridges or Sony's app on a connected phone, then click Retry now.
- The device shows but never connects: make sure it's connected for audio first. The app only opens its control channel when BlueZ reports the device as connected.
- HyperX shows "No permission to open /dev/hidrawN": the udev rule isn't installed (see Install), or the dongle was plugged in before you installed it. Replug the dongle.
- HyperX shows "Off or out of range": the dongle is plugged in but the headset is off. Battery appears once you turn it on.
- Debug output:
linux-headphones-manager --debugorhpctl --dump statusprints every frame sent and received.
How it works
The app registers a BlueZ Profile1 for the vendor's RFCOMM service UUID and asks BlueZ to connect it. BlueZ does the SDP lookup and hands over the socket, so it needs no sdptool, PyBluez or root. If a device doesn't advertise the UUID, the app falls back to probing RFCOMM channels.
| Sony | Nothing / CMF | |
|---|---|---|
| Service UUID | 96CC203E-… (V1), 956C7B26-… (V2) |
AEAC4A03-DFF5-498F-843A-34487CF133EB |
| Frame | 3E type seq len:4 payload sum 3C, escaped with 3D |
55 ctrl:2 cmd:2 len:2 fsn payload CRC-16/MODBUS, little-endian |
| Flow | Stop-and-wait with ACK, seq alternates 0/1 | Request 0xC0xx/0xF0xx, reply with bit 15 cleared, events 0xE0xx |
For safety, on Sony V1 devices (XM3/XM4) opcode 0x22 means power off, so the session refuses to send it.
Code layout:
src/hpc/protocols/: framing, sessions and drivers.src/hpc/manager.py: device detection and reconnects.src/hpc/ui/: the Qt interface.theme.py: the Material You colour scheme, built from the accent colour in OKLCH.widgets.py: the Material 3 components.
tests/: the codec tests and full driver runs against simulated devices (python -m pytest).
Credits
The protocol knowledge comes from these projects:
- ezvk/nadamas and chukfinley/nada for Nothing / CMF.
- LZmx/sony-device-center, Gadgetbridge and mos9527/SonyHeadphonesClient for Sony.
- HeadsetControl for HyperX.
This app's code is an independent implementation.
Building packages
packaging/build-packages.sh builds the .rpm (in a Fedora container) and the .deb (in a Debian container) from the committed tree into dist/. It needs podman or docker.
License
GPL-3.0-or-later. See LICENSE.