Skip to content

Instantly share code, notes, and snippets.

@gtirloni
Last active April 26, 2023 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtirloni/4384f4de6f4d3fda8446b04057ca5f9d to your computer and use it in GitHub Desktop.
Save gtirloni/4384f4de6f4d3fda8446b04057ca5f9d to your computer and use it in GitHub Desktop.
How to disable audio devices with Pipewire

Find your devices

$ pactl list short

Create the Wireplumber rule to disable the device

$ mkdir -p $HOME/.config/wireplumber/main.lua.d
$ vi $HOME/.config/wireplumber/main.lua.d/51-disable-devices.lua
$ systemctl --user restart wireplumber

Tested on Fedora 38 with Wireplumber 0.4.14 and Pipewire 0.3.70

rule = {
matches = {
{
{ "device.name", "equals", "alsa_card.usb-046d_HD_Pro_Webcam_C920_44FFD86F-02" },
},
{
{ "device.name", "equals", "alsa_card.pci-0000_01_00.1" },
},
},
apply_properties = {
["device.disabled"] = true,
},
}
table.insert(alsa_monitor.rules,rule)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment