I have tried 17.10 and was having the same issue, I go to Volume Control and I can see it switching between ports really fast. The sound issue is intermittent and I can’t figure out what is going on.
When it cuts out the sound mixer (Pulseaudio) automatically switches to Line Out and then switches back to Headphones and then it keep repeating this.
Computer Specs -
Mobo - ASUS Z170 Deluxe
If I go into alsamixer and disable auto-mute this stops the cutting out but instead it plays audio out of both devices.