Earphone jack works sometimes and not others?

I have a new extensa 5220-2516 laptop. Usually when I plug in my earphones it won't even recognize it, if it does it will bring up a little note saying it was.
Any way to fix it so it always works?
 
Top