Change cpu or gpu frequency will lead vram frequency to 400Mhz #160

Closed
opened 2024-06-12 06:26:51 +01:00 by FuyutsukiTouya · 10 comments

Expected Behaviour

can normally change cpu and gpu frequency

Actual Behaviour

Change cpu or gpu frequency will lead vram frequency to 400Mhz,once vram frequency down to 400mhz,any big game`s framerate will be limited under 20hz

Steps To Reproduce

open gui and change cpu or gpu frequency

Anything else?

I tried to work around this situation by editing the configuration file of PowerTools (so the maximum frequency of the GPU is 1800), but it didn’t work.
Additionally, I boost the memory of my Steam Deck, so the memory shows 800MHz. However, this phenomenon is not caused by the old BIOS used for boost.
I also tried replacing it with a new BIOS, but it didn’t help. This has been the case since the Steam client update.
Occasionally, after a game crash that causes a system reboot, modifying the CPU/GPU does not lead to this situation because Power Tools becomes completely unable to modify the memory speed after the system crash and reboot.

Version

2.0.2

Platform

SteamDeck LCD

OS

SteamOS 3 (Stable)

### Expected Behaviour can normally change cpu and gpu frequency ### Actual Behaviour Change cpu or gpu frequency will lead vram frequency to 400Mhz,once vram frequency down to 400mhz,any big game`s framerate will be limited under 20hz ### Steps To Reproduce open gui and change cpu or gpu frequency ### Anything else? I tried to work around this situation by editing the configuration file of PowerTools (so the maximum frequency of the GPU is 1800), but it didn’t work. Additionally, I boost the memory of my Steam Deck, so the memory shows 800MHz. However, this phenomenon is not caused by the old BIOS used for boost. I also tried replacing it with a new BIOS, but it didn’t help. This has been the case since the Steam client update. Occasionally, after a game crash that causes a system reboot, modifying the CPU/GPU does not lead to this situation because Power Tools becomes completely unable to modify the memory speed after the system crash and reboot. ### Version 2.0.2 ### Platform SteamDeck LCD ### OS SteamOS 3 (Stable)
125 KiB
120 KiB
FuyutsukiTouya added the
bug
label 2024-06-12 06:26:51 +01:00
Owner

I can't reproduce this, which either means it's fixed in v2.0.3 or you don't have the latest limits config from my server. The latest should be compiled into v2.0.3 so either way that version should work.

I can't reproduce this, which either means it's fixed in v2.0.3 or you don't have the latest limits config from my server. The latest should be compiled into v2.0.3 so either way that version should work.
NGnius added the
tbr
label 2024-06-13 22:34:55 +01:00
Author

no,my steam deck still can 100% trigger this, bug maybe problem in steam client's API

no,my steam deck still can 100% trigger this, bug maybe problem in steam client's API

In limits_override.ron change line 201 to:
quirks: ["pp_dpm_fclk-static"],

NG-SD-Plugins/PowerTools#146

In limits_override.ron change line 201 to: `quirks: ["pp_dpm_fclk-static"],` NG-SD-Plugins/PowerTools#146
Owner

I guess last time I updated that file I didn't update it in the code too, so the next time I regenerated the file it reverted 🥲

I guess last time I updated that file I didn't update it in the code too, so the next time I regenerated the file it reverted 🥲

quirks: ["pp_dpm_fclk-not-updated-on-LCD", "pp_dpm_fclk-static"],

Also works
Crosspost from Discord… sorry

`quirks: ["pp_dpm_fclk-not-updated-on-LCD", "pp_dpm_fclk-static"],` Also works Crosspost from Discord… sorry
Owner

The limits server should be providing the correct quirks again

The limits server should be providing the correct quirks again
NGnius removed the
tbr
label 2024-06-18 03:35:57 +01:00

I can confirm that this issue still exists for Steam Deck LCD with the latest data from limits server. I'm getting the following quirks from the server:
"quirks": [ "pp_dpm_fclk-reversed", "pp_dpm_fclk-static" ]
and I can change memory frequency from 400 MHz to 800 MHz and backward. But memory always set to 400 MHz once I change the GPU frequency. Gpu frequency is working fine if I remove "pp_dpm_fclk-reversed" quirk, but then I cannot set memory from 800 MHz to 400 MHz

I can confirm that this issue still exists for Steam Deck LCD with the latest data from [limits server](http://limits.ngni.us:45000/powertools/v2). I'm getting the following quirks from the server: `"quirks": [ "pp_dpm_fclk-reversed", "pp_dpm_fclk-static" ]` and I can change memory frequency from 400 MHz to 800 MHz and backward. But memory always set to 400 MHz once I change the GPU frequency. Gpu frequency is working fine if I remove "pp_dpm_fclk-reversed" quirk, but then I cannot set memory from 800 MHz to 400 MHz
Owner

On my LCD Deck it gets locked to 687MHz* once memory is set to max, no matter from where (including when some other dependency activates manual mode of amdgpu parts -- e.g. CPU or GPU frequency limits). This is a bug in the interface that I am unable to fix -- Valve or AMD will need to sort it out. You can see that it's not PowerTools setting it incorrectly because normal behaviour is restored when resuming from sleep (without settings that rely on manual mode).

I wonder if different RAM gets locked to a different clock speed... I have Micron RAM in case that's a factor.

On a mostly unrelated note, I'm closing this because I've confirmed that the latest settings from #162 work better than the ones I set here. Also setting to 400MHz works as it should for me, though undoing that setting is another cause of that amdgpu/firmware bug.

* This is sort of strange because that's not an option advertised by the sysfs interface. The Deck OLED does have the 687MHz option, though...

On my LCD Deck it gets locked to 687MHz\* once memory is set to max, no matter from where (including when some other dependency activates manual mode of amdgpu parts -- e.g. CPU or GPU frequency limits). This is a bug in the interface that I am unable to fix -- Valve or AMD will need to sort it out. You can see that it's not PowerTools setting it incorrectly because normal behaviour is restored when resuming from sleep (without settings that rely on manual mode). I wonder if different RAM gets locked to a different clock speed... I have Micron RAM in case that's a factor. On a mostly unrelated note, I'm closing this because I've confirmed that the latest settings from #162 work better than the ones I set here. Also setting to 400MHz works as it should for me, though undoing that setting is another cause of that amdgpu/firmware bug. \* This is sort of strange because that's not an option advertised by the sysfs interface. The Deck OLED does have the 687MHz option, though...

I'm not sure if this is the amdgpu or firmware bug, but I'm able to change GPU memory if "pp_dpm_fclk-reversed" quirk is applied. And I'm also able to set cpu/gpu frequency (without falling back to 400 MHz memory frequency) if there is no "pp_dpm_fclk-reversed" quirk. For sure I'm not an expert, but for me it looks like there was some recent change in the steam deck update, and previous logic is not working as expected for LCD (there was no firmware update). Maybe something should be changed inside the gpu.rs:build_memory_clock_payload method?

UPD
For me everything working properly if I modify

let payload = self.build_memory_clock_payload(clock);

to
let payload = format!("{}", if self.is_memory_clock_maxed() { 0 } else { 1 });

I'm not sure if this is the amdgpu or firmware bug, but I'm able to change GPU memory if "pp_dpm_fclk-reversed" quirk is applied. And I'm also able to set cpu/gpu frequency (without falling back to 400 MHz memory frequency) if there is no "pp_dpm_fclk-reversed" quirk. For sure I'm not an expert, but for me it looks like there was some recent change in the steam deck update, and previous logic is not working as expected for LCD (there was no firmware update). Maybe something should be changed inside the gpu.rs:build_memory_clock_payload method? UPD For me everything working properly if I modify https://git.ngni.us/NG-SD-Plugins/PowerTools/src/commit/bf7b5617b2a22f44eb5af4785439d361e7d80108/backend/src/settings/steam_deck/gpu.rs#L344to `let payload = format!("{}", if self.is_memory_clock_maxed() { 0 } else { 1 });`

Update:
I'm getting the following results for pp_dpm_fclk on my Steam Deck:

(deck@steamdeck ~)$ cat /sys/class/drm/card0/device/pp_dpm_fclk
0: 400Mhz
1: 850Mhz *

but my actual memory speed is 6400 MT/s (overclocked). This probably breaks the implementation of the quantize_memory_clock method. I have tried to sort this out without code change by modifying in limits_override.ron:

            memory_clock: Some(RangeLimit(
                min: Some(400),
                max: Some(850),
            )),
            memory_clock_step: Some(450),

but it's still working as before

Update: I'm getting the following results for pp_dpm_fclk on my Steam Deck: ``` (deck@steamdeck ~)$ cat /sys/class/drm/card0/device/pp_dpm_fclk 0: 400Mhz 1: 850Mhz * ``` but my actual memory speed is 6400 MT/s (overclocked). This probably breaks the implementation of the `quantize_memory_clock` method. I have tried to sort this out without code change by modifying in limits_override.ron: ``` memory_clock: Some(RangeLimit( min: Some(400), max: Some(850), )), memory_clock_step: Some(450), ``` but it's still working as before
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: NG-SD-Plugins/PowerTools#160
No description provided.