Pop sound from build-in speaker during cold boot and resume from S3

Bug #1866357 reported by David Chen on 2020-03-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned
Focal
Medium
Unassigned

Bug Description

[Description]
On a Dell Wyse 5070 ThinClient device with 18.04 installed, during cold boot and resume from S3, internal speaker will have a noticeable short pop noise.

[More detail]
There are similar bugs reported indicating it's related to codec powersaving [1]. On some devices, disable powersaving can workaround it, but the same workaround does not work on this device.
[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1821663

[Experiment]
With Ubuntu 16.04 (4.13 kernel) installed --> NO pop noise
With Ubuntu 16.04.x (4.15 kernel) installed --> pop noise
With Ubuntu 18.04.x (4.15, 5.0 kernel) installed --> pop noise
So I started testing kernels between 4.13 and 4.15, found the issue does not present before 4.15.0-58 kernel (including 4.15.0-58), and kernel after that started to have the pop noise.

[HW info]
Codec: Realtek ALC3253
00:0e.0 Audio device [0403]: Intel Corporation Device [8086:3198] (rev 03)

Device is not with me at this moment, I will provide more info if required.
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 1901 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-bionic-amd64-20180608-47+beaver-osp1-sanbernardino+X100
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2020-03-09 (0 days ago)
InstallationMedia: Ubuntu 18.04 "Bionic" - Build amd64 LIVE Binary 20180608-09:38
MachineType: Dell Inc. Wyse 5070 Thin Client
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.3.0-40-generic root=UUID=22fa172b-895b-4061-834e-d616380befc5 ro mem_sleep_default=deep quiet splash vt.handoff=1
ProcVersionSignature: Ubuntu 5.3.0-40.32~18.04.1-generic 5.3.18
RelatedPackageVersions:
 linux-restricted-modules-5.3.0-40-generic N/A
 linux-backports-modules-5.3.0-40-generic N/A
 linux-firmware 1.173.9
Tags: bionic
Uname: Linux 5.3.0-40-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 01/08/2020
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.5.0
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.5.0:bd01/08/2020:svnDellInc.:pnWyse5070ThinClient:pvr:rvnDellInc.:rn:rvr:cvnDellInc.:ct3:cvr:
dmi.product.family: Wyse Thin Client 5000 Series
dmi.product.name: Wyse 5070 Thin Client
dmi.product.sku: 080C
dmi.sys.vendor: Dell Inc.

CVE References

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1866357

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Kai-Heng Feng (kaihengfeng) wrote :

The better way to handle this is to ask Realtek to implement correct depop function in the codec driver.

apport information

tags: added: apport-collected bionic
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Kai-Heng Feng (kaihengfeng) wrote :
David Chen (david.chen) wrote :

I can still reproduce this issue with kernel mentioned in comment#17.

Kai-Heng Feng (kaihengfeng) wrote :

Would it be possible for you to do a kernel bisection?

First, find the last -rc kernel works and the first -rc kernel doesn’t work from http://kernel.ubuntu.com/~kernel-ppa/mainline/

Then,
$ sudo apt build-dep linux
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git bisect start
$ git bisect good $(the working version you found)
$ git bisect bad $(the non-working version found)
$ make localmodconfig
$ make -j`nproc` deb-pkg
Install the newly built kernel, then reboot with it.
If it still have the same issue,
$ git bisect bad
Otherwise,
$ git bisect good
Repeat to "make -j`nproc` deb-pkg" until you find the offending commit.

David Chen (david.chen) wrote :

Currently I only have info for ubuntu kernel, the issue does not present before 4.15.0-58 kernel (including 4.15.0-58), and kernel after that started to have the pop noise. I have done some investigation, found the commit below, could you please help to check if this is one of the many differences between good and bad kernels that I mentioned?
https://lore.kernel.org/patchwork/patch/1098499/

I will see if I can find a better machine to try your steps.
Thanks!

Kai-Heng Feng (kaihengfeng) wrote :

In addition to that commit,
ALSA: hda/realtek - Set default power save node to 0
ALSA: hda/realtek - EAPD turn on later
ALSA: hda - Record the current power state before suspend/resume calls

Also affect PM operations on the codec.
I think a proper kernel bisection will make us more sure what introduced the regression.

David Chen (david.chen) wrote :

Tested 4.16, 4.17, 4.18, and finally narrowed down to 4.19.49 mainline kernel is the first one having this issue.

Kai-Heng Feng (kaihengfeng) wrote :

That implies 4.19.48 is good?

David Chen (david.chen) wrote :

Yes.

David Chen (david.chen) wrote :

No pop sound with this kernel! I will test more.
Did you identify the suspicious commit?
Thanks!

Kai-Heng Feng (kaihengfeng) wrote :

$ git --no-pager log --pretty=oneline v4.19.48..v4.19.49 sound 3834630ef4d33f2a372e01dadeb6980761259a90 ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops
9cfd6c36759b1e54c2bbf36f1d03b4e1bbc61d7e ALSA: hda/realtek - Set default power save node to 0
eb2eeec920fb1b9b6faf8ea340f6295a2d03602b ALSA: line6: Assure canceling delayed work at disconnection

So apparently it's "ALSA: hda/realtek - Set default power save node to 0"

I'll send the fix patch soon.

David Chen (david.chen) wrote :

@Kai-Heng,
Could you also check if this is the same commit causing Ubuntu 4.15.0-59 kernel to have this issue?

Kai-Heng Feng (kaihengfeng) wrote :

Should be, it starts to appear since Ubuntu-4.15.0-59.66.

David Chen (david.chen) wrote :

@Kai-Heng, do you know if this patch will be landed in older Ubuntu kernel (4.15) as well?
Thanks.

Kai-Heng Feng (kaihengfeng) wrote :

Should be picked up by later Stable update.

Stefan Bader (smb) on 2020-04-03
Changed in linux (Ubuntu Focal):
status: Confirmed → Fix Committed
importance: Undecided → Medium

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
David Chen (david.chen) wrote :

I have enabled proposed and installed latest oem kernel 5.0 in proposed, still can reproduce this issue. Could you let me know which kernel version should I test?

David Chen (david.chen) on 2020-04-14
tags: added: verification-failed-bionic
removed: verification-needed-bionic
Hao-Sheng Lu (haosheng.lu) wrote :

Using 5.0.0-1048-oem-osp1, still can hear the pop sound.

Launchpad Janitor (janitor) wrote :
Download full text (35.2 KiB)

This bug was fixed in the package linux - 5.4.0-24.28

---------------
linux (5.4.0-24.28) focal; urgency=medium

  * focal/linux: 5.4.0-24.28 -proposed tracker (LP: #1871939)

  * getitimer returns it_value=0 erroneously (LP: #1349028)
    - [Config] CONTEXT_TRACKING_FORCE policy should be unset

  * 12d1:1038 Dual-Role OTG device on non-HNP port - unable to enumerate USB
    device on port 1 (LP: #1047527)
    - [Config] USB_OTG_FSM policy not needed

  * Add DCPD backlight support for HP CML system (LP: #1871589)
    - SAUCE: drm/i915: Force DPCD backlight mode for HP CML 2020 system

  * Backlight brightness cannot be adjusted using keys (LP: #1860303)
    - SAUCE drm/i915: Force DPCD backlight mode for HP Spectre x360 Convertible
      13t-aw100

  * CVE-2020-11494
    - slcan: Don't transmit uninitialized stack data in padding

  * Ubuntu Kernel Support for OpenPOWER NV Secure & Trusted Boot (LP: #1866909)
    - powerpc: Detect the secure boot mode of the system
    - powerpc/ima: Add support to initialize ima policy rules
    - powerpc: Detect the trusted boot state of the system
    - powerpc/ima: Define trusted boot policy
    - ima: Make process_buffer_measurement() generic
    - certs: Add wrapper function to check blacklisted binary hash
    - ima: Check against blacklisted hashes for files with modsig
    - powerpc/ima: Update ima arch policy to check for blacklist
    - powerpc/ima: Indicate kernel modules appended signatures are enforced
    - powerpc/powernv: Add OPAL API interface to access secure variable
    - powerpc: expose secure variables to userspace via sysfs
    - x86/efi: move common keyring handler functions to new file
    - powerpc: Load firmware trusted keys/hashes into kernel keyring
    - x86/efi: remove unused variables

  * [roce-0227]sync mainline kernel 5.6rc3 roce patchset into ubuntu HWE kernel
    branch (LP: #1864950)
    - RDMA/hns: Cleanups of magic numbers
    - RDMA/hns: Optimize eqe buffer allocation flow
    - RDMA/hns: Add the workqueue framework for flush cqe handler
    - RDMA/hns: Delayed flush cqe process with workqueue
    - RDMA/hns: fix spelling mistake: "attatch" -> "attach"
    - RDMA/hns: Initialize all fields of doorbells to zero
    - RDMA/hns: Treat revision HIP08_A as a special case
    - RDMA/hns: Use flush framework for the case in aeq
    - RDMA/hns: Stop doorbell update while qp state error
    - RDMA/hns: Optimize qp destroy flow
    - RDMA/hns: Optimize qp context create and destroy flow
    - RDMA/hns: Optimize qp number assign flow
    - RDMA/hns: Optimize qp buffer allocation flow
    - RDMA/hns: Optimize qp param setup flow
    - RDMA/hns: Optimize kernel qp wrid allocation flow
    - RDMA/hns: Optimize qp doorbell allocation flow
    - RDMA/hns: Check if depth of qp is 0 before configure

  * [hns3-0316]sync mainline kernel 5.6rc4 hns3 patchset into ubuntu HWE kernel
    branch (LP: #1867586)
    - net: hns3: modify an unsuitable print when setting unknown duplex to fibre
    - net: hns3: add enabled TC numbers and DWRR weight info in debugfs
    - net: hns3: add support for dump MAC ID and loopback status in debugfs
    - net: hns3: add missing help info for QS shaper...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-eoan
Hui Wang (hui.wang) wrote :

This fix introduced a regression on a couple of machines (so far, only one of them is confirmed, but I guess the other will be confirmed soon):

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1875916
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1875985

@Kaiheng,

Could you please take a look at those bugs?

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Timo Aaltonen (tjaalton) wrote :

this is supposed to be fixed in focal by a stable tree commit

tags: added: verification-done-focal
removed: verification-needed-focal

All autopkgtests for the newly accepted linux-oracle-5.4 (5.4.0-1019.19~18.04.1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

zfs-linux/unknown (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#linux-oracle-5.4

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

All autopkgtests for the newly accepted linux-hwe-5.0 (5.0.0-57.61~18.04.1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

linux-hwe-5.0/5.0.0-57.61~18.04.1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#linux-hwe-5.0

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

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

Other bug subscribers