Unable to disable device nodes
- PipeWire version: 0.3.51
- Distribution: Pop!_OS 22.04 LTS
- Desktop Environment: GNOME 42.0
- Kernel version: 5.17.5
Description of Problem:
I have a laptop (ASUS ZenBook UX325EA) with no mini-jack socket. However, There are extra input and output devices (perhaps, they are derived internally from the sound card) in the system that produce or capture no sound.
The is a Headphones output that combined with the Speaker output, but has another volume control:
and there is a Headphones Stereo Microphone that doesn't do anything and capture no sound as a mic:
The problem is that those phantom output and input have higher priorities as a default devices, so every time I connect or disconnect other devices I have to manually set correct devices in the sound settings. And since they present in the system as ports/nodes and not as a separate devices I don't know what the correct way to solve this issue.
What I've already tried so far:
-
Disable those extra nodes using WirePlumber scripts, e.g.:
rule_Disable_Headphones_Mic = { matches = { { { "node.nick", "equals", "Headphones Stereo Microphone" }, }, }, apply_properties = { ["node.disabled"] = true, }, } table.insert(alsa_monitor.rules,rule_Disable_Headphones_Mic)
But this disables all sinks and sources altogether. Don't know what's the reason, maybe this should not work at all or they all are part of a single node. But anyway this approach doesn't work.
-
Set higher priorities for needed sink/source, also using WirePlumber scripts:
rule_Headphones_Stereo_Microphone_priority = { matches = { { { "node.nick", "equals", "Headphones Stereo Microphone" }, }, }, apply_properties = { --["node.disabled"] = true, -- Disables everything for some reason ["priority.session"] = 1600, ["priority.driver"] = 1600, }, } rule_Digital_Microphone_priority = { matches = { { { "node.nick", "equals", "Digital Microphone" }, }, }, apply_properties = { ["priority.session"] = 1700, ["priority.driver"] = 1700, }, } rule_Speaker_Headphones_priority = { matches = { { { "node.nick", "equals", "Speaker + Headphones" }, }, }, apply_properties = { ["priority.session"] = 700, ["priority.driver"] = 700, }, } rule_HDMI1_priority = { matches = { { { "node.nick", "equals", "HDMI / DisplayPort 1 Output" }, }, }, apply_properties = { ["priority.session"] = 800, ["priority.driver"] = 800, }, } table.insert(alsa_monitor.rules,rule_Headphones_Stereo_Microphone_priority) table.insert(alsa_monitor.rules,rule_Digital_Microphone_priority) table.insert(alsa_monitor.rules,rule_Speaker_Headphones_priority) table.insert(alsa_monitor.rules,rule_HDMI1_priority)
This approach seems to work, but sometimes wrong sinks/sources are selected anyway rendering a sound system to fail again.
Ideally in my opinion would be to:
- Split the Speaker+Headphones sink and remove the Headphones part from the sound system completely.
- Remove the Headphones Stereo Microphone from the sound system completely.
I'm not sure if this even feasible, but any help on that would be great.
Actual Results:
Specific ports are not got disabled.
Expected Results:
Specific ports are disabled and not present in the system.
Additional Info (as attachments):
-
pw-dump > pw-dump.log
pw-dump.log -
pw-cli list-objects Device > pw-cli-list-objects-Device.log
pw-cli-list-objects-Device.log -
pw-cli list-objects Node > pw-cli-list-objects-Node.log
pw-cli-list-objects-Node.log
Please let me know if I can provide any additional information.