I changed my screen resolution from 2560x1440 to 1024x768 to test an application, and my audio sink was switched from headphone output to the speakers in my monitor for all applications playing sound. I can repeatedly cause the resolution down-scaling to change my audio sink from "Built-in Audio Analog Stereo" to "GP104 High Definition Audio Controller Digital Stereo (HDMI 2)". As the sound can be carried through HDMI, maybe something with the resolution change is causing the device/sink to be re-detected and my system defaults to it. This does not appear to be happening when I up-scale my resolution e.g. going from 1024x768 to 2560x1440. Monitor: LG 27UD58P-B Video Card: MSI GEFORCE GTX 1070 AERO ITX 8G
This sounds (pun intended) more like a problem with Pulseaudio as display settings is mostly just a xrandr frontend. Try changing the resolution with xrandr from terminal, e.g. xrandr --output HDMI-0 --mode 1024x768
Had to guess around the HDMI-# but: xrandr --output HDMI-1 --mode 1024x768 had the same effect. So it seems this is PulseAudio not remembering the previously used sink when the output device disappears/reappears?
(In reply to Robert from comment #2) > had the same effect. So it seems this is PulseAudio not remembering the > previously used sink when the output device disappears/reappears? Possibly, but I also noticed that restarting xfce4-panel sometimes changes the output from HDMI to the onboard sound card. Do you have pulseaudio-plugin on your panel? If so, try removing it to see if there is any difference.
Yes, removing the pulseaudio-plugin from my panel prevented the switch of sound sinks when the resolution changed. :)
Maybe somewhat related, even if it proves to be triggered by the xfce4-panel or a plugin: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1847570 That was recently reverted with libpulse-dev 1:13.0-1ubuntu1.1
Oh man, I just happened upon that in my software updates today. I applied the update, rebooted, and restested. Now changing resolution doesn't switch to my HDMI sink!!!
I'm counting it as fixed. Mind if we close this? :)
Ok, let's close it.