Audio jack and Nuvoton not working

I assume that you know how to insert an audio jack, so I will refrain from giving trivial advice.
Are you using a loudspeaker/headset jack with 3 contact zones or a combined headset+microphone jack with 4 contact zones?

Because one possible explanation is that Linux is assuming the wrong type of jack, and by moving the jack you restore the correct order of the electrical contacts.