After the fresh installation of Linux(Ubuntu or any other) your 3.5mm jack /earphone is not working at all.
so in this story, I will provide how you can solve this issue.
so, first of all, you have to install alsamixer
type below command in your terminal
sudo apt-get install alsa alsa-tools
make sure you have an internet connection. if you do not have wifi then you can use your phone’s USB tethering to enable internet in your Linux.
run below command after you install the alsamixer
this kind of interface will open when you execute above command
now press arrow key until you see: HP/Speaker Auto-Detect.
now press the M key to enable it.
by default, it will be off.
now again press arrow key until you find: HP/Speaker
and here also press the M key to enable it.
now press the ESC key to exit.
we have to save these settings. so we do not have to every time turn it on after a reboot.
so to save settings write below command in your terminal.
sudo alsactl store
if this tutorial solved your issue. then press 👏