I'm running Ubuntu 20.04.3 LTS x86_64 with up-to-date MATE 1.26 and Intel UHD Graphics 630. My primary monitor is in portrait mode, 1200x1600 and audio works fine. When I turn the second monitor on (landscape 1920x1080) and try to play youtube video on any of the monitors, there is no audio. I could use some clues how to fix it.
I tried to find GUI app for audio settings, but didn't succeed.
Would you be so kind to open a terminal and type 'alsamixer' ?
(followed by [enter] and [F6])
This would give a list of sounddevices recognized by the driver.
(Pulseaudio is a soundserver/mixer but not the driver)
If the S/PDIF sound-device also disappears from alsamixer when 2nd screen is enabled, then this must be a driver issue or hardware limitation although I never encountered this problem on Intel chipsets before .
EDIT:
I presume that with one screen you have both S/PDIF and HDMI audio , right ?
Let's go back to the pulse-audio interface:
How many profiles can you choose from ?
(check this with one monitor and with two monitors connected)
You should at least have two profiles (one analog stereo and one IEC958)
For instance, these are the profiles I have on my primary soundcard:
Oh that's cool!
It might be a good idea if you would mark this topic as solved then
And probably the other topic about compositors and wayland too
Otherwise people will continue to bug you about solutions that you no longer need
Well, I declared a victory a bit too soon. The solution works, but it has to be applied manually each time I turn the second monitor on. It also reveals an underlying problem, perhaps. Here is what I see after turning the second display on:
Monitor Preferences window assigns HDMI-1 to BBY 40" and HDMI-2 to Dell 20". Putting aside the fact that my Asus PRIME B360M-A motherboard has only one HDMI port and one DVI-D port, the audio in shown configuration plays on BBY 40", while Sound Preferences indicates it plays on Dell 20".
The mislabeling of your videoports is a driver issue, there is not much you can do about that except a bugreport on launchpad.
But the fact that pulseaudio constantly "forgets" your choice of default audio device is solvable
Check this link:
The reason for this unwanted behaviour is probably this:
Switching to HDMI-audio when inserting a HDMI connector is considered user friendly. On several forums people have asked for this.
Personally I deem it user hostile, considering the arcane overrides one has to apply to stop the machine from doing things one didn't ask for in the first place. But yeah, sign of the times: Automagic for the people.
At least in Linux we still can change, in our own setups, what we don't like.
(at least Ubuntu-MATE delivers me the freedom and ease-of-use to do that)