feat(audio): prefer dock/HDMI/USB sinks in WirePlumber (#87)
Some checks failed
Check / eval (push) Has been cancelled

Raise priority.session for HDMI/DisplayPort (1100) and USB (1050) ALSA
outputs so the default sink follows dock plug/unplug; built-in analog
wins again when externals disappear. Rules live in
modules/nixos/dock-audio-rules.nix; checks.dock-audio covers the contract.

Verified: V2 — flake check --no-build; checks.dock-audio green.
V3 pending: HARDWARE-QUEUE #87 real HDMI/USB-dock hotplug.
This commit is contained in:
Bernardo Magri
2026-07-11 10:36:07 +01:00
parent 27f18e4ccc
commit f47903a6a6
9 changed files with 125 additions and 8 deletions

View File

@@ -394,6 +394,12 @@ Design/decision records and a running log of shipped work (items marked
power management is on (systemd docked = external display present).
Undocked lid suspend left to upstream. `checks.clamshell-logind` asserts
logind.conf + active logind. Real lid+external V3 in HARDWARE-QUEUE.
✓ **Dock audio sink priority (#87, `VISION § C`):** WirePlumber
`90-nomarchy-dock-audio` raises `priority.session` for HDMI/DP and USB
ALSA sinks so they become default when present; unplug falls back to
built-in. Rules in `modules/nixos/dock-audio-rules.nix`;
`checks.dock-audio` pure + conf-file VM. Real hotplug V3 in
HARDWARE-QUEUE.
- ✓ **Hibernate double-unlock:** on resume from hibernate the LUKS
passphrase already gates the machine, but locking hyprlock before sleep
meant a second password. Fixed by *not locking* before an encrypted

View File

@@ -80,7 +80,7 @@ Reference: [HARDWARE.md](HARDWARE.md) §4§5, §11 (doctor).
| Idea | Intent | Notes |
|------|--------|-------|
| **Dock life** | Lid closed + external only, wake, default audio sink on undock | ✓ #86 clamshell logind ignore when docked; #87 audio still open |
| **Dock life** | Lid closed + external only, wake, default audio sink on undock | ✓ #86 clamshell logind; ✓ #87 WirePlumber HDMI/USB priority (V3 hotplug QA) |
| **Hibernate/sleep confidence** | Doctor: resume device, swap size, clean suspend journal | Trust > new power UI |
| **Battery health readout** ✓ | Cycles + design capacity % in doctor where sysfs allows | ✓ shipped #80 (report-only; charge limit is a separate row) |
| **Charge-limit instant apply** | Already PROPOSED `[blocked:hw]` | Keep privilege tradeoff explicit |