1gamemoded(8)                  gamemoded man page                  gamemoded(8)
2
3
4

NAME

6       gamemoded - daemon that optimises system performance on demand
7

SYNOPSIS

9       gamemoded [OPTIONS...]
10

DESCRIPTION

12       GameMode is a daemon/lib combo for Linux that allows games to request a
13       set of optimisations be temporarily applied to the host OS.
14
15       The design has a clear cut abstraction  between  the  host  daemon  and
16       library (gamemoded and libgamemode), and the client loaders (libgamemo‐
17       deauto and gamemode_client.h) that allows for safe usage without worry‐
18       ing  about whether the daemon is installed or running. This design also
19       means that while the host  library  currently  relies  on  systemd  for
20       exchanging  messages  with the daemon, it's entirely possible to imple‐
21       ment other internals that still work with the same clients.
22
23       GameMode was designed primarily as a stop-gap solution to problems with
24       the  Intel and AMD CPU powersave or ondemand governors, but is intended
25       to be expanded beyond just CPU governor states, as there are  a  wealth
26       of automation tasks one might want to apply.
27

OPTIONS

29       -r[PID], --request=[PID]
30               Toggle  gamemode  for  process.   When  no  PID given, requests
31               gamemode and pauses
32
33       -s[PID], --status=[PID]
34               Query the status of gamemode for process  When  no  PID  given,
35               queries the status globally
36
37       -d, --daemonize
38               Run the daemon as a separate process (daemonize it)
39
40       -l, --log-to-syslog
41               Log to syslog
42
43       -h, --help
44               Print help text
45
46       -t, --test
47               Run diagnostic tests on the current installation
48
49       -v, --version
50               Print the version
51
52

USAGE

54       libgamemodeauto.so.0  can  be  pre-loaded  into  any program to request
55       gamemoded begin or end the mode. See gamemoderun(1) for details.
56
57       The gamemode_client.h header can be used by  developers  to  build  the
58       requests into a program:
59
60           #include "gamemode_client.h"
61
62               if( gamemode_request_start() < 0 ) {
63                   fprintf( stderr, "gamemode request failed: %s\n", gamemode_error_string() )
64               }
65
66               /* run the process */
67
68               /* Not required, gamemoded can clean up after game exits */
69               gamemode_request_end();
70
71       Atlernatively  developers  can define GAMEMODE_AUTO to mimic the behav‐
72       iour of libgamemodeauto.so.0:
73
74           #define GAMEMODE_AUTO
75           #include "gamemode_client.h"
76
77       Or, distribute libgamemodeauto.so.0 and either link with -lgamemodeauto
78       or inject it as above with LD_PRELOAD.
79
80

CONFIG

82       gamemoded  will  load  and  merge  gamemode.ini config files from these
83       directories in the following order:
84
85           /usr/share/gamemode/
86           /etc/
87           $XDG_CONFIG_HOME or $HOME/.config/
88           $PWD
89
90       Behaviour of the config file can be explained by presenting a commented
91       example:
92
93           [general]
94           ; The reaper thread will check every 5 seconds for exited clients, for config file changes, and for the CPU/iGPU power balance
95           reaper_freq=5
96
97           ; The desired governor is used when entering GameMode instead of "performance"
98           desiredgov=performance
99           ; The default governor is used when leaving GameMode instead of restoring the original value
100           ;defaultgov=powersave
101
102           ; The iGPU desired governor is used when the integrated GPU is under heavy load
103           igpu_desiredgov=powersave
104           ; Threshold to use to decide when the integrated GPU is under heavy load.
105           ; This is a ratio of iGPU Watts / CPU Watts which is used to determine when the
106           ; integraged GPU is under heavy enough load to justify switching to
107           ; igpu_desiredgov.  Set this to -1 to disable all iGPU checking and always
108           ; use desiredgov for games.
109           igpu_power_threshold=0.3
110
111           ; GameMode can change the scheduler policy to SCHED_ISO on kernels which support it (currently
112           ; not supported by upstream kernels). Can be set to "auto", "on" or "off". "auto" will enable
113           ; with 4 or more CPU cores. "on" will always enable. Defaults to "off".
114           softrealtime=off
115
116           ; GameMode can renice game processes. You can put any value between 0 and 20 here, the value
117           ; will be negated and applied as a nice value (0 means no change). Defaults to 0.
118           renice=0
119
120           ; By default, GameMode adjusts the iopriority of clients to BE/0, you can put any value
121           ; between 0 and 7 here (with 0 being highest priority), or one of the special values
122           ; "off" (to disable) or "reset" (to restore Linux default behavior based on CPU priority),
123           ; currently, only the best-effort class is supported thus you cannot set it here
124           ioprio=0
125
126           ; Sets whether gamemode will inhibit the screensaver when active
127           ; Defaults to 1
128           inhibit_screensaver=1
129
130           [filter]
131           ; If "whitelist" entry has a value(s)
132           ; gamemode will reject anything not in the whitelist
133           ;whitelist=RiseOfTheTombRaider
134
135           ; Gamemode will always reject anything in the blacklist
136           ;blacklist=HalfLife3
137           ;    glxgears
138
139           [gpu]
140           ; Here Be Dragons!
141           ; Warning: Use these settings at your own risk
142           ; Any damage to hardware incurred due to this feature is your responsibility and yours alone
143           ; It is also highly recommended you try these settings out first manually to find the sweet spots
144
145           ; Setting this to the keyphrase "accept-responsibility" will allow gamemode to apply GPU optimisations such as overclocks
146           ;apply_gpu_optimisations=0
147
148           ; The DRM device number on the system (usually 0), ie. the number in /sys/class/drm/card0/
149           ;gpu_device=0
150
151           ; Nvidia specific settings
152           ; Requires the coolbits extension activated in nvidia-xconfig
153           ; This corresponds to the desired GPUPowerMizerMode
154           ; "Adaptive"=0 "Prefer Maximum Performance"=1 and "Auto"=2
155           ; See NV_CTRL_GPU_POWER_MIZER_MODE and friends in https://github.com/NVIDIA/nvidia-settings/blob/master/src/libXNVCtrl/NVCtrl.h
156           ;nv_powermizer_mode=1
157
158           ; These will modify the core and mem clocks of the highest perf state in the Nvidia PowerMizer
159           ; They are measured as Mhz offsets from the baseline, 0 will reset values to default, -1 or unset will not modify values
160           ;nv_core_clock_mhz_offset=0
161           ;nv_mem_clock_mhz_offset=0
162
163           ; AMD specific settings
164           ; Requires a relatively up to date AMDGPU kernel module
165           ; See: https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html#gpu-power-thermal-controls-and-monitoring
166           ; It is also highly recommended you use lm-sensors (or other available tools) to verify card temperatures
167           ; This corresponds to power_dpm_force_performance_level, "manual" is not supported for now
168           ;amd_performance_level=high
169
170           [supervisor]
171           ; This section controls the new gamemode functions gamemode_request_start_for and gamemode_request_end_for
172           ; The whilelist and blacklist control which supervisor programs are allowed to make the above requests
173           ;supervisor_whitelist=
174           ;supervisor_blacklist=
175
176           ; In case you want to allow a supervisor to take full control of gamemode, this option can be set
177           ; This will only allow gamemode clients to be registered by using the above functions by a supervisor client
178           ;require_supervisor=0
179
180           [custom]
181           ; Custom scripts (executed using the shell) when gamemode starts and ends
182           ;start=notify-send "GameMode started"
183           ;    /home/me/bin/stop_ethmining.sh
184
185           ;end=notify-send "GameMode ended"
186           ;    /home/me/bin/start_ethmining.sh
187
188           ; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time.
189           ;script_timeout=10
190
191

SEE ALSO

193       gamemoderun(1), systemd(1)
194
195

ABOUT

197       GameMode   source  can  be  found  at  https://github.com/FeralInterac
198       tive/gamemode.git
199
200

AUTHOR

202       Feral Interactive (linux-contact@feralinteractive.com)
203
204
205
2061.6-dev                           4 May 2020                      gamemoded(8)
Impressum