I see, the issue was spelled out a few posts in front of mine:
"The problem was that the way the jackplug was fitted to the motherboard it came loose with normal wear - the small force exerted by the plug on the holder when plugging in was enough to loosen it off from the motherboard.
So the physical connection which made the software recognise that a plug was in didn't register. This was why the physical connection played sound through the headphones but the software connection did not cut off the speakers.
No software fix would have repaired this."
If this could somehow be the first thing that someone sees when they look up this question, that would save others a great deal of time messing with their software trying the fixes on here.