feat(gamemode): Add support for new GPU cards via nv_per_profile_editable in gamemode.ini

- Added a new configuration variable `nv_per_profile_editable` to the `gamemode.ini` file.
  - If set to 1 (default behavior), the code will use per-profile offset behavior.
  - If set to 0, the code will use the AllPerformanceLevels API, which is compatible with newer cards like the GTX5060ti.

- Updated the `gpuclockctl` utility to accept the `nv_per_profile_editable` parameter.
  - If the parameter is not provided, it defaults to 1 and uses the previous API for backward compatibility.

This change allows `gamemode` to support a wider range of GPU cards by providing flexibility in how GPU performance levels are managed.

**Notes:**
- Ensure that the `gamemode.ini` file includes the new `nv_per_profile_editable` setting.
- Verify that the updated `gpuclockctl` utility functions as expected with both default and specified values for `nv_per_profile_editable`.

Tested on: RTX 5060 ti (driver 575.64.05) on Ubuntu 25.04
This commit is contained in:
mangobiche
2025-08-27 16:39:44 -05:00
parent 47d73cbb3f
commit e5b0a2bf3e
6 changed files with 188 additions and 77 deletions

View File

@@ -79,6 +79,10 @@ disable_splitlock=1
;nv_core_clock_mhz_offset=0
;nv_mem_clock_mhz_offset=0
; Whether the GPU supports per-profile editable options for core and memory clock offsets.
; NOTE: if thi is set to 0 (AllPerformanceLevels) then nv_powermizer_mode must be set to 0
;nv_per_profile_editable = 1
; AMD specific settings
; Requires a relatively up to date AMDGPU kernel module
; See: https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html#gpu-power-thermal-controls-and-monitoring