HeadPhone port Not working in Ubuntu?

This post is a bit different from what I have posted so far. Because just before switching to every new task, I would take a break and listen to music. Today also I did the same as usual but with only difference  -My headphone port of Laptop was not working. But laptop speaker worked like charm. Everything was fine till yesterday. (I tried different headphone which were working in other laptops).

After a few minutes googling I could fix this issue and go back to my routine . And the fix is as follows.

This issue is related to device driver. Somehow  config file of Alsa driver got overwritten and that needs to be reverted and for which open the terminal and type in:

cd /usr/share/pulseaudio/alsa-mixer/paths/

It would be good if we keep a back up file of the config file we are going to edit and try running the following command for that:

sudo cp analog-output-headphones.conf analog-output-headphones.bak

Next, open the config file  using the command :

sudo gedit analog-output-headphones.conf

Look for the section called [Element Speaker] . For me these two fields were set to “off”.  We need to change the section  “Element Speaker” as below,

[Element Speaker]
switch = on
volume = ignore

Then save thses changes. Restart the computer and  and unplug the headphone and reinsert  it. It will work now. (For me it worked).