[82A1, Realtek ALC287, Speaker, Internal] Underruns, dropouts or crackling sound

Bug #1925057 reported by Gluttton
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Hello,

I'm using Ubuntu together with Windows on my laptop.

If I boot in Ubuntu after Windows sound doesn't work well (instead of system sounds I can hear only shot noise). To fix the issue I need to completely shut down the system (call Power Off via Ubuntu GUI) and then boot again in Ubuntu. Please note, that reboot (called via Ubuntu GUI) doesn't help to fix the issue.

Expected result: sound works well regardless of boot history.
Actual result: every time I boot in Ubuntu after Windows sound doesn't work.

Issue occurrence: 100%.

Environment:
$ lsb_release -rd
Description: Ubuntu Hirsute Hippo (development branch)
Release: 21.04
$ uname -a
Linux tiptop 5.11.0-16-generic #17-Ubuntu SMP Wed Apr 14 20:12:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Thank you in advance!

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: alsa-base 1.0.25+dfsg-0ubuntu7
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Uname: Linux 5.11.0-16-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: gluttton 1640 F.... pulseaudio
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 19 19:37:56 2021
InstallationDate: Installed on 2021-03-06 (43 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:sofhdadsp failed
Symptom_Card: Smart Sound Technology Audio Controller - sof-hda-dsp
Symptom_Jack: Speaker, Internal
Symptom_PulseAudioLog:
 кві 19 19:37:21 tiptop pulseaudio[958]: After module unload, module 'module-null-sink' was still loaded!
 кві 19 19:37:21 tiptop systemd[944]: pulseaudio.service: Succeeded.
 кві 19 19:37:40 tiptop systemd[944]: pulseaudio.service: Succeeded.
 кві 19 19:37:50 tiptop systemd[944]: pulseaudio.socket: Succeeded.
Symptom_Type: Underruns, dropouts, or "crackling" sound
Title: [82A1, Realtek ALC287, Speaker, Internal] Underruns, dropouts or crackling sound
UpgradeStatus: Upgraded to hirsute on 2021-03-06 (43 days ago)
dmi.bios.date: 01/14/2021
dmi.bios.release: 1.31
dmi.bios.vendor: LENOVO
dmi.bios.version: DHCN31WW
dmi.board.asset.tag: ���������������
dmi.board.name: LNVNB161216
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40688 WIN
dmi.chassis.asset.tag: ���������������
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Yoga Slim 7 14IIL05
dmi.ec.firmware.release: 1.29
dmi.modalias: dmi:bvnLENOVO:bvrDHCN31WW:bd01/14/2021:br1.31:efr1.29:svnLENOVO:pn82A1:pvrYogaSlim714IIL05:rvnLENOVO:rnLNVNB161216:rvrSDK0J40688WIN:cvnLENOVO:ct10:cvrYogaSlim714IIL05:
dmi.product.family: Yoga Slim 7 14IIL05
dmi.product.name: 82A1
dmi.product.sku: LENOVO_MT_82A1_BU_idea_FM_Yoga Slim 7 14IIL05
dmi.product.version: Yoga Slim 7 14IIL05
dmi.sys.vendor: LENOVO

Revision history for this message
Gluttton (gluttton) wrote :
Revision history for this message
Hui Wang (hui.wang) wrote :

when problems happens, please run:
$sudo sh -c 'echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef'
Then run alsa-info to collect an alsa-info.txt (bad)

Then poweroff the machine and poweron it, make sure the audio works normally, run:
$sudo sh -c 'echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef'
Then run alsa-info to collect an alsa-info.txt (good)

and upload the alsa-info.txt-bad and alsa-info.txt-good, let us compare them.

Revision history for this message
Gluttton (gluttton) wrote :

Please find the requested output attached.

Revision history for this message
Gluttton (gluttton) wrote :
Revision history for this message
Gluttton (gluttton) wrote :
Revision history for this message
Hui Wang (hui.wang) wrote :

When problem happens, please run each group of SET_COEF_INDEX and SET_PROC_COEF, then test if the audio changes normal or not:
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x78
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x003e
// test if audio changes normal or not
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x77
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x0015
// test if audio changes normal or not
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0xf000
//...
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x3b
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x60d9

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x33
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x8580

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x1b
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x0a6b

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x1a
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x8003

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0f
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x02a2

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0e
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x65c0

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x08
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x4ab7

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x06
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x6115

Revision history for this message
Gluttton (gluttton) wrote :

Please, see below testing results.

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x78
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x003e
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x77
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x0015
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x67
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0xf000
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x3b
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x60d9
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x33
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x8580
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x1b
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x0a6b
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x1a
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x8003
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0f
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x02a2
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0e
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x65c0
// bad
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x08
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x4ab7
// good, at this line sound works well and lines below are not necessary
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x06
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x6115

Revision history for this message
Hui Wang (hui.wang) wrote :

So if only run below commands, does the audio become good or not?
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x08
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x4ab7

Or could you do a test to find the minimal group of commands to make the audio change normal?

Revision history for this message
Gluttton (gluttton) wrote :

> So if only run below commands, does the audio become good or not?

Yes, I confirm that the following lines are enough to make audio good:

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x08
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x4ab7

Revision history for this message
Hui Wang (hui.wang) wrote :

OK, thanks, let me ask for help from realtek side to explain the #9.

thx.

Revision history for this message
Hui Wang (hui.wang) wrote :

Please install this testing kernel and test it. thx.

https://people.canonical.com/~hwang4/lp1925057/

Download all deb, sudo apt install *.deb

Hui Wang (hui.wang)
affects: alsa-driver (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Low
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

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 1925057

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
Revision history for this message
Hui Wang (hui.wang) wrote :

Sent the fix to upstream: https://mailman.alsa-project.org/pipermail/alsa-devel/2021-May/184310.html

the patch is cced to stable kernel, so all ubuntu kernel will merge this patch once this patch is merged to stable kernel.

So close this bug.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

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
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

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
Hui Wang (hui.wang)
tags: added: verification-done-bionic verification-done-focal
removed: verification-needed-bionic verification-needed-focal
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

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-hirsute' to 'verification-done-hirsute'. If the problem still exists, change the tag 'verification-needed-hirsute' to 'verification-failed-hirsute'.

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-hirsute
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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