If you are running KDE: start the program Kmix (if it starts only in the system tray, then right click -> Show mixer window), then go to the tab 'Switches' then make sure Headphone Jack Sense and Line Jack Sense are checked (the "lights" beside them should shine yellow).
I'm sure other mixing software got something similar.