Maybe jack detection or "Sonic SenseAmp" aren't working properly. If it's a mechanical sensor/switch device inside the jack (like those in older iPhones) then it might be jammed.
What is the impedance of your speakers/headphones?
Is the physical connector - either at the input jack or at the motherboard header - not getting good electrical connection? Resecure any loose or wiggly connections, remove any dirt and debris with tweezers, clean fingerprint oils/etc with an electrical contact cleaner.
"All opinions are not equal. Some are a very great deal more robust, sophisticated and well supported in logic and argument than others." - Douglas Adams
[/Korth]