I was in the same quandary, running ubuntu 11.10 I would plug in my headphones and the sound would stop from my speakers but no sound would emit from my headphones. Below is a possible workaround that worked for me:
Left click on the upper right speaker/sound icon and then in the context menu that appears, click on sound settings at the bottom.
Now click on the "output" tab. Here you should see your audio device for output and at the very bottom a drop down that is labled "connector".
When I plug in my headphones, this drop down automatically changes to "Analog Headphones". If I then click on the drop down menu and change this to be "Analog Speakers" without unplugging or changing anything else, the sound just starts to work again in my headphones.
Hope that helps.