TDP resets itself when increased beyond 15W on Steam Deck #163

Open
opened 2024-07-01 01:23:31 +01:00 by Tobe95 · 2 comments

Expected Behaviour

Having increased the maximum TDP from default 15W to 20W via BIOS and set up limits_override.ron accordingly, when starting a game and setting TDP beyond 15W, the increased TDP should be applied until the game is closed.

Actual Behaviour

After successfully setting TDP to for example 18W while in-game, it will seemingly random reset down to 15W again without the user doing anything.

Steps To Reproduce

  1. Launch a game and set the TDP to e.g. 18 or 20 watts with Powertools
  2. Run cat /sys/class/hwmon/hwmon4/power1_cap remotely via SSH to confirm that power1_cap and power2_cap actually reflect the increased TDP
  3. Play the game for a while, usually 1-2 minutes
  4. Run cat /sys/class/hwmon/hwmon4/power1_cap again to find out that the TDP has actually been reset to 15 watts again

Anything else?

This seems to happen mainly with demanding games where increased TDP usually comes in handy. I've experienced this in Witcher 3, WRC 10 and Titanfall 2 on Steam Deck LCD running Steam OS 3.5.x stable and after switching over to Bazzite.

Writing this I realize that this is not really a bug report, but possibly a feature request...

Nothing in powertools.log suggests that the TDP was reset, yet shortly after setting it to 20W, the game's performance decreased and cat /sys/class/hwmon/hwmon4/power1_cap returned 15000000 instead of 20000000.

I'm not sure what keeps changing the power cap, but would it be possible for powertools to make sure that the set TDP is reapplied in case it's changed by another process somehow?

Version

2.0.3-rls

Platform

SteamDeck

OS

SteamOS 3 (Stable)

### Expected Behaviour Having increased the maximum TDP from default 15W to 20W via BIOS and set up limits_override.ron accordingly, when starting a game and setting TDP beyond 15W, the increased TDP should be applied until the game is closed. ### Actual Behaviour After successfully setting TDP to for example 18W while in-game, it will seemingly random reset down to 15W again without the user doing anything. ### Steps To Reproduce 1. Launch a game and set the TDP to e.g. 18 or 20 watts with Powertools 2. Run _cat /sys/class/hwmon/hwmon4/power1_cap_ remotely via SSH to confirm that power1_cap and power2_cap actually reflect the increased TDP 3. Play the game for a while, usually 1-2 minutes 4. Run _cat /sys/class/hwmon/hwmon4/power1_cap_ again to find out that the TDP has actually been reset to 15 watts again ### Anything else? This seems to happen mainly with demanding games where increased TDP usually comes in handy. I've experienced this in Witcher 3, WRC 10 and Titanfall 2 on Steam Deck LCD running Steam OS 3.5.x stable and after switching over to Bazzite. Writing this I realize that this is not really a bug report, but possibly a feature request... Nothing in powertools.log suggests that the TDP was reset, yet shortly after setting it to 20W, the game's performance decreased and _cat /sys/class/hwmon/hwmon4/power1_cap_ returned 15000000 instead of 20000000. I'm not sure what keeps changing the power cap, but would it be possible for powertools to make sure that the set TDP is reapplied in case it's changed by another process somehow? ### Version 2.0.3-rls ### Platform SteamDeck ### OS SteamOS 3 (Stable)
Tobe95 added the
bug
label 2024-07-01 01:23:31 +01:00
Owner

Sounds related to #159 and #144
I'd guess everyone is only reporting the part that they notice and not testing out the full extent of the reset.

Sounds related to #159 and #144 I'd guess everyone is only reporting the part that they notice and not testing out the full extent of the reset.
NGnius added this to the Genry milestone 2024-07-02 22:27:53 +01:00
Author

I did some further testing and it appears Steam keeps reverting the TDP back to 15W mid-game.

There are some lines in /usr/bin/steamos-polkit-helpers/steamos-priv-write which allow Steam to control power1_cap and power2_cap, they might look slightly different on SteamOS compared to Bazzite:

if MatchFilenamePattern "$WRITE_PATH" "/sys/class/hwmon/hwmon*/power*_cap"; then
      if /usr/libexec/hwsupport/valve-hardware; then
          CommitWrite
      else
          Log "commit: Skipped $WRITE_VALUE -> $WRITE_PATH - Valve Hardware not detected"
      fi
 fi

By commenting out this whole block, Steam no longer randomly messes around with the TDP if I go beyond 15W with Powertools. This renders SteamOS' own TDP slider useless though.

While I've been having trouble with Powertools occasionally not loading profiles myself, I'm not sure if #144 and #159 are related to this.
If I set the CPU to run at a locked 3000 MhZ and TDP to 18W for example, it's only the TDP that is reset by Steam after some time, while CPU clocks remain unaffected.

I'm not sure if Powertools could really do anything about Steam changing the TDP, except for listening if the power*_cap files keep getting modified. It's probably up to the user to just edit steamos-priv-write if they want to consistently achieve a higher TDP.

I did some further testing and it appears Steam keeps reverting the TDP back to 15W mid-game. There are some lines in `/usr/bin/steamos-polkit-helpers/steamos-priv-write` which allow Steam to control _power1_cap_ and _power2_cap_, they might look slightly different on SteamOS compared to Bazzite: ``` if MatchFilenamePattern "$WRITE_PATH" "/sys/class/hwmon/hwmon*/power*_cap"; then if /usr/libexec/hwsupport/valve-hardware; then CommitWrite else Log "commit: Skipped $WRITE_VALUE -> $WRITE_PATH - Valve Hardware not detected" fi fi ``` By commenting out this whole block, Steam no longer randomly messes around with the TDP if I go beyond 15W with Powertools. This renders SteamOS' own TDP slider useless though. While I've been having trouble with Powertools occasionally not loading profiles myself, I'm not sure if #144 and #159 are related to this. If I set the CPU to run at a locked 3000 MhZ and TDP to 18W for example, it's only the TDP that is reset by Steam after some time, while CPU clocks remain unaffected. I'm not sure if Powertools could really do anything about Steam changing the TDP, except for listening if the `power*_cap` files keep getting modified. It's probably up to the user to just edit `steamos-priv-write` if they want to consistently achieve a higher TDP.
Sign in to join this conversation.
No milestone
No project
No assignees
2 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#163
No description provided.