There is no audio output from my earphone that is connected to the monitor. I tested the earphone with another laptop and it is working fine.
I tried the following solution from similar questions but the issue still persist:
killall pulseaudio; rm -r ~/.config/pulse/*
It returned 21 but sound is still unavailable.
killall pulseaudio; rm -r ~/.config/pulse/*
rm -r ~/.config/pulse/
reboot
sudo apt-get remove --purge alsa-base
sudo apt-get remove --purge pulseaudio
sudo apt-get install alsa-base
sudo apt-get install pulseaudio
sudo alsa force-reload
sudo alsamixer
Then F6 to select sound card and change the setting then reboot.
The Playback and Output Devices of pavucontrol both are using HDMI/Display Port 2 and the audio bar is fluctuating since I have YouTube running but no audio output at all. The following is the snapshot of my pavucontrol: