- 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
- 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
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: #486
Tested on: RTX 3070 (driver 575.64.03) on Ubuntu 25.04, cards 0-2 and some other random numbers were tested
This reduces duplication of the split lock mitigation path.
Additionally, it allows extending the functionality of procsysctl into
also getting the split lock mitigation state.
The platform profile lives in /sys/firmware/acpi/platform_profile. The
desiredprof and defaultprof options correspond to the values for the
platform profile set when gamescope begins and ends, respectively.
HACK: The platform profile may restrict what values the governor can
take, so we choose to set the governor before the platform profile in
order to store the correct default governor, and restore the platform
profile before the governor. This is done to maximize correctness after
restoration, but it can cause issues if the previous platform profile
restricts the governor.
TODO: Save all the state we care about before any of it is changed. In
thsi case, we should set (and restore) the platform profile before the
governor.
Attribute the contributions made by members of the community, but avoid
unweildy and inconsistent copyright notices at the top of each file.
Existing contributor copyright notices have been left as-is.
Not all distributions install non-system binaries into /usr/bin. For
example, NixOS installs packages to /nix/store using a unique hash
generated from the inputs used to build it:
/nix/store/jld7jh3ilvbg91zvn1bdyawfc55b9jk8-polkit-0.118-bin/bin/pkexec
Specify the include directory in the link_daemon_common dependency
and thus everything that includes that as a dependency will get
the proper include directory automatically.