This seemed like it might have been related to bug 1873384. However I have pulseaudio 1:13.99.1-1ubuntu3.5 in which that bug is supposedly fixed, and changing input sources does not fix the problem for me.
On the other hand the speakers are now working with the headphones plugged in, when "Speakers" is selected in pavucontrol. I don't know what changed.
This seemed like it might have been related to bug 1873384. However I have pulseaudio 1:13.99. 1-1ubuntu3. 5 in which that bug is supposedly fixed, and changing input sources does not fix the problem for me.
On the other hand the speakers are now working with the headphones plugged in, when "Speakers" is selected in pavucontrol. I don't know what changed.