We had a laptop that suddenly decided there were headphones connected to the computer 100% of the time, which caused the laptop’s internal speakers to be disabled entirely. It was a Compaq Presario CQ50. The unit was not dropped or damaged; it seems that the jack detection just happened to malfunction for unknown reasons. Plugging speakers into the headphone jack worked just fine, so the internal sound card was clearly functional as well. The same thing happened in Linux. Performing a BIOS update did not have any effect.
So, we had this unit sitting on a bench, with clearly functional sound, having tried all kinds of driver and BIOS and OS changes, and we couldn’t get the thing to stop detecting headphones and disabling the speakers. You’d think that meant we were pretty much screwed on getting the internal speakers to ever work. Fortunately, we found a workaround!
The system has a control panel called Conexant SmartAudio. Inside, there’s a configuration tab that allows pushing audio streams to headphones or speakers, and by default is set to “basic” settings; by switching to “advanced” instead, and telling the audio to duplicate headphone output to the internal speakers, we were able to successfully push audio out of the speakers despite the “always plugged in” headphone problem. Of course, it’s not a perfect solution since it will never turn off the internal speakers if headphones are plugged in, but most customers use the internal speakers almost all the time anyway, and the setting can always be reversed if it ever became an issue.
If you’re having problems with a system thinking headphones are plugged in all the time, and headphones work when plugged in, look for a vendor-specific control panel where you can change a similar setting. You might not have as big of a problem as you think. The most common vendors we see control panel items for seem to be VIA, Realtek, Conexant, and Sigmatel. I haven’t checked to see if any of them support this, but then again, this problem is somewhat rare for us, so I’ve not had a need. Report your results in the comments when you’re done!