[SOLVED] Mint v20.x-Xfce resets overnight to wrong HDMI audio profile

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ThaCrip
Level 5
Level 5
Posts: 987
Joined: Sat Dec 07, 2019 12:13 pm

[SOLVED] Mint v20.x-Xfce resets overnight to wrong HDMI audio profile

Post by ThaCrip »

While I am posting this as [SOLVED] right from the start, I figured I would post this since it's likely good information for those who have a problem on Mint v20.x-Xfce (I am currently running 5.13 kernel instead of default 5.4 which I don't think matters in this case) who are running a NVIDIA GPU (or the like) and leave their PC running all of the time and it automatically switches you back to the wrong HDMI profile (non-working) after hours of non-use.

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.

AudioSelect.png

-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
then find the line...

Code: Select all

load-module module-switch-on-port-available
and change it so it reads...

Code: Select all

#load-module module-switch-on-port-available
then save it (CTRL+S) and then issue the following in the terminal...

Code: Select all

pulseaudio -k
then once your audio comes back online after a few seconds and you now wait overnight (or hours later), that issue no longer exists as things remain how I set them.

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
but I was thinking of changing it to look like the following so that both "(HDMI)" and "(HDMI 2)" use the same hardware 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
but I never got around to testing that far since the fix I posted above works and all it requires is that simple "#" to stop the issue I had from occurring.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
MainPC: i5-3550 (undervolted by -0.120v (CPU runs 12c cooler) /w stock i3-2120 hs/fan) | 1050 Ti 4GB | 16GB (2x 8GB) DDR3 1600Mhz RAM | Backups: AMD E-300 CPU (8GB RAM) / Athlon X2 3600+ CPU (@2.3GHz@1.35v) (4GB RAM) | All /w Mint 21.x-Xfce
Locked

Return to “Sound”