Bug 1572975 - Aggressive HDA power saving causes loud pops
Summary: Aggressive HDA power saving causes loud pops
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-29 11:46 UTC by James
Modified: 2018-05-23 12:53 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-23 12:53:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
lspci -nn output requested (10.10 KB, text/plain)
2018-04-29 19:44 UTC, James
no flags Details
alsa-info.sh output (44.04 KB, text/plain)
2018-05-04 19:49 UTC, James
no flags Details

Description James 2018-04-29 11:46:34 UTC
Description of problem:
Since upgrading to kernel-4.16.4-300.fc28.x86_64 I've got a lot of 'pops' from my all-in-one's speakers both when the card powers down, and very loud when it switches back on again.

Worked around at the moment with 'options snd-hda-intel power_save=0', but probably should be blacklisted.

Version-Release number of selected component (if applicable):
kernel-4.16.4-300.fc28.x86_64

How reproducible:
Consistently.

Steps to Reproduce:
1. Log in.
2. Wait a few seconds for card to power down.
3. Adjust volume.

Actual results:
Loud pop.

Expected results:
No pop.

Additional info:

[    0.000000] efi: EFI v2.40 by American Megatrends
[    0.000000] efi:  ACPI=0x9c761000  ACPI 2.0=0x9c761000  SMBIOS=0x9cec5f98 
[    0.000000] secureboot: Secure boot enabled
[    0.000000] Kernel is locked down from EFI secure boot; see man kernel_lockdown.7
[    0.000000] SMBIOS 2.8 present.
[    0.000000] DMI: LENOVO F0B100CLUK/CRESCENTBAY, BIOS O1XKT13AUS 10/28/2016

[    6.726935] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC282: line_outs=1 (0x1b/0x0/0x0/0x0/0x0) type:speaker
[    6.726939] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    6.726942] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    6.726943] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    6.726944] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    6.726946] snd_hda_codec_realtek hdaudioC1D0:      Mic=0x18
[    6.726948] snd_hda_codec_realtek hdaudioC1D0:      Internal Mic=0x12

Comment 1 Hans de Goede 2018-04-29 18:25:12 UTC
Thank you for the bug report.

You're right that for now we need to add a quirk for your all-in-1 model, there already is some infrastructure for this in the kernel.

To add a quirk I will need some info from your machine, please run:

lspci -nn -v > lspci.log

And attach the generated lspci.log file here.

Comment 2 James 2018-04-29 19:44:23 UTC
Created attachment 1428544 [details]
lspci -nn output requested

Comment 3 Hans de Goede 2018-05-03 07:55:29 UTC
(In reply to James from comment #2)
> Created attachment 1428544 [details]
> lspci -nn output requested

Thank you, I'm currently on vacation. I will prepare a test-kernel with a patch adding a quirk for your hardware next week.

The upstream Intel HD Audio driver maintainers would like some more info to be gathered on quirked models, so that they can hopefully eventually fix things in a better way. Can you please run alsa-info.sh, let it save the gathered info locally and then attach that here?

Comment 4 James 2018-05-04 19:49:36 UTC
Created attachment 1431576 [details]
alsa-info.sh output

alsa-info.sh output attached as requested.

Comment 5 Hans de Goede 2018-05-07 15:01:08 UTC
Thanks, I've just started a scratch-build of the F28 kernel with a patch added adding a quirk for your device. With this build the pops should be gone without needing a kernel cmdline argument.

The test-kernel is currently building here (this takes a couple of hours):
https://koji.fedoraproject.org/koji/taskinfo?taskID=26837978

Here are instructions for installing and testing a test-kernel from koji:
https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

Please let me know if this fixes things, then I can submit the patch adding the quirk to the official Linux kernel.

Comment 6 James 2018-05-07 16:20:00 UTC
The test build from Comment 5 fixes the popping. Thanks!

Comment 7 Hans de Goede 2018-05-13 07:18:18 UTC
James,

Upstream is asking if you can first check for another solution which allows keeping power-management enabled, quoting their email:

"Before adding to blacklist, could you try some usual suspects?
For Lenovo, you can try at first to pass
  model=,tpt440
to snd-hda-intel module.

(the first comma is no typo but to pass the model name to the second
 controller for Realtek.)

The above will add some bogus dock jacks, so it's no solution but to
just to test whether it avoids the clicking noise."

So can you try adding:

"snd_hda_intel.model=,tpt440"

To the kernel commandline (of a kernel which has the plops) and see if that fixes things ?

After rebootting do:

cat /sys/module/snd_hda_intel/parameters/model

And check that the second entry now is "tpt440" instead of (null) to make sure the adding to the kernel commandline went right.

Regards,

Hans

Comment 8 James 2018-05-13 11:19:55 UTC
Still hear loud pops with 4.16.7-300.fc28.x86_64 using snd_hda_intel.model=,tpt440 (confirmed enabled in sysfs).

I think in some sense this is just 'poppy' hardware -- it's always emitted a pop (though not as loud as these) when the sound card is initialised, even under Windows.

Comment 9 Hans de Goede 2018-05-23 12:53:56 UTC
Ok, upstream has accepted the patch now, this will be in the 4.17.x kernels once the reach Fedora.

In the mean time you can keep using the kernel commandline option.


Note You need to log in before you can comment on or make changes to this bug.