FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.84k stars 188 forks source link

Add option to set AMDGPU pp_power_profile_mode in gamemode #488

Closed x5f3759df closed 4 weeks ago

x5f3759df commented 4 months ago

Is your feature request related to a problem? Please describe. AMDGPU driver aggressively force power saving when FPS is limited due low GPU load. More info here https://gitlab.freedesktop.org/drm/amd/-/issues/1500 (doesn't fixed for 3+ years)

Looks like driver doesn't use 3D_FULL_SCREEN profile at all, because it can't detect what full screen is due compositor or whatever.

Describe the solution you'd like Add option to set pp_power_profile_mode in config along with power_dpm_force_performance_level.

Right now we have only amd_performance_level=high to fix issues with powersaving, but it force GPU use maximum clocks even with low GPU load and causes GPU to generate too much heat.

Using 3D_FULL_SCREEN power profile will fix this issue along with powersaving problems.

for example

amd_power_profile=3D_FULL_SCREEN will be fine

Describe alternatives you've considered You can see all available profiles here

# cat /sys/class/drm/card1/device/pp_power_profile_mode

And see current used profile marked by *

You also can manually set profile, for example

# echo 1 > /sys/class/drm/card1/device/pp_power_profile_mode

set 3D_FULL_SCREEN power profile

stvoidit commented 2 months ago

It seems reasonable, now I have to use it manually, or with my own scripts and daemons.

However, I think it is important that this cannot be enabled by default and a good help is needed for this setting in the configuration file.

ninja- commented 1 month ago

power_dpm_force_performance_level is supported, but to my surprise disabled by default which can be super confusing to non-technical users

https://github.com/FeralInteractive/gamemode/blob/c54d6d4243b0dd0afcb49f2c9836d432da171a2b/util/gpuclockctl.c#L358

x5f3759df commented 1 month ago

changing pp_power_profile_mode need amd_performance_level set to "manual", but this currently not supported

so we need support to change to manual mode and then we can set pp_power_profile_mode

might be actually tricky, because you need to set it back after you stopped gaming

ninja- commented 1 month ago

FWIW, AMD decided to finally default power profile to "3D_FULL_SCREEN" from Linux 6.13

superm1 commented 4 weeks ago

FWIW, AMD decided to finally default power profile to "3D_FULL_SCREEN" from Linux 6.13

FYI - this policy is for dGPU only.

x5f3759df commented 4 weeks ago

Looks like with update from 6.13 kernel this issue is no longer an issue at all.