Thanks.
It sounds like there is a bad connection in the port on the back panel.
That would explain both crackling and flickering settings. The
flickering would be Ubuntu quickly detecting spurious insertion/removal
or connection/disconnection of the headphones. So this sounds like a
hardware
Upgrading to Ubuntu 18.10 didn't seem to help. Using a different set of
headphones also didn't work. Other audio sources work fine. Unplugging
the headphones from the line out port in the back panel of the computer
and plugging it in the front headphones port stops the crackling and the
flickering
Please try:
1. Booting Ubuntu 18.10 on the machine to see if this bug is already fixed:
http://releases.ubuntu.com/18.10/
2. A different set of headphones.
3. Other audio output methods like the built-in speakers or Bluetooth.
Do any of those help?
** Changed in: alsa-driver (Ubuntu)