Fedora 41 sound output automatically switches to HDMI

Upgraded F39 to F41 (Cinnamon, X11) and experience a new annoyance - after HDMI-connected monitor resumes from sleep sound output automatically switches to HDMI (no speakers there) and I lose sound output until its changed back to built-in speakers.

I’m reading random hints on how it might be possible to disable a card or a sink or manage defaults, but have not found the correct instructions and/or configurations yet.

Is anyone familiar enough with udev, pactl, wpctl to help persist a sound output and/or disable HDMI completely?

On i915 there’s a flag I think for xrandr that’s something like force-dvi. Theoretically forcing DVI shoud remove HDMI audio.

Iirc the values for it are something long and broken-looking (not 0/1) for the disable option.

I didn’t have good results with trying but can’t quite remember if it was something more-serious or if it was because of lower bandwidth limits on single-link DVI vs HDMI causing my custom refresh rate to not work (I do 60 → 75 with higher bandwidth fine on HDMI; something like 173 for bandwidth with DVI limiting at 165); I don’t recall getting to a point to see if the HDMI device actually disappeared though.

I was hoping for something more audio specific, ie disabling hdmi nodes like discussed here fails for me: Sound output automatically switches to HDMI - Newbie - EndeavourOS

Arch’s method is not working as well (cannot disable the whole card, as laptop speakers are on the same card but different node): WirePlumber - ArchWiki

$  pactl list cards short
207     alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic alsa

$  pactl list sinks short
1153    alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI3__sink     PipeWire        s24-32le 2ch 48000Hz    SUSPENDED
1154    alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI2__sink     PipeWire        s24-32le 2ch 48000Hz    SUSPENDED
1155    alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__HDMI1__sink     PipeWire        s24-32le 2ch 48000Hz    SUSPENDED
1156    alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink        PipeWire        s32le 2ch 48000Hz       SUSPENDED

I incorrectly used monitor.nodes.rules instead of monitor.alsa.rules. Correct wireplumber config to disable output sinks via node.name:

$  cat ~/.config/wireplumber/wireplumber.conf.d/51-alsa-disable.conf
monitor.alsa.rules = [
  {
    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
      }
    }
  }
]