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

NAME

6       gamemoded - optimises system performance on demand
7

SYNOPSIS

9       gamemoded [-d] [-l] [-h] [-v]
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       -d      Run the daemon as a separate process (daemonize it)
30
31       -l      Log to syslog
32
33       -r      Request gamemode and wait for any signal
34
35       -s      Query the current status of gamemode
36
37       -h      Print help text
38
39       -v      Print the version
40
41

USAGE

43       libgamemodeauto.so.0  can  be  pre-loaded  into  any program to request
44       gamemoded begin or end the mode, like so:
45
46           LD_PRELOAD=/usr/\$LIB/libgamemodeauto.so.0 ./game
47
48       Or by setting the steam launch options for a game:
49
50           LD_PRELOAD=$LD_PRELOAD:/usr/\$LIB/libgamemodeauto.so.0 %command%
51
52       The gamemode_client.h header can be used by  developers  to  build  the
53       requests into a program:
54
55           #include "gamemode_client.h"
56
57               if( gamemode_request_start() < 0 ) {
58                   fprintf( stderr, "gamemode request failed: %s\n", gamemode_error_string() )
59               }
60
61               /* run the process */
62
63               /* Not required, gamemoded can clean up after game exits */
64               gamemode_request_end();
65
66       Atlernatively  developers  can define GAMEMODE_AUTO to mimic the behav‐
67       iour of libgamemodeauto.so.0:
68
69           #define GAMEMODE_AUTO
70           #include "gamemode_client.h"
71
72       Or, distribute libgamemodeauto.so.0 and either link with -lgamemodeauto
73       or inject it as above with LD_PRELOAD.
74
75

CONFIG

77       gamemoded  will  load  and  merge  gamemode.ini config files from these
78       directories in the following order:
79
80           /usr/share/gamemode/
81           /etc/
82           $XDG_CONFIG_HOME or $HOME/.config/
83           $PWD
84
85       Behaviour of the config file can be explained by presenting a commented
86       example:
87
88           [general]
89           ; The reaper thread will check every 10 seconds for exited clients
90           reaper_freq=10
91
92           ; The desired governor is used when entering GameMode instead of "performance"
93           desiredgov=performance
94           ; The default governer is used when leaving GameMode instead of restoring the original value
95           defaultgov=powersave
96
97           ; By default, GameMode changes the scheduler policy to SCHED_ISO with 4 or more CPU cores,
98           ; force enable or disable with "on" or "off"
99           softrealtime=auto
100
101           ; By default, GameMode renices the client to -4, you can put any value between 1 and 20 here,
102           ; the value will be negated and applied as a nice value
103           renice = 4
104
105           [filter]
106           ; If "whitelist" entry has a value(s)
107           ; gamemode will reject anything not in the whitelist
108           ;whitelist=RiseOfTheTombRaider
109
110           ; Gamemode will always reject anything in the blacklist
111           blacklist=HalfLife3
112               glxgears
113
114           [custom]
115           ; Custom scripts (executed using the shell) when gamemode starts and ends
116           start=notify-send "GameMode started"
117               /home/me/bin/stop_ethmining.sh
118
119           end=notify-send "GameMode ended"
120               /home/me/bin/start_ethmining.sh
121
122       This  config  file will currently reject any games that match HalfLife3
123       or glxgears, but can be modified to only accept RiseOfTheTombRaider  by
124       removing the semicolon preceding the fourth line.
125
126

SEE ALSO

128       systemd(1)
129
130

ABOUT

132       GameMode   source  can  be  found  at  https://github.com/FeralInterac
133       tive/gamemode.git
134
135

AUTHOR

137       Feral Interactive (linux-contact@feralinteractive.com)
138
139
140
1411.2                              21 July 2018                     gamemoded(8)
Impressum