70 Commits

Author SHA1 Message Date
MithicSpirit
e75f2c3942 Support setting the platform profile
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.
2025-02-24 15:43:15 +00:00
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
mhmarf
fef538ba92
Update gamemode.ini (#490)
Clarify that user must be added to the gamemode group in order to make Core Parking work.
2024-08-01 14:22:16 +01:00
Henrik Holst
c7a4572d73 Update gamemode.ini
added info about and default value for the setting to enable and disable split lock mitigation
2023-12-05 11:31:16 +00:00
Ahsan Fayaz
b9e8448afe Replace crypto mining reference with folding@home
Based on the change originally made by @joelsgp in PR #417, but there
were issues with the original commit message:
- Used an emoji which may cause rendering issues in CLI tools
- Mentioned Bitcoin mining which is inaccurate and contained
unnecessary censorship
2023-12-04 18:12:22 +00:00
begin-theadventure
775c93001c [gamemode.ini] Add renice information about the user group. 2023-12-04 14:57:22 +00:00
Henrik Holst
3cabf9859d added info about suport for Intel E- and P-cores 2023-12-04 14:18:38 +00:00
Henrik Holst
c070604a22 added cpu core parking/pinning settings to gamemode.ini
added some info about the new cpu core parking and pinning settings in gamemode.ini
2023-12-04 14:18:38 +00:00
Stephan Lachnit
d8337aeb05 various variable naming improvements
This makes it more clear that libgamemode and libgamemodeauto are indeed libraries. Also, the misleading name `libgamemode_dep` has been renamed to `gamemode_dep`, which now also includes the dependency on libdl. The misleading `libgamemode_includes` variable name has also been changed.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-06-23 09:18:14 +01:00
RickAndTired
db7d52dbac Spelling / typo fix 2020-05-27 10:50:17 +01:00
Stephan Lachnit
43911a8919 install example config
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-12 19:25:57 +01:00
Stephan Lachnit
e1ae78e346 install example
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-12 19:25:57 +01:00
Stephan Lachnit
f7a4a6ccfe expose dependency objects for libs
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-12 19:25:57 +01:00
Stephan Lachnit
2fb62e34fa fix double spaces in example
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-12 19:25:57 +01:00
Stephan Lachnit
1ca9b727c3 remove some old example files
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-11 12:30:15 +01:00
Stephan Lachnit
695f7e565f Add return values to example
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-06 14:04:06 +01:00
Anjune
29b4148a00 Make system revert to previous governor instead of "powersave"
See issue 214.
2020-05-06 11:32:10 +01:00
Stephan Lachnit
094905f7f8 rename example to gamemode-simulate-game
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-05-06 11:02:29 +01:00
Ahsan Fayaz
40702d3fed Update version back to 1.6 post-release 2020-03-03 16:35:37 +00:00
Ahsan Fayaz
616dca659a Update version to 1.5.1 2020-03-03 16:18:48 +00:00
Ahsan Fayaz
065454bb4e Update version to 1.6 post-release 2020-01-22 14:51:00 +00:00
Ahsan Fayaz
d58c59c183 Update version to 1.5 2020-01-22 14:19:26 +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
Alex Smith
24687f960b Update version to 1.5-dev post-release 2019-07-21 10:39:11 +01:00
Alex Smith
acb57735fc Update version to 1.4 2019-07-21 10:24:18 +01:00
Marc Di Luzio
c276f760c7 Add comment about the reaper thread dealing with config file changes 2019-05-19 11:15:47 +01:00
Alex Smith
95c365076f Update to version 1.4-dev post-release 2019-03-15 16:11:57 +00:00
Alex Smith
10a31f8dec Update copyright years to 2019 2019-03-14 16:59:30 +00:00
Alex Smith
5ee2f3c06a Adjust reaper_freq to match the default value set in code 2019-03-14 15:58:28 +00:00
Alex Smith
4306660918 Adjust renice documentation 2019-03-14 15:11:10 +00:00
Alex Smith
2ab46df4c3 Disable softrealtime (SCHED_ISO) and renice by default
SCHED_ISO is not supported by upstream kernels, so don't try to use this by
default since for most users it will result in an error log that trying to
set the scheduling policy fails.

Without extra system configuration, we will also not have permission to renice
processes by default, so out of the box doing this will fail as well.

Users that wish to use these features can enable them from the config once
they have configured their system appropriately.
2019-03-14 15:00:49 +00:00
Marc Di Luzio
fec32ac53d Remove the nv_perf_level config option and figure it out programmatically
This also fixes the instances in testing where we don't have the nv overclock in use, but we do have the mode set

	Solves issues explaining the what the perf_level actually meant, and future proofs for any PR that wants to set individual perf levels
2019-03-10 15:19:34 +00:00
Marc Di Luzio
5e5cae31d3 Explain a little more about nv_perf_level
We think this was a little confusing, so explain some more.
2019-03-10 12:38:31 +00:00
Marc Di Luzio
eb9bb0cdf7 Add notes on values for nv_powermizer_mode
Instead of just suggesting values
2019-03-10 11:54:54 +00:00
Alex Smith
26ec6ad2b4 Document script_timeout 2019-03-10 10:49:06 +00:00
Marc Di Luzio
834a18aab4 Implement nv_powermizer_mode option to allow setting the Nvidia powermizer mode 2019-03-10 10:32:08 +00:00
Marc Di Luzio
9ade4481c3 Change AMD overclocking to simply be setting the power_dpm_force_performance_level file for now
This covers the MVP for now, and simply allows pinning the power level to "high"

	Full overclocking set up is somewhat more complicated, and it'll be better to implement that at the same time as the same for Nvidia, where we're currently only really setting the top end power level
2019-03-10 10:32:08 +00:00
Alex Smith
3c28e84700 Merge pull request #105 from mdiluz/auto-detect-vendor
Detect the GPU vendor automatically
2019-03-04 08:43:58 +00:00
Marc Di Luzio
a5543880f3 Clarify ini file description
As requested in #105
2019-03-01 18:13:58 +00:00
Marc Di Luzio
1430c0b831 Implement supervisor features using new config variables
This allows direct control over who can make requests on behalf of other processes

	require_supervisor can also be used to allow a supervisor to take direct control of gamemode on the system (perhaps a GUI, or game launcher)
2019-02-21 17:34:20 +00:00
Marc Di Luzio
0847d3b452 Remove the vendor config value in prep for it to be auto-detected 2019-02-21 17:26:14 +00:00
Marc Di Luzio
c7da9ff9ea Reword advice in the example ini file to clear up confusion with the PCI ID 2019-02-15 18:20:52 +00:00
Marc Di Luzio
142b2fb32d Also add nv_perf_level for nvidia (needed as a parameter to nvidia-xsettings) 2019-02-12 08:55:23 +00:00
Marc Di Luzio
6b268e8349 Convert "apply_gpu_optimisations" to a string with a special key 2019-02-12 08:55:23 +00:00
Marc Di Luzio
7bdbc1adc5 Add more helper comments to the config ini 2019-02-12 08:55:23 +00:00
Marc Di Luzio
ad2c218ab3 Allow setting the device value with a hex string
Also stops erroring on 0 value longs
2019-02-12 08:55:23 +00:00
Marc Di Luzio
cee2351c55 Add config for vendor and device 2019-02-12 08:55:23 +00:00
Marc Di Luzio
b1bf33d386 Add config parameters for GPU clocking 2019-02-12 08:55:23 +00:00
Marc Di Luzio
ba49055519 Set up inhibit_screensaver config option to disable the feature 2019-02-03 15:45:11 +00:00
Kai Krakow
ebf177bebe daemon-config: Add ioprio configuration option
Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-10-01 19:34:46 +02:00