amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged

Bug #2025670 reported by You-Sheng Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Status tracked in Mantic
Jammy
Invalid
Undecided
Unassigned
Lunar
Incomplete
Undecided
Unassigned
Mantic
Incomplete
Undecided
Unassigned
linux-oem-6.1 (Ubuntu)
Status tracked in Mantic
Jammy
Fix Released
Undecided
You-Sheng Yang
Lunar
Invalid
Undecided
Unassigned
Mantic
Invalid
Undecided
Unassigned

Bug Description

[SRU Justification]

BugLink: https://bugs.launchpad.net/bugs/2025670

[Impact]

Call trace dumped in events workqueue power_supply_changed_work, and cpufreq locked to 400-544MHz.

```
[ 22.592162] Call Trace:
[ 22.592164] <TASK>
[ 22.592164] ? rcu_note_context_switch+0x5e0/0x660
[ 22.592166] ? __warn+0x81/0x130
[ 22.592171] ? rcu_note_context_switch+0x5e0/0x660
[ 22.592172] ? report_bug+0x171/0x1a0
[ 22.592175] ? prb_read_valid+0x1b/0x30
[ 22.592177] ? handle_bug+0x3c/0x80
[ 22.592178] ? exc_invalid_op+0x17/0x70
[ 22.592179] ? asm_exc_invalid_op+0x1a/0x20
[ 22.592182] ? rcu_note_context_switch+0x5e0/0x660
[ 22.592183] ? acpi_ut_delete_object_desc+0x86/0xb0
[ 22.592186] ? acpi_ut_update_ref_count.part.0+0x22d/0x930
[ 22.592187] __schedule+0xc0/0x1410
[ 22.592189] ? ktime_get+0x3c/0xa0
[ 22.592191] ? lapic_next_event+0x1d/0x30
[ 22.592193] ? hrtimer_start_range_ns+0x25b/0x350
[ 22.592196] schedule+0x5e/0xd0
[ 22.592197] schedule_hrtimeout_range_clock+0xbe/0x140
[ 22.592199] ? __pfx_hrtimer_wakeup+0x10/0x10
[ 22.592200] usleep_range_state+0x64/0x90
[ 22.592203] amd_pmf_send_cmd+0x106/0x2a0 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592207] amd_pmf_update_slider+0x56/0x1b0 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592210] amd_pmf_set_sps_power_limits+0x72/0x80 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592213] amd_pmf_pwr_src_notify_call+0x49/0x90 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616]
[ 22.592216] notifier_call_chain+0x5a/0xd0
[ 22.592218] atomic_notifier_call_chain+0x32/0x50
```

[Fix]

Upstream v6.4 fixed with commit [146b6f6855e76](https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=146b6f6855e7656e8329910606595220c761daac) ("platform/x86/amd/pmf: Register notify handler only if SPS is enabled"). It has also been backported to stable trees v6.1.36 (oem-6.1 in v6.1.34 now), v6.2.15 (linux/lunar in v6.2.13 now), v6.3.10 (linux/mantic in v6.3.8 now).

[Test Case]

1. boot with AC power cable connected
2. unplug power cable and check cpufreq
3. check no call trace found in dmesg

[Where problems could occur]

This patch installs only notify handler when the feature is fully supported, so it's the right behavior.

[Other Info]

While we should receive this fix from stable fixes soon, nominate only oem-6.1 to allow rolling out fix as soon as possible.

========== original bug description ==========

Upstream bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=217571

This is specifically when a system advertises support for PMF, but doesn't support static power slider for any reason.

Upstream fix in https://github.com/torvalds/linux/commit/146b6f6855e7656e8329910606595220c761daac, which has been backported to v6.1.36 (oem-6.1 in v6.1.34 now), v6.2.15 (linux/lunar in v6.2.13), v6.3.10 (linux/mantic in v6.3.8), v6.4.

CVE References

You-Sheng Yang (vicamo)
Changed in linux-oem-6.1 (Ubuntu Lunar):
status: New → Invalid
Changed in linux-oem-6.1 (Ubuntu Mantic):
status: New → Invalid
Changed in linux-oem-6.1 (Ubuntu Jammy):
status: New → In Progress
Changed in linux (Ubuntu Jammy):
status: New → Invalid
You-Sheng Yang (vicamo)
Changed in linux-oem-6.1 (Ubuntu Jammy):
status: In Progress → Fix Committed
Revision history for this message
You-Sheng Yang (vicamo) wrote :

This bug is awaiting verification that the linux-oem-6.1/6.1.0-1017.17 kernel in https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/proposed2 solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

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 verification-needed-jammy
Changed in linux-oem-6.1 (Ubuntu Jammy):
assignee: nobody → You-Sheng Yang (vicamo)
description: updated
You-Sheng Yang (vicamo)
tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-6.1 - 6.1.0-1017.17

---------------
linux-oem-6.1 (6.1.0-1017.17) jammy; urgency=medium

  * jammy/linux-oem-6.1: 6.1.0-1017.17 -proposed tracker (LP: #2026459)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync update-dkms-versions helper

  * CVE-2023-3269
    - exec: Remove FOLL_FORCE for stack setup
    - mm: introduce new 'lock_mm_and_find_vma()' page fault helper
    - mm: make the page fault mmap locking killable
    - arm64/mm: Convert to using lock_mm_and_find_vma()
    - powerpc/mm: Convert to using lock_mm_and_find_vma()
    - mips/mm: Convert to using lock_mm_and_find_vma()
    - riscv/mm: Convert to using lock_mm_and_find_vma()
    - arm/mm: Convert to using lock_mm_and_find_vma()
    - mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
    - powerpc/mm: convert coprocessor fault to lock_mm_and_find_vma()
    - mm: make find_extend_vma() fail if write lock not held
    - execve: expand new process stack manually ahead of time
    - mm: always expand the stack with the mmap write lock held
    - [CONFIG]: Set CONFIG_LOCK_MM_AND_FIND_VMA

  * CVE-2023-3389
    - io_uring/poll: serialize poll linked timer start with poll removal

  * amd_pmf: AMD 7840HS cpufreq locked at 400-544MHz after power unplugged
    (LP: #2025670)
    - platform/x86/amd/pmf: Register notify handler only if SPS is enabled

  * Mute/mic LEDs no function on some HP Platforms (LP: #2025444)
    - ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook

  * Various backlight issues with the 6.0/6.1 kernel (LP: #2023638)
    - ACPI: video: Stop trying to use vendor backlight control on laptops from
      after ~2012

  * HDMI output with More than one child device for port B in VBT error
    (LP: #2025195)
    - SAUCE: drm/i915/quirks: Add multiple VBT quirk for HP ZBook Power G10

 -- You-Sheng Yang <email address hidden> Wed, 12 Jul 2023 11:26:03 +0800

Changed in linux-oem-6.1 (Ubuntu Jammy):
status: Fix Committed → Fix Released
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 2025670

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
Changed in linux (Ubuntu Lunar):
status: New → Incomplete
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.