I installed Ubuntu 22.04 on my notebook. The HDMI sound was working fine, but then I unplugged the charger, and when I plugged it back in, the HDMI sound stopped working. The internal speakers work fine, but what's curious is that when I'm playing any sound and switch to HDMI, it briefly indicates audio output and then goes silent.
I searched for solutions on the internet, but I was unsuccessful.