I've installed Ubuntu 18.04 LTS fresh install on Acer Predator Helios 500 Notebook, but it's unable to identify the state of the headphone jack, which is always shown as plugged in. No sound comes from the notebook's internal speaker, even after plugging in headphones.
After some time searching, the only possible solutions I came up with were
- Install pavucontrol and change the audio output to the speaker.
- Use hda-jack-retask to indicate that the headphone jack is unplugged by overriding its pin at boot time.
Both of these solutions will lead to a functional internal speaker with audio out, but when I plug in the headphones, it's unable to recognize headphones are there, and there's no audio output through headphones.
How can I fix this sort of problem?