Fix nvidia new offset api#547
Merged
afayaz-feral merged 3 commits intoFeralInteractive:masterfrom Sep 4, 2025
Merged
Conversation
On systems without /sys/class/drm/card0, gamemode fails to detect the correct NVIDIA GPU index when the GPU device is explicitly set in gamemode.ini. This patch adjusts get_gpu_index_id_nv() to skip over non-NVIDIA devices without prematurely failing, correctly mapping the configured DRM device index to the NVML index. Fixes: FeralInteractive#486 Tested on: RTX 3070 (driver 575.64.03) on Ubuntu 25.04, cards 0-2 and some other random numbers were tested
…table` 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
afayaz-feral
previously requested changes
Aug 28, 2025
Contributor
afayaz-feral
left a comment
There was a problem hiding this comment.
Could you run clang-format on the code? Our format check script is failing with your new changes.
…table` 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`. - clang-formated Tested on: RTX 5060 ti (driver 575.64.05) on Ubuntu 25.04
Contributor
Author
|
I just clang-formated, sorry I missed completly the pull requirement :). Let me know if you can compile or if further changes are necessary. |
Contributor
|
Thanks, could you also run |
Contributor
Author
|
Done! Let me know if it goes ok! |
afayaz-feral
approved these changes
Sep 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(gamemode): Add support for new GPU cards via
nv_per_profile_editableingamemode.iniAdded a new configuration variable
nv_per_profile_editableto thegamemode.inifile.Updated the
gpuclockctlutility to accept thenv_per_profile_editableparameter.This change allows
gamemodeto support a wider range of GPU cards by providing flexibility in how GPU performance levels are managed.Notes:
gamemode.inifile includes the newnv_per_profile_editablesetting.gpuclockctlutility functions as expected with both default and specified values fornv_per_profile_editable.Tested on: RTX 5060 ti (driver 575.64.05) on Ubuntu 25.04