* [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
@ 2024-07-30 17:40 bugzilla-daemon
2024-07-30 17:56 ` [Bug 219110] " bugzilla-daemon
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-07-30 17:40 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
Bug ID: 219110
Summary: amd-pstate's balance_performance
energy_performance_preference doesn't survive suspend
resume
Product: Power Management
Version: 2.5
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: cpufreq
Assignee: linux-pm@vger.kernel.org
Reporter: aros@gmx.com
Regression: No
On boot I'm setting
/sys/devices/system/cpu/cpufreq/*/energy_performance_preference to
`balance_performance` however after a suspend resume cycle it gets reset to
`performance` despite energy_performance_preference reporting that it's set to
`balance_performance` which is basically a lie.
How do I know it?
Start watching a 1440p/4K VP9/AV1 video with video acceleration on on YouTube.
With default performance I'm looking at more than 14W CPU package consumption
on average.
With balance_performance it goes down to roughly 8W.
Upon resume with reportedly balance_performance it's back to > 14W.
Please fix.
That's with kernel 6.9.12. If this has been fixed in 6.10, please let me know.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
@ 2024-07-30 17:56 ` bugzilla-daemon
2024-07-30 18:09 ` bugzilla-daemon
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-07-30 17:56 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
xiaojian.du@amd.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xiaojian.du@amd.com
--- Comment #1 from xiaojian.du@amd.com ---
So you do one suspend cycle on your device?
I think CPU power status is reset after one suspend cycle.
Yes, it should be a function to restore CPU power register status and governor
status after s3/s4/s2idle.
For you case, i think add one more shell script will fix this problem, you
know, you are setting cpu enegy policy during booting, then your can add one
same action during suspend, any chance for this?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
2024-07-30 17:56 ` [Bug 219110] " bugzilla-daemon
@ 2024-07-30 18:09 ` bugzilla-daemon
2024-07-30 18:29 ` bugzilla-daemon
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-07-30 18:09 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #2 from Artem S. Tashkinov (aros@gmx.com) ---
(In reply to xiaojian.du from comment #1)
> So you do one suspend cycle on your device?
I have to set/restore energy_performance_preference on every resume.
> I think CPU power status is reset after one suspend cycle.
> Yes, it should be a function to restore CPU power register status and
> governor status after s3/s4/s2idle.
> For you case, i think add one more shell script will fix this problem, you
> know, you are setting cpu enegy policy during booting, then your can add one
> same action during suspend, any chance for this?
I can certainly do that, but with acpi-cpufreq you didn't have to do that :-(
You set performance/powersave/ondemand and it perfectly survives
suspend/resume.
I wonder why amd-pstate cannot. A kernel module can keep this state as a simple
variable and restore the energy preference on resume.
And secondly it's quite misleading that it reports a wrong value after
resuming.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
2024-07-30 17:56 ` [Bug 219110] " bugzilla-daemon
2024-07-30 18:09 ` bugzilla-daemon
@ 2024-07-30 18:29 ` bugzilla-daemon
2024-07-30 18:31 ` bugzilla-daemon
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-07-30 18:29 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #3 from xiaojian.du@amd.com ---
> I wonder why amd-pstate cannot. A kernel module can keep this state as a
> simple variable and restore the energy preference on resume.
>
> And secondly it's quite misleading that it reports a wrong value after
> resuming.
Of course, this should be a function for a complete and robust cpu driver.
will discuss it internally. Our team now lacks resources, both human resource
and project funding support. So it will take time.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (2 preceding siblings ...)
2024-07-30 18:29 ` bugzilla-daemon
@ 2024-07-30 18:31 ` bugzilla-daemon
2024-08-23 18:07 ` bugzilla-daemon
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-07-30 18:31 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
Artem S. Tashkinov (aros@gmx.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Severity|normal |low
--- Comment #4 from Artem S. Tashkinov (aros@gmx.com) ---
> Our team now lacks resources, both human resource and project funding
> support.
That's really sad to hear.
> So it will take time.
Thanks a ton, there's no rush.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (3 preceding siblings ...)
2024-07-30 18:31 ` bugzilla-daemon
@ 2024-08-23 18:07 ` bugzilla-daemon
2024-08-23 19:54 ` bugzilla-daemon
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-23 18:07 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
Mario Limonciello (AMD) (mario.limonciello@amd.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #5 from Mario Limonciello (AMD) (mario.limonciello@amd.com) ---
(I've been OOO a while, but I see this in my inbox as I'm catching up now).
I have a Framework 13 on my desk (Ryzen 7840U), running 6.11-rc4. I stopped
power-profiles-daemon before suspend to ensure it doesn't influence the result
in any way.
Before suspend I ran:
# systemctl stop power-profiles-daemon.service
# cat /sys/bus/cpu/devices/cpu*/cpufreq/energy_performance_preference
Everything is 'balance_performance'.
I then suspend with:
# systemctl suspend
I then resume and run :
# cat /sys/bus/cpu/devices/cpu*/cpufreq/energy_performance_preference
Everything is the same.
Can you reproduce my result on 6.11-rc4?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (4 preceding siblings ...)
2024-08-23 18:07 ` bugzilla-daemon
@ 2024-08-23 19:54 ` bugzilla-daemon
2024-08-23 19:56 ` bugzilla-daemon
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-23 19:54 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #6 from Artem S. Tashkinov (aros@gmx.com) ---
Perhaps I didn't make it clear in the bug report, Mario, but the value of the
variable is correct after resuming, it's the same as you set it, but the energy
preference gets reset to the default value. In other words, the variable no
longer represents the state of the system.
I will test 6.11 once it gets released.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (5 preceding siblings ...)
2024-08-23 19:54 ` bugzilla-daemon
@ 2024-08-23 19:56 ` bugzilla-daemon
2024-08-26 17:23 ` bugzilla-daemon
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-23 19:56 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #7 from Artem S. Tashkinov (aros@gmx.com) ---
It's easy to reproduce by e.g. watching YouTube VP9 1440p/4K videos with my
Ryzen 7 7840HS with HW acceleration on.
Before suspend:
performance -> ~15W
balance_performance -> ~8-9W
After resuming when it's set to "balance_performance" we are back to ~15W.
Setting it to any other value and then back to balance_performance fixes it.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (6 preceding siblings ...)
2024-08-23 19:56 ` bugzilla-daemon
@ 2024-08-26 17:23 ` bugzilla-daemon
2024-08-26 18:14 ` bugzilla-daemon
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-26 17:23 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #8 from Mario Limonciello (AMD) (mario.limonciello@amd.com) ---
To me this sounds like a firmware bug. I can't seem to reproduce it.
I just had a try on an AMD reference system with a "AMD Ryzen 5 7640U w/ Radeon
760M Graphics" running PhoenixPI-FP8-FP7 1.1.0.2a.
For my kernel I used 6.11-rc4.
For userspace it's Ubuntu 24.04 userspace.
I ran "mpv bbb_sunflower_2160p_60fps_normal.mp4".
I then SSH'ed in from another system and looked at the average PPT value
reported by 'sensors'. It stay in the 8W range the whole time. Here was a
snapshot:
amdgpu-pci-c200
Adapter: PCI adapter
vddgfx: 900.00 mV
vddnb: 759.00 mV
edge: +39.0°C
PPT: 6.00 W (avg = 8.14 W)
I then stopped the video, suspended and started it back up and looked again.
Same ballpark.
You might look at the value for the MSR's that amd-pstate uses by using 'rdmsr
MSR' to see if they change in any notable way before or after suspend.
#define MSR_AMD_CPPC_CAP1 0xc00102b0
#define MSR_AMD_CPPC_ENABLE 0xc00102b1
#define MSR_AMD_CPPC_CAP2 0xc00102b2
#define MSR_AMD_CPPC_REQ 0xc00102b3
#define MSR_AMD_CPPC_STATUS 0xc00102b4
The most important one to check is MSR_AMD_CPPC_REQ.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (7 preceding siblings ...)
2024-08-26 17:23 ` bugzilla-daemon
@ 2024-08-26 18:14 ` bugzilla-daemon
2024-08-26 18:19 ` bugzilla-daemon
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-26 18:14 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #9 from Artem S. Tashkinov (aros@gmx.com) ---
Could be a firmware bug, not the first one :-)
This command doesn't seem to work here:
# rdmsr MSR
0
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (8 preceding siblings ...)
2024-08-26 18:14 ` bugzilla-daemon
@ 2024-08-26 18:19 ` bugzilla-daemon
2024-08-26 18:22 ` bugzilla-daemon
2024-08-26 18:27 ` bugzilla-daemon
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-26 18:19 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #10 from Artem S. Tashkinov (aros@gmx.com) ---
It works, I didn't understand how to use it at first.
Before suspend:
0xc00102b0: c4912a10c4912a10
0xc00102b1: 1
0xc00102b2: 0
0xc00102b3: 800010c4
0xc00102b4: 0
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (9 preceding siblings ...)
2024-08-26 18:19 ` bugzilla-daemon
@ 2024-08-26 18:22 ` bugzilla-daemon
2024-08-26 18:27 ` bugzilla-daemon
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-26 18:22 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
--- Comment #11 from Artem S. Tashkinov (aros@gmx.com) ---
After resuming:
for i in `seq 0 4`; do rdmsr "0xc00102b$i"; done
c4912a10c4912a10
1
0
800010c4
0
Looks exactly the same.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug 219110] amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
` (10 preceding siblings ...)
2024-08-26 18:22 ` bugzilla-daemon
@ 2024-08-26 18:27 ` bugzilla-daemon
11 siblings, 0 replies; 13+ messages in thread
From: bugzilla-daemon @ 2024-08-26 18:27 UTC (permalink / raw)
To: linux-pm
https://bugzilla.kernel.org/show_bug.cgi?id=219110
Artem S. Tashkinov (aros@gmx.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |REJECTED
Resolution|--- |UNREPRODUCIBLE
--- Comment #12 from Artem S. Tashkinov (aros@gmx.com) ---
I feel like in Linux 6.11.x I cannot reproduce it any longer, i.e. it works as
expected.
If I manage to reproduce it, I'll let you know.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-08-26 18:27 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 17:40 [Bug 219110] New: amd-pstate's balance_performance energy_performance_preference doesn't survive suspend resume bugzilla-daemon
2024-07-30 17:56 ` [Bug 219110] " bugzilla-daemon
2024-07-30 18:09 ` bugzilla-daemon
2024-07-30 18:29 ` bugzilla-daemon
2024-07-30 18:31 ` bugzilla-daemon
2024-08-23 18:07 ` bugzilla-daemon
2024-08-23 19:54 ` bugzilla-daemon
2024-08-23 19:56 ` bugzilla-daemon
2024-08-26 17:23 ` bugzilla-daemon
2024-08-26 18:14 ` bugzilla-daemon
2024-08-26 18:19 ` bugzilla-daemon
2024-08-26 18:22 ` bugzilla-daemon
2024-08-26 18:27 ` bugzilla-daemon
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).