Crackling and popping sound when using headphones

Bug #1648183 reported by Antony
156
This bug affects 29 people
Affects Status Importance Assigned to Milestone
Fedora
New
Undecided
Unassigned
alsa-driver (Arch Linux)
New
Undecided
Unassigned
alsa-driver (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Laptop is HP Pavilion - 15-au118tx. The laptop has B and O play and the output from speakers are just fine, when using headphones there is some kind of crackling and popping sound in both ears but prominently in the left ear.

The issue happens only when the sound is played, if i reduce the PCM way low using alsamixer, the effect is minimized but the volume is also reduced. Increasing the volume in the panel increases the PCM as well.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: alsa-base 1.0.25+dfsg-0ubuntu5
ProcVersionSignature: Ubuntu 4.8.0-30.32-generic 4.8.6
Uname: Linux 4.8.0-30-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: antony 1719 F.... pulseaudio
CurrentDesktop: Unity
Date: Wed Dec 7 23:30:05 2016
InstallationDate: Installed on 2016-11-20 (17 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:PCH failed
Symptom_Card: Built-in Audio - HDA Intel PCH
Symptom_Jack: Black Headphone Out, Left
Symptom_Type: Digital clip or distortion, or "overdriven" sound
Title: [HP Pavilion Notebook, Realtek ALC295, Black Headphone Out, Left] Sound is distorted
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/19/2016
dmi.bios.vendor: Insyde
dmi.bios.version: F.14
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: 8216
dmi.board.vendor: HP
dmi.board.version: 83.13
dmi.chassis.type: 10
dmi.chassis.vendor: HP
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsyde:bvrF.14:bd07/19/2016:svnHP:pnHPPavilionNotebook:pvrType1ProductConfigId:rvnHP:rn8216:rvr83.13:cvnHP:ct10:cvrChassisVersion:
dmi.product.name: HP Pavilion Notebook
dmi.product.version: Type1ProductConfigId
dmi.sys.vendor: HP
mtime.conffile..etc.modprobe.d.alsa-base.conf: 2016-12-07T23:12:52.939689

Revision history for this message
Antony (antonyjoseph) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
humble_coffee (humblecoffee) wrote :

I'm also experiencing this exact issue. While it doesn't happen all the time, it's sufficiently frequent and unpleasant that I just can't listen to music through the audio jack. It's still an issue using the 4.9 mainline kernel. Using a USB sound card makes the problems go away.

Revision history for this message
Subhrajit Prusty (subhrajit1997) wrote :

Same issue with HP Pavillion AU-111TX.

Revision history for this message
cassiodoroVicinetti (artghio) wrote :

Same issue with HP 15-au035nl.

Revision history for this message
Martin Evald (martin-evald) wrote :

Same issue with an ASUS ZenBook 3 UX390UA. I experience the issue as a volume dependent cross-talk between the channels, predominantly affecting the left channel when a medium volume sound is being played in the right channel, but to a lesser extent (lower volume of the cross-talk) affecting the right channel as well. Going by hearing the cross-talk seems to be 1-bit audio.

The common denominator seems to be the (newly supported) Realtek ALC295 driver:

http://askubuntu.com/questions/861360/crackling-sound-when-using-headphones-16-04/861715
https://forums.linuxmint.com/viewtopic.php?t=225760

Revision history for this message
humble_coffee (humblecoffee) wrote :

I don't see ALC295 appearing in any of my device descriptions anywhere. Here's my output of 'aplay --list-devices' ...

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Also, a link I posted on AskUbuntu with a bit more information:

http://askubuntu.com/questions/864608/audio-crackle-through-headphones

Revision history for this message
Egor (egormkn) wrote :

Same issue with HP Pavilion 15-au027ur on Zesty beta 1
Codec: Realtek ALC295

Revision history for this message
M Lopha (loafgoats) wrote :

This might be a kernel issue and not just a problem with Ubuntu since I've had this exact same issue on an HP Envy 13 i5 Kaby Lake running ALC295 on pretty much every distro. Back when I'd dual boot, I used to boot into Windows before booting back into Linux to fix this problem and it worked on every distro. Now I have a machine with only Linux on it can't seem to make this issue go away. Here's a list of the audio devices used.

Audio device: Intel Corporation Device 9d71 (rev 21) (prog-if 80)
 Subsystem: Hewlett-Packard Company Device 82b9
 Flags: bus master, fast devsel, latency 32, IRQ 132
 Memory at a1328000 (64-bit, non-prefetchable) [size=16K]
 Memory at a1310000 (64-bit, non-prefetchable) [size=64K]
 Capabilities: <access denied>
 Kernel driver in use: snd_hda_intel
 Kernel modules: snd_hda_intel, snd_soc_skl

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC295 Analog [ALC295 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
Paul (polalbert) wrote :

Same problem with a brand new HP OMEN 15-AX212NF, same soundcard.
I can add that the dirty saturation seems to disappear when level is lower

Revision history for this message
Dominik Tews (ddominnik) wrote :

Same issue on HP Pavilion x360 u003ng.
(Sorry for German output)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
 Subsystem: Hewlett-Packard Company Sunrise Point-LP HD Audio
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC295 Analog [ALC295 Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 7: HDMI 1 [HDMI 1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 8: HDMI 2 [HDMI 2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

Revision history for this message
Robert Joynt (robertjjoynt) wrote :

I have the same issue on an HP Omen 15 notebook (15-ax201TX). I have a duel boot setup to Ubuntu 16.10 and Windows 10. If I boot into Windows 10 first (even just to the login screen) and then restart and boot into Ubuntu 16.10 the sound is fine - no crackling.

Revision history for this message
Julien Martin (julienwcs) wrote :

Hi everyone ! Same issue here with my HP Envy 13 kaby lake running with a single Mint boot. Codec Realtek ALC295 too. If I plug my headphones on a usb audio card everything is fine.

Revision history for this message
Nate Meyers (natedaswas) wrote :

Same issue with asus zenbook 3, same audio card. In addition the built in speaker output is broken, it can only be 0% or 100%, no in between. Seemingly related.

Revision history for this message
Nate Meyers (natedaswas) wrote :

This bug has been submitted to the linux kernel bug tracker as well

https://bugzilla.kernel.org/show_bug.cgi?id=195457

Revision history for this message
Yamato Reed (mashitoreed) wrote :

I've managed to fix partially the problem or at least I can narrow it down. So , if I override all my other audio lines via hdajackretask module and only enable the headphone one, the sound is perfect. What happens though when I turn back on the line for the Internal speakers , it goes back to crackling and popping in the internal speakers and headphones. So basically this allows the user to use EITHER internal speakers OR headphones , NOT both.

Revision history for this message
Robert Joynt (robertjjoynt) wrote :

I've managed to fix this problem on my machine (HP Omen 15 running Ubuntu 17.04 using codec for Realtek ALC295 sound device). To fix the problem, I can do the following:

Install alsa-tools if not installed:

sudo apt install alsa-tools

Create and save a script in /usr/local/bin:

#!/bin/bash
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x3000

Run the script as root in a terminal to immediately fix the problem.

To run the script on startup, use cron with the @reboot command:

sudo crontab -e

and then add line in crontab:
@reboot [full path to script]

To run script on resume from suspend, copy the script to /lib/systemd/system-sleep

For more technical details regarding this fix, see https://bugzilla.kernel.org/show_bug.cgi?id=195457

Revision history for this message
cassiodoroVicinetti (artghio) wrote :

I confirm I fixed my problem thanks to robertjjoynt's suggestion!

Revision history for this message
Paul (polalbert) wrote :

Awesome !

Revision history for this message
Gabriel Caffaratti (caffarattig) wrote :

I confirm I've solved the issue in Arch distro with an HP Omen 17-w209ns thanks to Robert Joynt!!

Revision history for this message
humble_coffee (humblecoffee) wrote :

Yep fixed for me also. That's fantastic, thanks heaps Robert!!

Revision history for this message
Kushal (kushal-pandya04) wrote :

Thanks a lot Robert, your fix worked for me on HP AU113TX as well! I hope this gets fixed in upcoming kernel updates as I don't see HP fixing it from their end in case it requires vendor fix.

Revision history for this message
whatonearth (whatonearth) wrote :

Unfortunately for me this fix hasn't worked given that the subwoofer and microphone on my Pavilion 15-aw054sa do not produce/record any sound. I, of course, have an ALC295 and I'm running Mint Sonya (which is based on Ubuntu). I have made two comments on the Bugzilla entry (https://bugzilla.kernel.org/show_bug.cgi?id=195457#c9) and nothing has happened regarding the bug. I have run alsa-tools after running Robert's fix and this is the result: (https://bugzilla.kernel.org/attachment.cgi?id=257171)

Revision history for this message
Iwasanewt (iwasanewt) wrote :

Can confirm that Robert Joynt's solution worked on my HP Omen 15t X7R21AV running Kubuntu 17.04.

Revision history for this message
Celberune (celberune) wrote :

It's working ! It's working ! Great Thx to Robert Joynt's fix !
so many hours spent on this creepy sound...
Linux is a pain to configure...
And after it's magic to use.
Windows is magic to configure... and after a pain to use ;-)

Revision history for this message
Erikas (erikmnkl) wrote :

For those who wants a proper workaround using systemd - see https://wiki.archlinux.org/index.php/ASUS_Zenbook_UX430#Headphones_audio_is_too_low

Revision history for this message
Marius Nestor (marius-nestor) wrote :

I confirm Robert Joynt's fix is working on HP Pavilion x360 Convertible 13-u103nq. Thanks Erikas for the systemd workaround, but let's hope it will be fixed soon upstream, especially that there's already a patch [1] in place.

[1] https://patchwork.kernel.org/patch/9142225/

Revision history for this message
Erikas (erikmnkl) wrote :

Slight updated SYSTEMD workaround script from my previous comment (used to fail on boot). See updated at https://wiki.archlinux.org/index.php/ASUS_Zenbook_UX430#Headphones_audio_is_too_low

Revision history for this message
Wenduo Wang (wenduowang) wrote :

The solution by @robertjjoynt worked for me on 2017 HP Omen 15 with Linux Mint 18.2 with Kernel 4.10.0-27. It is MAGIC!

Revision history for this message
Paul (polalbert) wrote :

May I add that for me it's hwC1D0

You maybe should check what file exists in /dev/snd/

Revision history for this message
Erikas (erikmnkl) wrote :

Since we are talking about bash commands, shouldn't this be more elegant solution?

=============================================================
#!/bin/bash
hda-verb /dev/snd/hwC[[:print:]]*D0 0x20 SET_COEF_INDEX 0x67
hda-verb /dev/snd/hwC[[:print:]]*D0 0x20 SET_PROC_COEF 0x3000
=============================================================

Just test it yourself:

ls -l /dev/snd/hwC[[:print:]]*D0

Revision history for this message
JM (josemesnaola) wrote :

The solution by @robertjjoynt worked for me on 2017 ASUS ZenBook 3 (ux490ua) with Debian 9 with Kernel 4.9.0-4.

Revision history for this message
Adrian Casais (adriancasais) wrote :

Same problem with HP Pavilion Power 15-cb. Kernel 4.10.0-38-generic. Although @robertjjoynt workaround WORKED for me also, I think this issue should be fixed from it's root...

Revision history for this message
Théo Besnard (snarkypupil) wrote :

Hi!
First, thank's a lot to @robertjjoynt for the solution. It works also on my pc (Omen Pc by HP), however i can't find out how to run the script on start up. I think i've done a wrong thing on the crontab command. Could someone tell me the exactly things to write in the crontab script (my script name is son.sh and its directory is /usr/local/bin

Thanks a lot to the person who will answer me !

Revision history for this message
Théo Besnard (snarkypupil) wrote :

I fixed it myself. Cron wasn't running on start. I fixed it this way :
# update-rc.d cron defaults

Thanks again to @robertjjoynt

Revision history for this message
Erikas (erikmnkl) wrote :

I've updated script for systemd systems. It fixes comment #30 issue and now does not leave any error messages during boot (script issue):

https://wiki.archlinux.org/index.php/ASUS_Zenbook_UX430/UX530#Headphones_audio_is_too_low

Revision history for this message
Nate Graham (pointedstick) wrote :

The script worked for me too with an HP Spectre x360 13-w013dx.

Revision history for this message
Chris Raven (i5lic) wrote :

Whilst running ArchLinux, this bug seems to be resolved without the requirement of custom scripts, under kernel 4.15. Full details are below:

Linux UX430UA 4.15.5-1-ARCH #1 SMP PREEMPT Thu Feb 22 22:15:20 UTC 2018 x86_64 GNU/Linux
Pulseaudio 11.1

As per the update #36 by Erikas, he has updated the UX43UA and UX43UQ page for anyone running below this kernel, but I can confirm I did not apply that script on this installation, and it's working fine.

Revision history for this message
Erikas (erikmnkl) wrote :

Chris (#38) - try to put your computer to sleep and wake up while listening to something. Issue still persists, but once you plug out and plug in your headset - it returns back to normal volume as expected.

Revision history for this message
mehmet aslan (aslan-mehmet) wrote :

same issue with hp-cb007nt
Ubuntu 16.04.4 LTS
kernel 4.13.0-43-generic
solution #17 works
thanks robertjjoynt

Revision history for this message
MAI Anh Tuan (anhtuan-mai19) wrote :

the solution of @robertjjoynt doesn't work on ubuntu 18.04
my pc is HP Pavilion Power 15CB
card 0: PCH [HDA Intel PCH], device 0: ALC295 Analog [ALC295 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
Eduard Bardají Puig (aryzing) wrote :

The solution by @robertjjoynt did *not* work for me.

Also, is there a way to revert changes produced by @robertjjoynt? Not that it's any different now, but don't want to mess around with settings if it doesn't fix the issue.

OS: Ubuntu 18.04
System: HP Elitebook 830 G5

tags: added: bionic
removed: yakkety
Revision history for this message
James Adams (jrhadams) wrote :

I can confirm that @robertjjoynt's comment works very well on my HP ProBook 650 G1 pc which is currently operating ubuntu 18.04 (long card name: "HDA Intel HDMI at 0xd0730000 irq 33).

I should say that the sound still clips every so often, but I can finally listen to Smashmouth in peace while working.

Revision history for this message
jkelol111 [Nam] (jkelol111) wrote :

I can confirm that this issue is still present in Ubuntu 19.10 and 20.04, as well as Fedora 31. Erikas' suggestion works very well to fix this issue too. I have the same outcome as James Adams above. My laptop is the HP Pavilion x360 Convertible 14-ba0xx.

Revision history for this message
Rustin Schenk (rmschenk1) wrote :

I also still have a crackling sound in the left channel when I plug in a pair of headphones using an hp laptop. I had this with 19.04,19.10 and now still with 20.04. Would be nice if it could be fixed. The solution by Robert Joynt does fix the problem, but it is a work around. Would be nice if the real problem could be fixed in the distro.

Revision history for this message
jkelol111 [Nam] (jkelol111) wrote :

Checking in on Fedora 32 again, still the same issue as every other Ubuntu (and its flavours and spins)/Fedora versions I have tried. The kernel is 'Linux brokenhingelaptop 5.6.8-300.fc32.x86_64 #1 SMP Wed Apr 29 19:01:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux' according to 'uname -a' on Fedora 32.

Revision history for this message
Anibal Sanchez (anibal-sanchez) wrote :

Same issue on Ubuntu 20.04 LTS and HP Omen 15-AX204NS

Still now #17 works OK.

Thanks!

Revision history for this message
animesh garg (animeshgarg) wrote :

same issue on hp pavillion au620tx
# 17 works

Revision history for this message
Antonio Ferraro (anfe67) wrote :

As of today I have the same problem (which I had solved with #17). #17 does no longer seem to work.
My laptop is a HP pavilion 14-ce3035nl, linux version ubuntu 20.04 (focal), with all updates.
I have a dual boot, the sound in Windows works fine.

Changed in alsa-driver (Ubuntu):
status: Confirmed → New
Revision history for this message
Tanguy (tanguy-salmon) wrote :

Same issue here on HP Pavilion Gaming Laptop 15-cx0xxx
5.8.6-1-MANJARO x86_64

With low quality earphone, don't have crackling
With high quality earphone, have crackling in left side
This high quality earphone doesn't have any crackling on other devices.

Robertjjoynt's solution fixed the problem.

Thanks.

Revision history for this message
Robert Joynt (robertjjoynt) wrote :

Hi Folks. I've found another issue with the Realtek ALC295 codec in Linux and I have a fix for this too (see #17 in this thread for my initial fix).

When I boot into Windows first and then into Linux, there are two problems:

1. The internal speakers don't work (headphones are okay).
2. The internal microphone doesn't respond.

To fix the problem, I can do the following:

Install alsa-tools if not installed:

sudo apt install alsa-tools

Create and save a script in /usr/local/bin:

#!/bin/bash
# Fix for no sound from internal speakers when rebooting from Windows
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x10
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x0120
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0d
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0xa023
# Fix for no mic and headphone jack switching when rebooting from Windows
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x45
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x5289
hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x46
hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x0004

Run the script as root in a terminal to immediately fix the problem.

To run the script on startup, use cron with the @reboot command:

sudo crontab -e

and then add line in crontab:
@reboot [full path to script]

(note that I put this cron entry before my initial fix, but I don't think it matters).

Please note that the script doesn't need to be copied or linked to /lib/systemd/system-sleep as the fix persists after a suspend/wake.

For more technical details regarding this fix, see https://bugzilla.kernel.org/show_bug.cgi?id=195457

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

Mr Robert Joynt,

I am on Ubuntu 20.10, on OMEN-by-HP-Laptop-15-dc1xxx with this Realtek ALC295

I get sound, from head phone , loud and clear, if i plug in the headphone jack, sound switches from speaker to headphone, and vice versa.

But if remove the headphone , then the sound from the speaker like low or mono in nature? will the above fix work?

Please advise?

Revision history for this message
Dan Habot (danhab99) wrote :

I tried to run this script (https://wiki.archlinux.org/index.php/ASUS_Zenbook_UX430/UX530#Headphones_audio_is_too_low) and it did nothing. I'm experiencing the same issue with quality headphones but it's on both channels. I created a detailed bug report here before I found this thread https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1908634 . Any advice?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.