Chosen audio output device changes when second monitor turned off/on

I don't know if this is a PulseAudio problem or a Zorin problem, but it seems like an inherent PulseAudio quirk that is best fixed by a Zorin workaround

The issue I'm having is that when my secondary screen is turned on or off, my chosen audio output device changes to an unwanted one.

I'm running Zorin OS 16.2 Core on a system with an AMD RX 5700 GPU and two monitors - both with built in speakers. I also have a USB headset I use for gaming. The primary monitor turns on and off with the system and I use it as the speakers for my system when not using the headset. The secondary monitor does not automatically turn on, and is only turned on as needed. When the second monitor is turned on, the chosen output device changes. It originally changed to Analog output, but when i disabled analog output it now changes to my usb headset when the monitor is turned on.

From what I can determine the issue is that pactl does not distinguish between the primary monitor (HDMI 5) and the secondary monitor (HDMI 3), as shown below. Because HDMI 5 and HDMI 3 use the same output sink #25, when the second monitor is turned off or on the combined HDMI sink #25 is seen as temporarily removed and the output device is changed to the next currently available sink. Is there a way to set Zorin OS to remember chosen output devices, even if the chosen one is temporarily unavailable?

$ pactl list short sinks
2	alsa_output.usb-SteelSeries_SteelSeries_Arctis_5_00000000-00.analog-chat	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
3	alsa_output.usb-SteelSeries_SteelSeries_Arctis_5_00000000-00.analog-game	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
25	alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra4	module-alsa-card.c	s16le 2ch 48000Hz	SUSPENDED

This is something that I've struggled with myself, and tried different workarounds with some success, as I always had trouble when connecting headphones. But these are some threads that I found useful and that you may try:

This proposes to either restart manually, or alter the pulseaudio configuration to disable switching automatically when a new module is detected.

Here the proposed solution is to actively set the default device. Hopefully one of these will help.

1 Like

Thank you, I found it worked to comment out

load-module module-switch-on-port-available

in /etc/pulse/, by adding a "#" to the beginning of the line. Don't know what happens if i wanted toplug in a new output device but that's a problem for later. Seems this may have been fixed in pulseaudio 9 and Zorin OS uses pulseaudio 8

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.