Skip to content

Commit

Permalink
Set the default GPU device ID to 0
Browse files Browse the repository at this point in the history
This avoids confusion with the default configuration value being
`gpu_device=0` (as commented out in the `gamemode.ini` example),
but the actual default value being `-1`.

The alternative is to document this behavior and set the commented
out value to `-1`, but this makes the setup procedure more complex.
The new default behavior suits the 90% use case where there's
only one dedicated GPU available.
  • Loading branch information
Calinou authored and afayaz-feral committed Dec 4, 2023
1 parent 9614cec commit 138ad38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/gamemode-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static void load_config_files(GameModeConfig *self)
self->values.igpu_power_threshold = DEFAULT_IGPU_POWER_THRESHOLD;
self->values.inhibit_screensaver = 1; /* Defaults to on */
self->values.reaper_frequency = DEFAULT_REAPER_FREQ;
self->values.gpu_device = -1; /* 0 is a valid device ID so use -1 to indicate no value */
self->values.gpu_device = 0;
self->values.nv_powermizer_mode = -1;
self->values.nv_core_clock_mhz_offset = -1;
self->values.nv_mem_clock_mhz_offset = -1;
Expand Down

0 comments on commit 138ad38

Please sign in to comment.