So my situation is my system is randomly and arbitrarily identifying my two monitors with different names for output with every restart. And it defaults to my headphones as the output it should use. That's not what I want.
I ideally want audio to be coming through my primary monitor. That's it. I would still like the option to make audio come through my headphones if I need to put headphones on, so the simple answer of just always unplug them or deactivate that output device isn't going to cut it.
I first came across scripts like https://askubuntu.com/a/1203350/1618552 that would supposedly let me quickly hotkey toggle my audio.
It half way works. Yes, I must always use the custom hotkey to switch from my line out (headphones) to my HDMI output. However, Pulse Audio is frustrating. It always, always, always wants to use my secondary monitor with really poor speakers. (If the algorithm cares at all, my poor monitor's display is set to be on the upper left corner of my primary monitor, so its top left corner sets at coordinates 0x0 and my primary monitor starts at coordinates 1600x880. Just spit balling, but maybe Linux has some kind of way to identify what should be the primary speaker when built into monitors by just choosing the monitor that is at 0x0.) And the hotkey only toggles between headphones and poor speakers. Never in the cycle does it identify my good speakers as an output.
So I have to dig into the sound system and manually flip the HDMI to use my good monitor. Once I do that, the script from the other thread works fine to go between headphones and good monitor. It skips the poor monitor.
So I really just need to make my good monitor the priority over my poor monitor. Should be really simple, right? No.
I eventually came across an answer in googling for stuff about a pulse audio control panel that I guess I installed with something like sudo apt pulse-audio. I don't know the ins and outs of this program, but I found on the Configuration tab that I can press a lock icon and it appears to lock that type of output to a specific device.
My expectation would be, great, let me set my good monitor as the HDMI output. That should fix it, right?
Well, it locks. I can lock it to "HDMI 3" (yes, I only have 2 monitors). But if I restart the system and instead of calling my good monitor HDMI 3 it calls it HDMI, that means my hotkey doesn't work. The HDMI output are essentially locked because it says that HDMI 3 is unplugged and I must manually go into the PA Control Panel to select HDMI as my preferred output device.
So frustrating.
And if I keep HDMI as the default output, well, great, once I restart the computer it's got a coin flip of a chance of saying HDMI 3 is the good monitor and must make me restart it.
It seems the poor monitor is always HDMI 2 on reboots, but because that's the device I never want, I haven't paid attention.
Please please please any advice or anything about suggested sound drivers or something that would actually work for a dual monitor set up or some kind of script I can run at launch that just forces the device to check if "HDMI" or "HDMI 3" is plugged in, set that to the default output. I can't find anything in the pulse audio commands to actually do that from what I've been reading on. The closest is identify if I want it to output via Line Out (headphones) or HDMI, and like I said, it will "select" an "unavailable" device because it never uses a consistent naming scheme.
I have no explicit sound card. My HDMI ports are from the exact same GPU. And my line out for headphones is from the case.