12 Commits

Author SHA1 Message Date
Ahsan Fayaz
5b3b4ae638 Add "GameMode contributors" to copyright notice
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.
2025-02-24 15:14:21 +00:00
Daniel Martinez
1c293d7818 use posix basename to fix build on musl
glibc provides a nonstandard basename implementation,
this can be overriden and posix basename can be used
by includeing libgen.h, however musl only has posix
basename, and must always include libgen.h

In this particular case, it doesn't appear that using
the posix version of basename will cause any issues,
as it is simply being used to match a hardcoded config
file name.
2024-03-27 10:17:17 +00:00
Henrik Holst
22001c56b1 Update gamemode-config.c
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
e2e8e981a2 Update gamemode-config.c
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
97cee92d94 Update gamemode-config.c
added config value for disabling split lock mitigation
2023-12-05 11:31:16 +00:00
Hugo Locurcio
138ad384e3 Set the default GPU device ID to 0
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.
2023-12-04 14:21:32 +00:00
Henrik Holst
32a0b5b636 added the cpu core parking/pinning settings
added the cpu core parking/pinning settings to gamemode-config.c
2023-12-04 14:18:38 +00:00
Kira Bruneau
5e366bd55d Fix loading shipped config when using a prefix other than /usr
Also remove recommendation to modify `/usr/share/gamemode/gamemode.ini`.
`/usr/share` is intended to contain read-only data files.

See https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html.
2022-02-03 16:02:18 +00:00
Stephan Lachnit
f0943ff431 prefer system installation of inih
Closes #195.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-02-26 18:24:50 +00:00
Jason Ekstrand
688373a260 Add an option for using a different governor for integrated GPUs
This commit adds two new configuration options: igpu_desiredgov and
igpu_power_threshold which allow for a different CPU governor when the
Intel integrated GPU is under load.  This currently only applies to
Intel integrated GPUs and not AMD APUs because it uses the Intel RAPL
infrastructure for getting power information.  If on a platform that
without an Intel integrated GPU or where the kernel does not support
RAPL, the new options will be ignored and it will fall back to the old
behavior.

One of the core principals of gamemoded to date has been that, when
playing a game, we want to use the "performance" CPU governor to
increase CPU performance and prevent CPU-limiting.  However, when the
integrated GPU is under load, this can be counter-productive because the
CPU and GPU share a thermal and power budget.  By throwing the CPU
governor to "performance" game mode currently makes the CPU frequency
management far too aggressive and it burns more power than needed.  With
a discrete GPU, this is fine because the worst that happens is a bit
more fan noise.  With an integrated GPU, however, the additional power
being burned by the CPU is power not available to the GPU and this can
cause the GPU to clock down and lead to significantly worse performance.

By using the "powersave" governor instead of the "performance" governor
while the integrated GPU is under load, we can save power on the CPU
side which lets the GPU clock up higher.  On my Razer Blade Stealth 13
with an i7-1065G7, this improves the performance of "Shadow of the Tomb
Raider" by around 25-30% according to its internal benchmark mode.
2020-01-09 10:49:19 -06:00
Marc Di Luzio
2e67906402 Remove unneeded includes 2019-06-01 10:57:27 +01:00
Marc Di Luzio
1b78d0dcf7 Restructure files and libraries
Rename a bunch of files to make the consistent
	Create two new subdirectories for common code, and utilities
2019-06-01 10:54:22 +01:00