AvengeMedia / AvengeMedia/DankMaterialShell
DMS keeps an active BlueZ discovery running continuously, destabilising BR/EDR audio
- Dominant language
- QML
- Stars
- 8.1k
- Forks
- 515
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 102
Description
### Compositor
Niri
### Distribution
NixOS
### If Other, please specify
_No response_
### Select your Installation Method
Source
### Was this your original Installation method?
Yes
### If no, specify
official flake
### dms doctor -vC
Click to expand
## DMS Doctor Report
**System**
- [ok] Operating System: NixOS 26.05 (Yarara)
- Supported for runtime (install via NixOS module or Flake)
- [ok] Architecture: amd64
- [ok] Display Server: Wayland
- WAYLAND_DISPLAY=wayland-1
**Versions**
- [ok] DMS CLI: dms 1.4.6+date=2026-04-29_eb5afcd
- /nix/store/9aj9b1q4xv1gaipn0fw7c3c5sl7alz7a-dms-shell-1.4.6+date=2026-04-29_eb5afcd/bin/.dms-wrapped
- [ok] Quickshell: Quickshell 0.2.1 (revision 783c953987dc56ff0601abe6845ed96f1d00495a, distributed by Official-Nix-Flake)
- /run/current-system/sw/bin/qs
- [ok] DMS Shell: 1.4.6+date=2026-04-29_eb5afcd
- /nix/store/9aj9b1q4xv1gaipn0fw7c3c5sl7alz7a-dms-shell-1.4.6+date=2026-04-29_eb5afcd/share/quickshell/dms
**Installation**
- [ok] DMS Configuration: Found
- /nix/store/9aj9b1q4xv1gaipn0fw7c3c5sl7alz7a-dms-shell-1.4.6+date=2026-04-29_eb5afcd/share/quickshell/dms
- [ok] shell.qml: Present
- /nix/store/9aj9b1q4xv1gaipn0fw7c3c5sl7alz7a-dms-shell-1.4.6+date=2026-04-29_eb5afcd/share/quickshell/dms/shell.qml
- [info] Install Type: Nix store
- /nix/store/9aj9b1q4xv1gaipn0fw7c3c5sl7alz7a-dms-shell-1.4.6+date=2026-04-29_eb5afcd/share/quickshell/dms
**Compositor**
- [ok] niri: 26.04
- /run/current-system/sw/bin/niri
- [info] Active: niri
- [ok] Background Blur: Supported
- Compositor supports ext-background-effect-v1
**Quickshell Features**
- [ok] Polkit: Available
- Authentication prompts
- [ok] IdleMonitor: Available
- Idle detection
- [ok] IdleInhibitor: Available
- Prevent idle/sleep
- [ok] ShortcutInhibitor: Available
- Allow shortcut management (niri)
- [ok] BackgroundBlur: Available
- Background blur API support in Quickshell
**Optional Features**
- [ok] accountsservice: Available
- User accounts
- [warn] power-profiles-daemon: Not available
- Power profile management
- [ok] logind: Available
- Session management
- [ok] cups-pk-helper: Available
- Printer management
- [ok] I2C/DDC: 1 monitor(s) detected
- External monitor brightness control
- [ok] qt6-imageformats: Installed (4 formats)
- Formats: WebP, TIFF, JP2, ICNS (/nix/store/44m5vdgldm4b0ngvfj2hbjmv4b72kriz-qtimageformats-6.11.0/lib/qt-6/plugins/imageformats)
- [ok] kimageformats: Installed (4 formats)
- Formats: AVIF, HEIF, JXL, EXR (/nix/store/7jngqbdkd1c8v578n2cn8i716ah77c3f-kimageformats-6.26.0/lib/qt-6/plugins/imageformats)
- [ok] Terminal: ghostty, kitty, alacritty, foot, wezterm
- [ok] Network: NetworkManager
- NetworkManager present; iwd also running (likely NM's Wi-Fi backend). Using NM API.
- [ok] matugen: Installed
- Dynamic theming
- [ok] dgop: Installed
- System monitoring
- [ok] cava: Installed
- Audio visualizer
- [info] khal: Not installed
- Calendar events
- [info] danksearch: Not installed
- File search
- [info] fprintd: Not installed
- Fingerprint auth
**Config Files**
- [ok] settings.json: Present
- /home/erahhal/.config/DankMaterialShell/settings.json
- [info] clsettings.json: Not yet created
- /home/erahhal/.config/DankMaterialShell/clsettings.json
- [ok] plugin_settings.json: Present
- /home/erahhal/.config/DankMaterialShell/plugin_settings.json
- [ok] session.json: Present
- /home/erahhal/.local/state/DankMaterialShell/session.json
- [ok] dms-colors.json: Present
- /home/erahhal/.cache/DankMaterialShell/dms-colors.json
**Services**
- [ok] dms.service: enabled, active
- [ok] greetd: enabled
**Environment**
- [info] QT_QPA_PLATFORMTHEME: qt5ct
- [info] QS_ICON_THEME: Not set
---
**Summary:** 0 error(s), 1 warning(s), 32 ok
### Description
While dms.service runs, the adapter's org.bluez.Adapter1.Discovering property stays true indefinitely — no Control Center / Bluetooth panel open, no user Scan click. The continuous inquiry scan time-shares the 2.4 GHz radio and degrades A2DP; in my case AirPods Pro reconnect on a ~30 s loop.
**Attribution within DMS**
- Not BlueZ background-scanning for trusted LE devices: untrusting every paired device doesn't stop the re-assertion.
- Not the visible QML: Services/BluetoothService.qml and Modules/ControlCenter/Details/BluetoothDetail.qml:157 only set discovering = true from the manual Scan button; Modules/ControlCenter/ControlCenterPopout.qml:107-108 stops it on popout close. That stop call sometimes fails with quickshell.bluetooth.adapter: "No discovery started" — DMS's bookkeeping desyncs from BlueZ.
- Most likely culprit: the Go bluez/ backend or the Quickshell.Bluetooth C++ subscription holding a discovery filter while the BluetoothService singleton is alive.
**Versions**
dms-shell 1.4.6+date=2026-04-29_eb5afcd · quickshell 0.2.1 · BlueZ 5.86 · niri · NixOS (flake input github:AvengeMedia/DankMaterialShell/stable).
### Expected Behavior
Discovering should be true only between an explicit Scan toggle and the panel closing (or pairing completing).
### Steps to Reproduce
```
# With dms running:
bluetoothctl power off && bluetoothctl power on # clear adapter
sleep 15
busctl get-property org.bluez /org/bluez/hci0 \
org.bluez.Adapter1 Discovering
# -> b true # re-asserted in 5–15s
bluetoothctl scan off
# -> Failed to stop discovery: org.bluez.Error.Failed # we don't own it
```
Then systemctl --user stop dms and run the same power off/on — Discovering stays b false indefinitely. So the re-asserter lives inside dms.service.
### Error Messages/Logs
_No response_
### Screenshots/Recordings
_No response_
Contributor guide
Research direction
Start with the Go bluez/ backend and the Quickshell.Bluetooth subscription, then compare them with Services/BluetoothService.qml, Modules/ControlCenter/Details/BluetoothDetail.qml:157, and Modules/ControlCenter/ControlCenterPopout.qml:107-108. Reproduce the issue with the supplied bluetoothctl and busctl commands while dms.service is running. Done means Discovering remains false unless an explicit scan is active and stops when the panel closes or pairing completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100