Context: Debian/testing on a ASRock B450 with Ryzen 2200G, HDMI monitor.
I can set the default audio sink either via /etc/pulse/default.pa or manually with this command: pacmd set-default-sink alsa_output.pci-0000_38_00.1.hdmi-stereo-extra1
However, once the monitor enters standby mode, the default gets reset to the internal HDaudio card and the volume applet is no longer tracking the HDMI volume, rather the internal audio card feeding the headphone and back panel jacks. I assume this happens because the HDMI "card" gets unplugged but I'm not sure.
I also tried the suggestion in this other question but it didn't work. Most questions seems to be about setting pulseaudio defaults but this doesn't work: the audio is still routed correctly to the HDMI monitor, it's just the applet which is tracking the wrong volume. If I reset the default card with the command above, it goes back to showing the proper volume until the next standby.
How do I fix this? Basically, I need to run "pacmd set-default-sink" right after the hdmi sink becomes available again.
New info on sinks
- before standby: card 0 is hdmi, card 1 is internal; card 0 is default and available, card 1 is also available but not default (link to details: https://paste.scratchbook.ch/view/83c0e9a5)
- during standby: hdmi becomes unavailable, internal card is marked default (link to details: https://paste.scratchbook.ch/view/9e9ae422)
- after standby: hdmi is again available, internal card is still default (link to details: https://paste.scratchbook.ch/view/9be5801a)
After interrupting standby, I started a new player and I can confirm the music comes from the hdmi monitor, yet the applet shows a crossed-out speaker.