Some wiring schemes will physically disconnect the speaker outputs when the headphones are plugged in. If that physical link is broken due to the jack wearing out (spring return of contacts not working) this could be your problem. Of course the headphones would still work because those contacts still connect with the headphone plug just fine. The answer could be repair or replacement of the jack.
I bought a dell inspiron 6400 over a year ago but shortly after buying it my speakers stopped working or so I thought. Later on i learned that it wasn't my speakers that were bugged but it was my headphone jack. The computer thinks that headphones are always in so no sound comes from the speakers but when i put my headphones in i can hear just fine. Apparantly its a common problem with dell 6400/e1505. I was just wondering though if there was a way through windows or any other software that i can turn my headphone jack off? If i can turn it off then the sound would come through the speakers (theoretically speaking).