I also have been unable to get the sound to switch to headphones and I don't believe it's caused by anything mechanical.
If I boot the same laptop in Windows Vista, the switch to headphones works like expected. Also, there are posts on the
Ubuntu forum addressing the same issue, but I haven't found a suggestion there that has helped in my case.
My laptop has an Intel HDA sound card. For some reason I can't seem to find anything more specific about it,
such as what type of chip is used on the card.