No sound on Lenovo laptop models Legion 15IMHG05, Yoga 7 14ITL5, and 13s Gen2

Bug #1939052 reported by Cameron Berkenpas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Medium
Hui Wang
Hirsute
Fix Released
Medium
Unassigned
Impish
Fix Released
Medium
Unassigned

Bug Description

[Impact]
The speaker on a coule of Lenovo laptops can't output sound, need
to do special initialization.

[Fix]
Backport a upstream patch, the patch will initialize the speaker
amplifier with special verbs.

[Test]
Booting the patched kernel, output the sound to speaker, could
heaer the sound.

[Where problems could occur]
The patch set the quirk to some lenovo machines with subsystem id,
there is no regression risk for other machines.

All 3 models need the appropriate HDA verbs sent to properly initialize the sound hardware.

Additionally, the Legion 15IMHG05 needs automute disabled otherwise speaker output will not return after removing headphones.

The good news is that I have working patches for all 3.

However, the 13s Gen2 reportedly has some weirdness on the volume control. I don't have this model of laptop so there's not a lot I can do. It seems tuning the volume up and down using the keys on the keyboard can jump the volume up and down in large increments. Volume adjustments via a GUI do not have this issue.

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: linux-image-5.11.0-25-generic 5.11.0-25.27
ProcVersionSignature: Ubuntu 5.11.0-25.27-generic 5.11.22
Uname: Linux 5.11.0-25-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu65.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: hiryu 7243 F.... pulseaudio
 /dev/snd/controlC0: hiryu 7243 F.... pulseaudio
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Thu Aug 5 10:17:57 2021
InstallationDate: Installed on 2021-04-23 (104 days ago)
InstallationMedia: Kubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
MachineType: LENOVO 82K6
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.0-25-generic root=UUID=825f1536-7d58-4097-9779-e5df2db0a6eb ro quiet splash nvidia-drm.modeset=0 resume=/dev/mapper/swap thinkpad_acpi.fan_control=1 bluetooth.disable_ertm acpi_backlight=video vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.11.0-25-generic N/A
 linux-backports-modules-5.11.0-25-generic N/A
 linux-firmware 1.197.2
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/18/2021
dmi.bios.release: 1.33
dmi.bios.vendor: LENOVO
dmi.bios.version: H1CN33WW
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: LNVNB161216
dmi.board.vendor: LENOVO
dmi.board.version: SDK0R32862 WIN
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Legion 7 16ITHg6
dmi.ec.firmware.release: 1.33
dmi.modalias: dmi:bvnLENOVO:bvrH1CN33WW:bd07/18/2021:br1.33:efr1.33:svnLENOVO:pn82K6:pvrLegion716ITHg6:rvnLENOVO:rnLNVNB161216:rvrSDK0R32862WIN:cvnLENOVO:ct10:cvrLegion716ITHg6:
dmi.product.family: Legion 7 16ITHg6
dmi.product.name: 82K6
dmi.product.sku: LENOVO_MT_82K6_BU_idea_FM_Legion 7 16ITHg6
dmi.product.version: Legion 7 16ITHg6
dmi.sys.vendor: LENOVO

Revision history for this message
Cameron Berkenpas (hiryu88) wrote :
Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

This is the patch for the Lenovo Yoga 7 14ITL5.

Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

This is the patch for the 13s gen2 with the aforementioned issue relating to volume adjustments using the keyboard function keys.

Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

All patches apply against all of 5.13.x so far (with the latest being 5.13.8).

This is a duplicate of https://bugzilla.kernel.org/show_bug.cgi?id=208555

Happy to improve these patches to a point where they could be included.I'm posting this here, because I'm an Ubuntu user and I'd like to see this work merged in.

Revision history for this message
Alex Hung (alexhung) wrote :

Hi Cameron,

Thanks for sharing your work. For patches to be merged into Ubuntu kernel, patches need to be backport by sending SRU to ubuntu kernel team: kernel-team at lists.ubuntu.com with specific format. This allows reviews from broader audiences.

An example will be like https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1938689

 Cover letter: https://lists.ubuntu.com/archives/kernel-team/2021-August/122890.html
 Patch: https://lists.ubuntu.com/archives/kernel-team/2021-August/122891.html

Note: subject's "UBUNTU: SAUCE:" is needed for patches aren't in mainline kernel, and bug link should be included in both cover letter and patch description.

Details can be found @ https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

tags: added: patch
Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

Hello Alex,

Thanks for the info. The amount of stuff on my plate has recently ramped up. I'll try to see if I can get started with this process at some point during this month.

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

@Cameron,

These patches need to be sent to upstream first.

thx.

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

@Cameron,

How did you find those verbs? And could you please also take a look at this bug: https://bugzilla.kernel.org/show_bug.cgi?id=203409

could you please find a workable verbs for lenovo c930 as well?

Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

Some info is here:
https://github.com/thiagotei/linux-realtek-alc287

You can run a VM using someone's fork of of Qemu (which just adds a bit of logging) with PCIE passthrough of your sound card. Then you can narrow down exactly which verbs are needed.
It seems that some of the people in your linked bug are attempting the exact same method already.

This is all assuming you're simply missing the verb initialization sequence for your laptop's hardware.

For example, the 2021 Lenovo Legion's (both the AMD and Intel models) have a separate issue where the speakers are controlled by a Cirrus Logic (CS35L51) amplifier chip that currently has no support in Linux.

I can't do this, because I don't have this model of laptop, and I don't really have anymore time to dedicate to this.

I've attempted to send the patches upstream. I never got a response. Not even the slightest amount of feedback. Considering this is something I've done on the side and that I have a lot of other responsibilities, I think this is as likely as far as this is going to go.

Good luck on the Lenovo c930.

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

Well noted, thanks for sharing the info.

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 :

The fix was merged to mainline kernel. Now SRU the fix to ubuntu kernels.

Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Focal):
status: New → In Progress
Changed in linux (Ubuntu Hirsute):
status: New → In Progress
Changed in linux (Ubuntu Impish):
status: Confirmed → In Progress
Changed in linux (Ubuntu Hirsute):
importance: Undecided → Medium
Changed in linux (Ubuntu Focal):
importance: Undecided → Medium
assignee: nobody → Hui Wang (hui.wang)
Revision history for this message
Hui Wang (hui.wang) wrote :
Revision history for this message
Hui Wang (hui.wang) wrote :
Hui Wang (hui.wang)
description: updated
Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

Heads up that the 13s Gen2 doesn't work with this patch. A followup was necessary:
https://www.spinics.net/lists/alsa-devel/msg132423.html

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

@Cameron,

The SRU already included the patch of #15. In total 2 patches.

Revision history for this message
Cameron Berkenpas (hiryu88) wrote :

That's great! I didn't see any mention of it here, and I posted that patch just 3 days ago.Glad to see it make it in so quickly.

Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Hirsute):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Impish):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.11.0-39.43 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
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.4.0-90.101 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 linux/5.13.0-21.21 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-impish' to 'verification-done-impish'. If the problem still exists, change the tag 'verification-needed-impish' to 'verification-failed-impish'.

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-impish
Hui Wang (hui.wang)
tags: added: verification-done-focal verification-done-hirsute verification-done-impish
removed: verification-needed-focal verification-needed-hirsute verification-needed-impish
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (32.6 KiB)

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

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

  * focal/linux: 5.4.0-90.101 -proposed tracker (LP: #1947260)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.10.18)

  * Add final-checks to check certificates (LP: #1947174)
    - [Packaging] Add system trusted and revocation keys final check

  * No sound on Lenovo laptop models Legion 15IMHG05, Yoga 7 14ITL5, and 13s
    Gen2 (LP: #1939052)
    - ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i
      15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
    - ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s
      Gen2

  * CVE-2020-36385
    - RDMA/cma: Add missing locking to rdma_accept()
    - RDMA/ucma: Fix the locking of ctx->file
    - RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy

  * Focal update: v5.4.148 upstream stable release (LP: #1946802)
    - rtc: tps65910: Correct driver module alias
    - btrfs: wake up async_delalloc_pages waiters after submit
    - btrfs: reset replace target device to allocation state on close
    - blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
    - blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
    - PCI/MSI: Skip masking MSI-X on Xen PV
    - powerpc/perf/hv-gpci: Fix counter value parsing
    - xen: fix setting of max_pfn in shared_info
    - include/linux/list.h: add a macro to test if entry is pointing to the head
    - 9p/xen: Fix end of loop tests for list_for_each_entry
    - tools/thermal/tmon: Add cross compiling support
    - pinctrl: stmfx: Fix hazardous u8[] to unsigned long cast
    - pinctrl: ingenic: Fix incorrect pull up/down info
    - soc: qcom: aoss: Fix the out of bound usage of cooling_devs
    - soc: aspeed: lpc-ctrl: Fix boundary check for mmap
    - soc: aspeed: p2a-ctrl: Fix boundary check for mmap
    - arm64: head: avoid over-mapping in map_memory
    - crypto: public_key: fix overflow during implicit conversion
    - block: bfq: fix bfq_set_next_ioprio_data()
    - power: supply: max17042: handle fails of reading status register
    - dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()
    - VMCI: fix NULL pointer dereference when unmapping queue pair
    - media: uvc: don't do DMA on stack
    - media: rc-loopback: return number of emitters rather than error
    - Revert "dmaengine: imx-sdma: refine to load context only once"
    - dmaengine: imx-sdma: remove duplicated sdma_load_context
    - libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
    - ARM: 9105/1: atags_to_fdt: don't warn about stack size
    - PCI/portdrv: Enable Bandwidth Notification only if port supports it
    - PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
    - PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
    - PCI: xilinx-nwl: Enable the clock through CCF
    - PCI: aardvark: Fix checking for PIO status
    - PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
    - PCI: aardvark: Fix masking and unmasking legacy INTx interrupts
    - HID...

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

This bug was fixed in the package linux - 5.11.0-40.44

---------------
linux (5.11.0-40.44) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-40.44 -proposed tracker (LP: #1947876)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.10.18)

linux (5.11.0-39.43) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-39.43 -proposed tracker (LP: #1947227)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.10.18)

  * Add final-checks to check certificates (LP: #1947174)
    - [Packaging] Add system trusted and revocation keys final check

  * No sound on Lenovo laptop models Legion 15IMHG05, Yoga 7 14ITL5, and 13s
    Gen2 (LP: #1939052)
    - ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i
      15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
    - ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s
      Gen2

  * Fix cold plugged USB device on certain PCIe USB cards (LP: #1945211)
    - Revert "UBUNTU: SAUCE: Revert "usb: core: reduce power-on-good delay time of
      root hub""
    - usb: core: hcd: Add support for deferring roothub registration
    - xhci: Set HCD flag to defer primary roothub registration
    - usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd()

  * Hirsute update: upstream stable patchset 2021-10-12 (LP: #1946788)
    - locking/mutex: Fix HANDOFF condition
    - regmap: fix the offset of register error log
    - regulator: tps65910: Silence deferred probe error
    - crypto: mxs-dcp - Check for DMA mapping errors
    - sched/deadline: Fix reset_on_fork reporting of DL tasks
    - power: supply: axp288_fuel_gauge: Report register-address on readb / writeb
      errors
    - crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()
    - sched/deadline: Fix missing clock update in migrate_task_rq_dl()
    - rcu/tree: Handle VM stoppage in stall detection
    - EDAC/mce_amd: Do not load edac_mce_amd module on guests
    - hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns()
    - hrtimer: Ensure timerfd notification for HIGHRES=n
    - udf: Check LVID earlier
    - udf: Fix iocharset=utf8 mount option
    - isofs: joliet: Fix iocharset=utf8 mount option
    - bcache: add proper error unwinding in bcache_device_init
    - blk-throtl: optimize IOPS throttle for large IO scenarios
    - nvme-tcp: don't update queue count when failing to set io queues
    - nvme-rdma: don't update queue count when failing to set io queues
    - nvmet: pass back cntlid on successful completion
    - power: supply: smb347-charger: Add missing pin control activation
    - power: supply: max17042_battery: fix typo in MAx17042_TOFF
    - s390/cio: add dev_busid sysfs entry for each subchannel
    - s390/zcrypt: fix wrong offset index for APKA master key valid state
    - libata: fix ata_host_start()
    - crypto: omap - Fix inconsistent locking of device lists
    - crypto: qat - do not ignore errors from enable_vf2pf_comms()
    - crypto: qat - handle both source of interrupt in VF ISR
    - crypto: qat - fix reuse of completion variable
    -...

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

This bug was fixed in the package linux - 5.13.0-21.21

---------------
linux (5.13.0-21.21) impish; urgency=medium

  * impish/linux: 5.13.0-21.21 -proposed tracker (LP: #1947347)

  * It hangs while booting up with AMD W6800 [1002:73A3] (LP: #1945553)
    - drm/amdgpu: Rename flag which prevents HW access
    - drm/amd/pm: Fix a bug communicating with the SMU (v5)
    - drm/amd/pm: Fix a bug in semaphore double-lock

  * Add final-checks to check certificates (LP: #1947174)
    - [Packaging] Add system trusted and revocation keys final check

  * No sound on Lenovo laptop models Legion 15IMHG05, Yoga 7 14ITL5, and 13s
    Gen2 (LP: #1939052)
    - ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i
      15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
    - ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s
      Gen2

  * Check for changes relevant for security certifications (LP: #1945989)
    - [Packaging] Add a new fips-checks script
    - [Packaging] Add fips-checks as part of finalchecks

  * BCM57800 SRIOV bug causes interfaces to disappear (LP: #1945707)
    - bnx2x: Fix enabling network interfaces without VFs

  * CVE-2021-3759
    - memcg: enable accounting of ipc resources

  * [impish] Remove the downstream xr-usb-uart driver (LP: #1945938)
    - SAUCE: xr-usb-serial: remove driver
    - [Config] update modules list

  * Fix A yellow screen pops up in an instant (< 1 second) and then disappears
    before loading the system (LP: #1945932)
    - drm/i915: Stop force enabling pipe bottom color gammma/csc

  * Impish update: v5.13.18 upstream stable release (LP: #1946249)
    - Linux 5.13.18

  * Impish update: v5.13.17 upstream stable release (LP: #1946247)
    - locking/mutex: Fix HANDOFF condition
    - regmap: fix the offset of register error log
    - regulator: tps65910: Silence deferred probe error
    - crypto: mxs-dcp - Check for DMA mapping errors
    - sched/deadline: Fix reset_on_fork reporting of DL tasks
    - power: supply: axp288_fuel_gauge: Report register-address on readb / writeb
      errors
    - crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()
    - sched/deadline: Fix missing clock update in migrate_task_rq_dl()
    - rcu/tree: Handle VM stoppage in stall detection
    - EDAC/mce_amd: Do not load edac_mce_amd module on guests
    - hrtimer: Avoid double reprogramming in __hrtimer_start_range_ns()
    - hrtimer: Ensure timerfd notification for HIGHRES=n
    - udf: Check LVID earlier
    - udf: Fix iocharset=utf8 mount option
    - isofs: joliet: Fix iocharset=utf8 mount option
    - bcache: add proper error unwinding in bcache_device_init
    - nbd: add the check to prevent overflow in __nbd_ioctl()
    - blk-throtl: optimize IOPS throttle for large IO scenarios
    - nvme-tcp: don't update queue count when failing to set io queues
    - nvme-rdma: don't update queue count when failing to set io queues
    - nvmet: pass back cntlid on successful completion
    - power: supply: smb347-charger: Add missing pin control activation
    - power: supply: max17042_battery: fix typo in MAx17042_TOFF
    - s390/cio: add dev_busid sysfs entry f...

Changed in linux (Ubuntu Impish):
status: Fix Committed → Fix Released
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
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.