Bug 1660581

Summary: Audio noise on headphone jack
Product: [Fedora] Fedora Reporter: Marty Wesley <mwesley>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: aday, airlied, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jcline, jglisse, john.j5live, jonathan, josef, kernel-maint, linville, mattdm, mchehab, mjg59, pbrobinson, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-21 13:21:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
alsa-info.sh output none

Description Marty Wesley 2018-12-18 17:16:16 UTC
Following on bugzilla #1648448. There's a constant background "hum/whitenoise" in the headset. The tone and level change whenever something changes on the LCD screen (window resize, GNOME expose, click/drag a window around the screen). Muting the headset using Fn+F1 makes the "hum/whitenoise" go away. Unmuting the headset brings the noise back.

Additionally, the indicator lights for the microphone and speaker (LED on F1 and F4) do not turn on/off as they have in previous kernels.

A similar problem is reported here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1805079/comments/8

Kernel 4.19.8-200.fc28.x86_64

Steps to Reproduce:
1. Boot
2. Plug in headset, hear hum/whitenoise
3. Press Fn+F1 (mute). Hear hum/whitenoise go away.
4. Press Fn+F1 (unmute). Hear hum/whitenoise return.

Comment 1 Justin M. Forbes 2019-01-29 16:26:41 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There are a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs.

Fedora 28 has now been rebased to 4.20.5-100.fc28.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 29, and are still experiencing this issue, please change the version to Fedora 29.

If you experience different issues, please open a new bug report for those.

Comment 2 Marty Wesley 2019-01-29 16:59:28 UTC
Tested with 4.20.4-100.fc28.x86_64:

The indicator lights work now, but the constant "hum/whitenoise" in the headset remains, as does the change in tone and level when something changes on the LCD. It's like there's cross-talk from the LCD panel into the headphone jack.

Muting the headphones makes the background noise and the cross-talk effect of the LCD go away.

Comment 3 Matthew Miller 2019-02-13 17:59:14 UTC
I'm seeing something similar, although the noise seems to correspond to system activity not necessarily LCD changes. X1 Carbon 6th gen.

For me, running

  sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0

makes it stop. Marty, does this match your experience?

Comment 4 Jeremy Cline 2019-02-13 19:02:26 UTC
There's a proposed patch on https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1805079 which never got sent upstream. One person seemed to test it and mentioned that a "quiet sound" remained, but that it fixed one of the sound issues. I've started a scratch build with that patch on top of v4.20.8[0]. If you could test that when it's done, that would be helpful. It's not doing the equivalent of "sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0" so I'm curious where the patch came from, there's not much context and I'm not an HDA wizard so I'll need to do more research.

Additionally, I started a separate build[1] that doesn't include the proposed patch from the Ubuntu bug, but just does the equivalent of "sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0" for that laptop (assuming I didn't mess it up). Testing that would also be helpful. Thanks!

[0] https://koji.fedoraproject.org/koji/taskinfo?taskID=32791611
[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=32791933

Comment 5 Hans de Goede 2019-02-13 19:28:54 UTC
Hi all,

For issues like this (HDA sound issues), especially when there is a possible fix / workaround know, it is always a good idea to send an email to Takashi Iwai <tiwai> who is the upstream HDA maintainer and in general the goto person for HDA sound issues.

Before you do this though, please run alsa-info.sh and attach the file it generates here and include a link to this bug-report in your mail to Takashi, as I know he is likely going to want to have alsa-info.sh output.

Regards,

Hans

Comment 6 Marty Wesley 2019-02-13 20:40:33 UTC
(In reply to Matthew Miller from comment #3)
> I'm seeing something similar, although the noise seems to correspond to
> system activity not necessarily LCD changes. X1 Carbon 6th gen.
> 
> For me, running
> 
>   sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0
> 
> makes it stop. Marty, does this match your experience?

Yes. This exactly matches my experience. I found this same command on one of the forums/bug reports and have been running it every time I boot or wake from sleep to make the background noise go away.

Attached alsa-info.sh output.

Comment 7 Marty Wesley 2019-02-13 20:41:26 UTC
Created attachment 1534564 [details]
alsa-info.sh output

Comment 8 Peter Robinson 2019-02-24 09:47:55 UTC
Looks like a fix for this has landed upstream now (will be 5.0, tagged for stable):

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8c6ee611926685a7d753409e0a6e48b9e1b8748

    ALSA: hda/realtek: Disable PC beep in passthrough on alc285
    
    It is reported that there's a constant background "hum/whitenoise"
    in the headset on the Lenovo X1 machines with the codec alc285, and it
    is confirmed that if we run the command below, the noise will stop.
     sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0
    
    Then I consulted this issue with Kailang, he told me the pin 0x1d on
    this codec is used for PC beep in, the noise probably comes from this
    pin and we can also disable the PC beep in passthrough, then the PC
    beep in will not affect other sound playback.
    
    Fixes: c4cfcf6f4297 ("ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops")
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1660581
    Cc: <stable.org>
    Signed-off-by: Kailang Yang <kailang>
    Signed-off-by: Hui Wang <hui.wang>
    Signed-off-by: Takashi Iwai <tiwai>

Comment 9 Justin M. Forbes 2019-08-20 17:44:33 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There are a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 29 kernel bugs.

Fedora 29 has now been rebased to 5.2.9-100.fc29.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 30, and are still experiencing this issue, please change the version to Fedora 30.

If you experience different issues, please open a new bug report for those.

Comment 10 Marty Wesley 2019-08-21 13:21:57 UTC
This appears to be fixed with the latest Fedora kernel 5.2.9-200.fc30.x86_64