Using both front and rear panel? Front panel for headphone and rear for speakers? Then, speakers working, headphone not? Here's a little trick:
Open Realtek HD Audio, select Audio I/O, click the "Connector Setting Icon" right side of the "ANALOG"
text, after clicking it, a Connector Setting Window/Dialog Box will pop out.
There are three check boxes on it, the Disable, Mute and Enable, Mute/2nd box and Enable/3rd box already had checks on them, put a check on the Disable/1st box.
Test your headphone and speaker, they should both working now. Uncheck the Disable/1st box later.
Hope this help you guys.. Sorry for my bad english.. ^_-