Audio profile changes if external monitor is connected

Hello,

I’m using endeavourOS with pipewire + wireplumber. My audio card has 4 profiles, but the wrong one is applied when I plug in an external monitor.

The HDMI nodes are completely disabled, so pipewire doesn’t switch to the monitor. Only profiles are switched. I have even configured the default profile to use the speakers.

The available profiles are:

1. off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
2. HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1, Mic2): Play HiFi quality Music (HDMI1, HDMI2, HDMI3, Headphones, Mic1, Mic2) (sinks: 4, sources: 2, priority: 10300, available: yes)
3. HiFi (HDMI1, HDMI2, HDMI3, Mic1, Mic2, Speaker): Play HiFi quality Music (HDMI1, HDMI2, HDMI3, Mic1, Mic2, Speaker) (sinks: 4, sources: 2, priority: 10200, available: yes)
4. pro-audio: Pro Audio (sinks: 5, sources: 3, priority: 1, available: yes)

The 3rd profile is configured to be the default one. When the monitor is plugged in, the profile switches to the 2nd one, and no output device will be available. I always need to manually switch back to the right profile in the settings.

The custom pipewire config:

monitor.alsa.rules = [
  {
    matches = [
      {
        node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink"
      }
    ]
    actions = {
      update-props = {
         device.profile = "HiFi (HDMI1, HDMI2, HDMI3, Mic1, Mic2, Speaker)"
      }
    }
  },
  {
    matches = [
      {
        node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink"
      }
    ]
    actions = {
      update-props = {
         node.disabled = true
      }
    }
  },
  {
    matches = [
      {
        node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI2__sink"
      }
    ]
    actions = {
      update-props = {
         node.disabled = true
      }
    }
  },
  {
    matches = [
      {
        node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI3__sink"
      }
    ]
    actions = {
      update-props = {
         node.disabled = true
      }
    }
  }
]

Are there any possible fixes for this?