Audio selection on booth up in ubuntu 22.04 with HDMI connected monitor

Let’s try something!

Open a terminal, and gain root rights.
Maybe you can do this with pressing ctrl-alt-T (opens the terminal) and issue command sudo su

It will ask your password.

After that, open default.pa for editing in nano:

nano /etc/pulse/default.pa

Now, navigate to find this section:

Note, that those settings are commented.
Add the following:
set-default-sink alsa_output.pci-0000_00_01.1.hdmi-surround

So that this part will look like:

### Make some devices default
#set-default-sink output
#set-default-source input

set-default-sink alsa_output.pci-0000_00_01.1.hdmi-surround

That instructs Pulseaudio to use the HDMI sink as the default output.
Hopefully that’s it.

Save your edit: press ctrl-X (that exits nano), nano will ask wether you want to save your changes: of course answer Y (yes).
Reboot, and see how it behaves.
Let me know how it went, did this work, or do you get some malfunction?