Thanks, the log is interesting. At line 5943 the headphones are plugged in. Pulseaudio then decides to switch from the 5.1 profile to the analog stereo profile, as expected. After switching the profile, however, pulseaudio decides to immediately switch to digital output instead. Unfortunately the log doesn't show why this happens.
If I write a patch that adds better logging, will you be able to apply and test it? Here are some instructions for building and installing pulseaudio from source: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/PulseAudioFromGit/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1521987 Title: Sound is not automatically switched back from headphones to speakers To manage notifications about this bug go to: https://bugs.launchpad.net/pulseaudio/+bug/1521987/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs