From: bugzilla-daemon@kernel.org
To: linux-pm@vger.kernel.org
Subject: [Bug 219858] New: AMD Zen 2 broken power management after sleep
Date: Wed, 12 Mar 2025 01:32:56 +0000 [thread overview]
Message-ID: <bug-219858-137361@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=219858
Bug ID: 219858
Summary: AMD Zen 2 broken power management after sleep
Product: Power Management
Version: 2.5
Hardware: AMD
OS: Linux
Status: NEW
Severity: high
Priority: P3
Component: cpufreq
Assignee: linux-pm@vger.kernel.org
Reporter: diogotavc@protonmail.com
Regression: No
I have a ThinkPad E14 Gen 3 (Ryzen 7 5700U, Zen 2) running Fedora 41 with the
6.13.5-200.fc41.x86_64 kernel. After sleep (s2idle), the device will no longer
respect hints or sysfs nodes (not sure these are the right terms). At first I
thought this could be related to a recent BIOS/firmware upgrade, but it wasn't
a new occurance (tho, I hadn't taken any time to understand and diagnose the
issue).
As an example, sometimes I'll set the profile to Power Saver (regardless if
it's tuned-ppd or power-profiles-daemon), or manually set the value of
`/sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference` to `power`
and `/sys/devices/system/cpu/cpu*/cpufreq/boost` to `0`, and it'll boost
seemingly arbitrarily even if CPU load is low. To keep track of a few stats,
quickly wrote the following script:
```bash
#!/bin/bash
# Battery
batteryPath="/sys/class/power_supply/BAT0"
batteryStatus=$(cat "$batteryPath/status")
# Fan
currentLevel=$(cat /proc/acpi/ibm/fan | grep "level:" | awk '{print $2}')
fanSpeed=$(sensors | grep 'fan1:' | tail -c 10 | tr -d ' ' | sed 's/RPM//')
# CPU
cpuTemp=$(sensors | grep 'CPU:' | tail -c 10 | tr -d ' ' | sed 's/°C//')
cpuFreq=$(awk -F ': ' '/cpu MHz/ {print int($2)}' /proc/cpuinfo | sort -nr |
head -n 1)
# Power consumption
consumption=$(expr $(cat "$batteryPath/power_now") / 100000)
units=$(expr $consumption / 10)
decimal=$(expr $consumption % 10)
consumption=$units.$decimal
echo "Battery: $consumption W ($batteryStatus)"
echo "Fan Speed: $fanSpeed RPM ($currentLevel)"
echo "Temperature: $cpuTemp°C ($cpuFreq MHz)"
```
With this script, I can verify that the max frequency (between all threads)
before suspending is typically around 1.4GHz for the task at hand and, after
suspending, is glued to 4.3GHz almost permanently for the same task (near
idle). I've also taken the time, in multiple different scenarios, to see how
many threads were hitting those clock speeds, and it always seemed to be 2 to
4, with every other thread between 2 and 3GHz (although usually the latter,
keeping in mind the base clock is 1.8GHz). This, as you'd imagine, causes a ton
of unnecessary heat and energy consumption (might not manifest itself as much
for lighter tasks, but can be problematic if the load is higher).
One side note is that sometimes I'd wake the laptop up and have only the first
core with boost set to `0` and the rest with boost set to `1`
(`/sys/devices/system/cpu/cpu*/cpufreq/boost`). Not sure it's relevant, but it
was something I noticed.
It happens on all scaling drivers (`amd_pstate=active`, `amd_pstate=passive`,
`amd_pstate=guided`, and `amd_pstate=disable`) and seems to happen exclusively
on kernels 6.13 and up (6.11 doesn't display this behaviour at all, and my
testing with 6.12 isn't yet very conclusive), so it's reproducible. It's not
exclusive to Fedora, but may be specific to my laptop model and/or my CPU.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2025-03-12 1:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 1:32 bugzilla-daemon [this message]
2025-03-12 18:58 ` [Bug 219858] AMD Zen 2 broken power management after sleep bugzilla-daemon
2025-03-12 19:31 ` bugzilla-daemon
2025-03-21 15:41 ` bugzilla-daemon
2025-03-21 15:44 ` bugzilla-daemon
2025-03-21 15:49 ` bugzilla-daemon
2025-03-21 16:13 ` bugzilla-daemon
2025-03-21 16:15 ` bugzilla-daemon
2025-03-21 16:15 ` bugzilla-daemon
2025-03-21 16:18 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-219858-137361@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-pm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).