Fix power button wakeup with shared IRQs on AMD platforms

Bug #1953540 reported by Alex Hung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Medium
Unassigned
linux-oem-5.14 (Ubuntu)
Fix Released
Medium
Alex Hung
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

On some platform designs the the power button wakeup from s0i3 doesn't work even with the existing changes to IRQ handling for the GPIO controller.

In these designs the ACPI SCI and GPIO controller share an IRQ. Due to the way the s2idle loop handles the IRQ for the ACPI SCI the GPIO controller driver doesn't get a chance to wake the system in this circumstance.

[Fix]
To fix this rework the existing IRQ handler function to function as a checker and an IRQ handler depending on the calling arguments.

The patches were cherry-picked from 5.16rc3.

[Test]
This is requested by AMD. The test was done on two systems L15 AMD Gen2 and P14s AMD Gen2 and both can be waken up by power button presses.

[Where problems could occur]
Risk is low. This only affects AMD platforms with s0i3 enabled. Suspends/resumes are not affect.

Alex Hung (alexhung)
Changed in linux (Ubuntu):
assignee: nobody → Alex Hung (alexhung)
status: New → Fix Committed
status: Fix Committed → In Progress
Alex Hung (alexhung)
description: updated
description: updated
Alex Hung (alexhung)
tags: added: amd oem-priority originate-from-1950332
Alex Hung (alexhung)
Changed in linux (Ubuntu Focal):
status: New → Invalid
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in hwe-next:
importance: Undecided → Medium
affects: linux (Ubuntu Focal) → linux-oem-5.14 (Ubuntu Focal)
Changed in linux-oem-5.14 (Ubuntu Focal):
status: Invalid → In Progress
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-oem-5.14/5.14.0-1011.11 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
Alex Hung (alexhung)
tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

Verify on WMVB5-DVT2-A2, BIOS 0.4.7.

1. suspend the system
2. resume the system by power button
3. system can suspend/resume multiple times successfully

Attached kernel log for reference.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-5.14 - 5.14.0-1011.11

---------------
linux-oem-5.14 (5.14.0-1011.11) focal; urgency=medium

  * focal/linux-oem-5.14: 5.14.0-1011.11 -proposed tracker
    (LP: #1954691)

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

  * s2idle suspend failure: amd_pmc AMDI0005:00: SMU response timed out
    (LP: #1954633)
    - platform/x86: amd-pmc: Fix s2idle failures on certain AMD laptops

  * Fix power button wakeup with shared IRQs on AMD platforms (LP: #1953540)
    - ACPI: Add stubs for wakeup handler functions
    - pinctrl: amd: Fix wakeups when IRQ is shared with SCI

  * alsa/hda: the microphone can't be detected on a couple of lenovo machines
    (LP: #1954612)
    - ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform

  * mt7921e: Failed to start WM firmware (LP: #1954300)
    - SAUCE: Bluetooth: btusb: Handle download_firmware failure cases
    - SAUCE: Bluetooth: btusb: Return error code when getting patch status failed

  * Fix cpufreq: cpufreq_online: Failed to initialize policy for cpu: 0 (-19)
    (LP: #1954617)
    - ACPI: CPPC: Introduce cppc_get_nominal_perf()
    - ACPI: CPPC: Add NULL pointer check to cppc_get_perf()
    - cpufreq: intel_pstate: hybrid: Rework HWP calibration

  * Add support for NVIDIA EC backlight (LP: #1953286)
    - platform/x86: Add driver for ACPI WMAA EC-based backlight control
    - platform/x86: Remove "WMAA" from identifier names in wmaa-backlight-wmi.c
    - platform/x86: Rename wmaa-backlight-wmi to nvidia-wmi-ec-backlight
    - [Config] NVIDIA_WMI_EC_BACKLIGHT=m

  * Let VMD follow host bridge PCIe settings (LP: #1954611)
    - SAUCE: PCI: vmd: Honor ACPI _OSC on PCIe features

 -- Timo Aaltonen <email address hidden> Mon, 13 Dec 2021 19:41:56 +0200

Changed in linux-oem-5.14 (Ubuntu Focal):
status: In Progress → Fix Released
Alex Hung (alexhung)
Changed in linux-oem-5.14 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

included in v5.15.9

Changed in hwe-next:
status: New → 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.