Sound device not detected after resume from hibernate

Bug #1826868 reported by Rob Aldridge
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Bionic
Fix Released
Low
Unassigned
Cosmic
Fix Committed
Medium
Unassigned
Disco
Fix Released
Medium
Unassigned
linux-oem (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned

Bug Description

The patch is already in the v5.2-rc1, so don't send the patch
to unstable.

In the V2, I added 3 more patches. The 0001-xxx.patch is for fixing
the issue of "audio doesn't work after s3/s4 on cln and glk machines",
but it introduces a new issue of "screen flickering when CDCLK changes",
So I added 0002/3/4-xxx.patch to fix the new issue.

[Impact]
After s3 or s4, the hdmi audio driver will re-probe the hw, if the hdmi
monitor is not plugged before s3 or s4, the re-probe will fail on cnl
and glk machines.

[Fix]
Keep the cdclk alive when re-probing

[Test Case]
I applied the patches to bionic kernel and disco kernel, and tested them
on Whiskeylake, cannonlake, kabylake, skylake and geminilake
machines, before s3, I verified analogue audio, hdmi audio and screen
dispaly all worked well, then let the system enter s3 and resume, recheck
the analogue audio, hdmi audio and screen display, all worked well too.
And repeated the test 5 times.

[Regression Risk]
Low. I have tested the patched kernel on different Dell and Lenovo machines,
they include Whiskeylake, cannonlake, kabylake, skylake and geminilake.

dmesg -w shows the following:

snd_hda_codec_realtek hdaudioC0D0: out of range cmd 0:20:400:ffffffff snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: linux-image-5.0.0-13-generic 5.0.0-13.14
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
Uname: Linux 5.0.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: rob 1551 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 29 21:22:18 2019
InstallationDate: Installed on 2019-04-24 (4 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 003: ID 05c8:022a Cheng Uei Precision Industry Co., Ltd (Foxlink)
 Bus 001 Device 002: ID 0bda:b00b Realtek Semiconductor Corp.
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: HP HP Stream x360 Convertible 11-ag1XX
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.0.0-13-generic root=UUID=e0182eac-9bb3-45c5-b4e9-3b21715dbc95 ro quiet splash vt.handoff=1
RelatedPackageVersions:
 linux-restricted-modules-5.0.0-13-generic N/A
 linux-backports-modules-5.0.0-13-generic N/A
 linux-firmware 1.178
SourcePackage: linux
StagingDrivers: r8822be
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/22/2018
dmi.bios.vendor: Insyde
dmi.bios.version: F.10
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: 8501
dmi.board.vendor: HP
dmi.board.version: 05.21
dmi.chassis.asset.tag: Chassis Asset Tag
dmi.chassis.type: 31
dmi.chassis.vendor: HP
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsyde:bvrF.10:bd05/22/2018:svnHP:pnHPStreamx360Convertible11-ag1XX:pvrType1ProductConfigId:rvnHP:rn8501:rvr05.21:cvnHP:ct31:cvrChassisVersion:
dmi.product.family: 103C_5335KV HP Notebook
dmi.product.name: HP Stream x360 Convertible 11-ag1XX
dmi.product.sku: 4RV86PA#ABG
dmi.product.version: Type1ProductConfigId
dmi.sys.vendor: HP

Revision history for this message
Rob Aldridge (roba100) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Hui Wang (hui.wang) wrote :

Please take a try:

edit the /etc/modprobe.d/alsa-base.conf, add "options snd-hda-intel probe_mask=1"
reboot
then test if suspend/resume still crash your audio

To restore the original state, remove that line from alsa-base.conf then reboot.

Revision history for this message
Rob Aldridge (roba100) wrote :

Hi Hui,

Your suggestion worked, thank you so much.

I will do some more testing over the next few days and get back to you.

Thanks,
Rob

Revision history for this message
kdanilov (kdanilov) wrote :

same on dell precision 7740

Revision history for this message
schneo (metadirective) wrote :

Same on "Teclast F7 Plus" with Ubuntu 19.04
#3 worked perfectly, thanks! :)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Similar to #1829621? Please test the kernel in the bug.

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

I backported a i915 patch, let us see if it can fix this problem on glk machines, please test this kernel:

https://drive.google.com/drive/folders/1K7OrvkUTiub7vRaicen6smXR6TiDdBTM?usp=sharing

sudo dpkg -i linux-modules-xxxx.deb
sudo dpkg -i linux-image-unsigned-xxx.deb
sudo dpkg -i linux-modules-extra-xxx.deb

reboot and choose this new installed kernel to boo. redo the test.

thx.

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

supplement for #8, don't forget to remove the module para in the #3 before testing the #8

Revision history for this message
Rob Aldridge (roba100) wrote :

Hi Hui,

I can confirm that the new kernel fixes the issue. And yes I did remove the extra parameter from the alsa-base.conf.

Thanks for your efforts.

Cheers,
Rob

Hui Wang (hui.wang)
description: updated
Hui Wang (hui.wang)
description: updated
AceLan Kao (acelankao)
Changed in linux-oem (Ubuntu):
status: New → Invalid
Changed in linux-oem (Ubuntu Bionic):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem - 4.15.0-1043.48

---------------
linux-oem (4.15.0-1043.48) bionic; urgency=medium

  [ Ubuntu: 4.15.0-52.56 ]

  * Remote denial of service (resource exhaustion) caused by TCP SACK scoreboard
    manipulation (LP: #1831638)
    - SAUCE: tcp: tcp_fragment() should apply sane memory limits
  * Remote denial of service (system crash) caused by integer overflow in TCP
    SACK handling (LP: #1831637)
    - SAUCE: tcp: limit payload size of sacked skbs

 -- Stefan Bader <email address hidden> Fri, 14 Jun 2019 10:39:16 +0200

Changed in linux-oem (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in linux-oem (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

this is added to linux-oem-osp1 in bionic-proposed, please test

tags: added: verification-needed-bionic
Hui Wang (hui.wang)
tags: added: verification-done-bionic
removed: verification-needed-bionic
Stefan Bader (smb)
Changed in linux-oem (Ubuntu Cosmic):
status: New → Invalid
Changed in linux-oem (Ubuntu Disco):
status: New → Invalid
Stefan Bader (smb)
Changed in linux (Ubuntu Cosmic):
importance: Undecided → Medium
Changed in linux (Ubuntu Disco):
importance: Undecided → Medium
Changed in linux (Ubuntu Bionic):
importance: Undecided → Low
Changed in linux (Ubuntu Bionic):
status: New → Fix Committed
Changed in linux (Ubuntu Cosmic):
status: New → Fix Committed
Changed in linux (Ubuntu Disco):
status: New → Fix Committed
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-disco' to 'verification-done-disco'. If the problem still exists, change the tag 'verification-needed-disco' to 'verification-failed-disco'.

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

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-cosmic
Hui Wang (hui.wang)
tags: added: verification-done-cosmic verification-done-disco
removed: verification-needed-cosmic verification-needed-disco
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem - 4.15.0-1045.50

---------------
linux-oem (4.15.0-1045.50) bionic; urgency=medium

  * linux-oem: 4.15.0-1045.50 -proposed tracker (LP: #1833962)

  [ Ubuntu: 4.15.0-54.58 ]

  * linux: 4.15.0-54.58 -proposed tracker (LP: #1833987)
  * Remote denial of service (resource exhaustion) caused by TCP SACK scoreboard
    manipulation (LP: #1831638) // CVE-2019-11478
    - tcp: refine memory limit test in tcp_fragment()
  * CVE-2019-11479
    - SAUCE: tcp: add tcp_min_snd_mss sysctl
    - SAUCE: tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()

 -- Chia-Lin Kao (AceLan) <email address hidden> Wed, 26 Jun 2019 17:29:41 +0800

Changed in linux-oem (Ubuntu Cosmic):
status: Invalid → Fix Released
Changed in linux-oem (Ubuntu Disco):
status: Invalid → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (11.2 KiB)

This bug was fixed in the package linux - 4.15.0-55.60

---------------
linux (4.15.0-55.60) bionic; urgency=medium

  * linux: 4.15.0-55.60 -proposed tracker (LP: #1834954)

  * Request backport of ceph commits into bionic (LP: #1834235)
    - ceph: use atomic_t for ceph_inode_info::i_shared_gen
    - ceph: define argument structure for handle_cap_grant
    - ceph: flush pending works before shutdown super
    - ceph: send cap releases more aggressively
    - ceph: single workqueue for inode related works
    - ceph: avoid dereferencing invalid pointer during cached readdir
    - ceph: quota: add initial infrastructure to support cephfs quotas
    - ceph: quota: support for ceph.quota.max_files
    - ceph: quota: don't allow cross-quota renames
    - ceph: fix root quota realm check
    - ceph: quota: support for ceph.quota.max_bytes
    - ceph: quota: update MDS when max_bytes is approaching
    - ceph: quota: add counter for snaprealms with quota
    - ceph: avoid iput_final() while holding mutex or in dispatch thread

  * QCA9377 isn't being recognized sometimes (LP: #1757218)
    - SAUCE: USB: Disable USB2 LPM at shutdown

  * hns: fix ICMP6 neighbor solicitation messages discard problem (LP: #1833140)
    - net: hns: fix ICMP6 neighbor solicitation messages discard problem
    - net: hns: fix unsigned comparison to less than zero

  * Fix occasional boot time crash in hns driver (LP: #1833138)
    - net: hns: Fix probabilistic memory overwrite when HNS driver initialized

  * use-after-free in hns_nic_net_xmit_hw (LP: #1833136)
    - net: hns: fix KASAN: use-after-free in hns_nic_net_xmit_hw()

  * hns: attempt to restart autoneg when disabled should report error
    (LP: #1833147)
    - net: hns: Restart autoneg need return failed when autoneg off

  * systemd 237-3ubuntu10.14 ADT test failure on Bionic ppc64el (test-seccomp)
    (LP: #1821625)
    - powerpc: sys_pkey_alloc() and sys_pkey_free() system calls
    - powerpc: sys_pkey_mprotect() system call

  * [UBUNTU] pkey: Indicate old mkvp only if old and curr. mkvp are different
    (LP: #1832625)
    - pkey: Indicate old mkvp only if old and current mkvp are different

  * [UBUNTU] kernel: Fix gcm-aes-s390 wrong scatter-gather list processing
    (LP: #1832623)
    - s390/crypto: fix gcm-aes-s390 selftest failures

  * System crashes on hot adding a core with drmgr command (4.15.0-48-generic)
    (LP: #1833716)
    - powerpc/numa: improve control of topology updates
    - powerpc/numa: document topology_updates_enabled, disable by default

  * Kernel modules generated incorrectly when system is localized to a non-
    English language (LP: #1828084)
    - scripts: override locale from environment when running recordmcount.pl

  * [UBUNTU] kernel: Fix wrong dispatching for control domain CPRBs
    (LP: #1832624)
    - s390/zcrypt: Fix wrong dispatching for control domain CPRBs

  * CVE-2019-11815
    - net: rds: force to destroy connection if t_sock is NULL in
      rds_tcp_kill_sock().

  * Sound device not detected after resume from hibernate (LP: #1826868)
    - drm/i915: Force 2*96 MHz cdclk on glk/cnl when audio power is enabled
    - drm/i915: Save the old CDCLK atomic state
...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (57.5 KiB)

This bug was fixed in the package linux - 5.0.0-21.22

---------------
linux (5.0.0-21.22) disco; urgency=medium

  * linux: 5.0.0-21.22 -proposed tracker (LP: #1834902)

  * Disco update: 5.0.15 upstream stable release (LP: #1834529)
    - net: stmmac: Use bfsize1 in ndesc_init_rx_desc
    - Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup()
    - ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings
    - staging: greybus: power_supply: fix prop-descriptor request size
    - staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.
    - staging: most: cdev: fix chrdev_region leak in mod_exit
    - staging: most: sound: pass correct device when creating a sound card
    - ASoC: tlv320aic3x: fix reset gpio reference counting
    - ASoC: hdmi-codec: fix S/PDIF DAI
    - ASoC: stm32: sai: fix iec958 controls indexation
    - ASoC: stm32: sai: fix exposed capabilities in spdif mode
    - ASoC: stm32: sai: fix race condition in irq handler
    - ASoC:soc-pcm:fix a codec fixup issue in TDM case
    - ASoC:hdac_hda:use correct format to setup hda codec
    - ASoC:intel:skl:fix a simultaneous playback & capture issue on hda platform
    - ASoC: dpcm: prevent snd_soc_dpcm use after free
    - ASoC: nau8824: fix the issue of the widget with prefix name
    - ASoC: nau8810: fix the issue of widget with prefixed name
    - ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate
    - ASoC: rt5682: Check JD status when system resume
    - ASoC: rt5682: fix jack type detection issue
    - ASoC: rt5682: recording has no sound after booting
    - ASoC: wm_adsp: Add locking to wm_adsp2_bus_error
    - clk: meson-gxbb: round the vdec dividers to closest
    - ASoC: stm32: dfsdm: manage multiple prepare
    - ASoC: stm32: dfsdm: fix debugfs warnings on entry creation
    - ASoC: cs4270: Set auto-increment bit for register writes
    - ASoC: dapm: Fix NULL pointer dereference in snd_soc_dapm_free_kcontrol
    - drm/omap: hdmi4_cec: Fix CEC clock handling for PM
    - IB/hfi1: Clear the IOWAIT pending bits when QP is put into error state
    - IB/hfi1: Eliminate opcode tests on mr deref
    - IB/hfi1: Fix the allocation of RSM table
    - MIPS: KGDB: fix kgdb support for SMP platforms.
    - ASoC: tlv320aic32x4: Fix Common Pins
    - drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
    - perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS
    - perf/x86/intel: Initialize TFA MSR
    - linux/kernel.h: Use parentheses around argument in u64_to_user_ptr()
    - iov_iter: Fix build error without CONFIG_CRYPTO
    - xtensa: fix initialization of pt_regs::syscall in start_thread
    - ASoC: rockchip: pdm: fix regmap_ops hang issue
    - drm/amdkfd: Add picasso pci id
    - drm/amdgpu: Adjust IB test timeout for XGMI configuration
    - drm/amdgpu: amdgpu_device_recover_vram always failed if only one node in
      shadow_list
    - drm/amd/display: fix cursor black issue
    - ASoC: cs35l35: Disable regulators on driver removal
    - objtool: Add rewind_stack_do_exit() to the noreturn list
    - slab: fix a crash by reading /proc/slab_allocators
    - drm/sun4i: tcon top: Fix NULL/inv...

Changed in linux (Ubuntu Disco):
status: Fix Committed → 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-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
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.