I got a two screen setup... 1)primary screen is the desktop monitor (which I use standard analog speakers with a 3.5mm jack) and... 2)TV is connected to my Geforce 1050 Ti 4GB GPU's HDMI port. this remains connected all of the time.
-The problem = while I can temporarily switch from the default "(HDMI)" (no audio to the TV) to "(HDMI 2)" (audio does play on the TV) (i.e. left click the 'sound' icon on Xfce, select 'audio mixer' > configuration. then under 'GP107GL High Definition Audio Controller' > 'Profile:' you simply change it from the default of 'Digital Stereo (HDMI) Output' (which does not work) to 'Digital Stereo (HDMI 2) Output' (which works) then exit out of that screen and now things work as expected) where the problem occurs is, since I leave my computer on all of the time, I noticed as it sits overnight etc (I typically power off my screen when done for the day and leave PC running), when I come back to use it the next day (or hours later), the "(HDMI 2)" is gone and it's back to the default of "(HDMI)" which does not work and then I have to re-configure it through the 'audio mixer' again, which gets annoying having to do this every day as the expected behavior is it should keep it like I set it (i.e. 'analog / HDMI 2' instead of 'analog / HDMI') and then I simply just switch back and fourth from PC speakers (analog) to the TV (HDMI connection (on HDMI 2 port)) by left clicking sound icon and basically doing what's shown in the screenshot and left click the device I want to use be it 'analog' or 'HDMI 2'.
-The solution = issue the following in terminal...
Code: Select all
sudo xed /etc/pulse/default.pa
Code: Select all
load-module module-switch-on-port-available
Code: Select all
#load-module module-switch-on-port-available
Code: Select all
pulseaudio -k
so problem solved
but if anything acts up in the future, like after reboots, ill probably come back and edit this post.
==========you can stop reading here as the following was stuff I was playing with prior to finding the proper fix==========
I was playing around with editing "/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf", which when I reversed the HDMI profiles so that "HDMI 2" profile was actually using output of "HDMI" and "HDMI" profile was using output of "HDMI 2", but that did not fix anything as when it reset the following day it selected "HDMI 2" profile which was using the non-working HDMI output. so it was still selecting the non-working audio output and I still had to go back to 'audio mixer' again to correct things, which was a problem as I did not want to do that every day.
but another thing I was going to try, but did not test since the fix I posted in this topic seems to be more proper to my situation (and takes less effort to as a bonus), since I know swapping HDMI/HDMI 2 did not work, I was going to try listing both HDMI and HDMI 2 profiles to use the HDMI 2 hardware output, which 'may' have worked, but I never ended up testing it since I ran into the proper fix. but my theory was that when the issue acted up after hours of not using the computer that it would have chosen one of those two HDMI profiles (HDMI or HDMI 2, which if this occurred would have been a work-around since both would be using the hardware output of HDMI 2 (which is the only working audio output)) but for those who want to play around with this stuff the general entries for "(HDMI)" and "(HDMI 2)" are at the following locations in that 'default.conf' file...
the defaults look like this before modification...
Code: Select all
[Mapping hdmi-stereo]
description = Digital Stereo (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = left,right
priority = 9
direction = output
[Mapping hdmi-stereo-extra1]
description = Digital Stereo (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 7
direction = output
Code: Select all
[Mapping hdmi-stereo]
description = Digital Stereo (HDMI)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 9
direction = output
[Mapping hdmi-stereo-extra1]
description = Digital Stereo (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 7
direction = output