Audio panel lists unavailable input devices — sources are not availability-filtered (unplugged headset mic shown and selectable)
Audio panel lists unavailable input devices — sources are not availability-filtered (unplugged headset mic shown and selectable)
Summary
The audio panel filters output devices by port availability, but not input devices. A source whose only port reports not available (e.g. the headset microphone while nothing is plugged into the jack) still appears in the panel's Input list and can be clicked, which silently switches the default source to a dead input.
Environment
- Omarchy 4.5.0-3 (shell:
shell/plugins/panels/audio/Panel.qml); same code present onquattrobranch HEAD as of 2026-11-12 - Quickshell 0.3.2, PipeWire 1.6.9, WirePlumber 1.6.9
- Apple Silicon MacBook Air J313 (Asahi/Aurora,
linux-aurora 7.2.11.aurora14-1,alsa-ucm-conf-aurora,aurora-audio), omarchy-platform-apple-silicon - Nothing plugged into the headset jack
Steps to reproduce
- Leave the headset jack unplugged (or any setup where a source's only port reports
not available). - Open the audio panel from the bar (volume icon, top right).
- The Input section lists "Headset Microphone" even though its port is unavailable.
- Click it —
omarchy-audio-input-set-defaultpromotes the unplugged source to default; the microphone stops working until the user manually switches back.
Live state on the affected machine:
$ omarchy-audio-sink-availability sources
alsa_output.platform-sound.HiFi__Headphones__sink.monitor 0
alsa_input.platform-sound.HiFi__Headset__source 0 <- unavailable, still listed
effect_output.j313-mic 1
audio_effect.j313-convolver.monitor 1
omarchy_asahi_mic 1
$ pactl list sources | grep -A1 'In\] Headset'
[In] Headset: Headset Microphone (type: Headset, priority: 300,
availability group: Headset Mic, not available)
Root cause
The panel collects source availability but never applies it to the source list. In Panel.qml:
// sinks: filtered by availability
readonly property var rawAudioSinks: {
var list = []
for (var i = 0; i < candidateSinks.length; i++)
if (sinkAvailable(candidateSinks[i])) list.push(candidateSinks[i])
if (sink && list.indexOf(sink) < 0) list.unshift(sink)
return list
}
// sources: no availability filter
readonly property var rawAudioSources: {
var list = candidateSources.slice()
if (source && list.indexOf(source) < 0) list.unshift(source)
return list
}
sourceAvailability is already fetched every 5 s (sourceAvailabilityProc runs omarchy-audio-sink-availability sources) but is only consumed by Model.isUntypedSource() for untyped nodes — typed audio sources (like the headset mic) bypass it.
Expected behavior
Sources whose ports are all not available are excluded from the Input list, the same way unavailable sinks are excluded from the Output list — except the current default source, which stays listed (matching the sink behavior).
Suggested fix
Mirror the sink filter for sources:
function sourceAvailable(node) {
if (!node || !node.name) return true
return sourceAvailability[String(node.name)] !== false
}
readonly property var rawAudioSources: {
var list = []
for (var i = 0; i < candidateSources.length; i++)
if (sourceAvailable(candidateSources[i])) list.push(candidateSources[i])
if (source && list.indexOf(source) < 0) list.unshift(source)
return list
}
(The availability map is refreshed on a 5 s timer while the panel is open and on open, so hotplug updates propagate. A sourceAvailabilityLoaded flag analogous to sinkAvailabilityLoaded would be needed so the map counts as authoritative once first loaded.)
Codex High read the report and the current quattro audio-panel source. The second classifier, deepseek-v4p1-flash, returned no classification, so the required two-model classification remains unsettled. No reproduction or worker tests ran. This is left for the maintainer to resolve the classification before verification continues.