I have a Lenovo Yoga 2 Pro laptop where the headphone jack detection doesn't work properly. Most of the time the jack will always think there are headphones plugged and and therefore disable the speakers.
This is NOT a software problem, I have both Windows 10 and Ubuntu Linux 15.10 installed...