gamemoded.8.in 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. .\" Manpage for gamemoded.
  2. .\" Contact linux-contact@feralinteractive.com to correct errors or typos.
  3. .TH gamemoded 8 "15 March 2019" "1.3.1" "gamemoded man page"
  4. .SH NAME
  5. gamemoded \- optimises system performance on demand
  6. .SH SYNOPSIS
  7. \fBgamemoded\fR [\fB\-d\fR] [\fB\-l\fR] [\fB\-h\fR] [\fB\-v\fR]
  8. .SH DESCRIPTION
  9. \fBGameMode\fR is a daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS.
  10. The design has a clear cut abstraction between the host daemon and library (\fBgamemoded\fR and \fBlibgamemode\fR), and the client loaders (\fBlibgamemodeauto\fR and \fBgamemode_client.h\fR) that allows for safe usage without worrying about whether the daemon is installed or running. This design also means that while the host library currently relies on systemd for exchanging messages with the daemon, it's entirely possible to implement other internals that still work with the same clients.
  11. \fBGameMode\fR was designed primarily as a stop-gap solution to problems with the Intel and AMD CPU powersave or ondemand governors, but is intended to be expanded beyond just CPU governor states, as there are a wealth of automation tasks one might want to apply.
  12. .SH OPTIONS
  13. .TP 8
  14. .B \-d
  15. Run the daemon as a separate process (daemonize it)
  16. .TP 8
  17. .B \-l
  18. Log to syslog
  19. .TP 8
  20. .B \-r
  21. Request gamemode and wait for any signal
  22. .TP 8
  23. .B \-s
  24. Query the current status of gamemode
  25. .TP 8
  26. .B \-h
  27. Print help text
  28. .TP 8
  29. .B \-t
  30. Run diagnostic tests on the current installation
  31. .TP 8
  32. .B \-v
  33. Print the version
  34. .SH USAGE
  35. \fBlibgamemodeauto.so.0\fR can be pre-loaded into any program to request \fBgamemoded\fR begin or end the mode, like so:
  36. .RS 4
  37. gamemoderun \./game
  38. .RE
  39. Or by setting the steam launch options for a game:
  40. .RS 4
  41. gamemoderun %command%
  42. .RE
  43. The library can be manually preloaded if needed:
  44. .RS 4
  45. LD_PRELOAD=$LD_PRELOAD:/usr/\e$LIB/libgamemodeauto.so.0 ./game
  46. .RE
  47. The \fBgamemode_client.h\fR header can be used by developers to build the requests into a program:
  48. .RS 4
  49. .nf
  50. #include "gamemode_client.h"
  51. if( gamemode_request_start() < 0 ) {
  52. fprintf( stderr, "gamemode request failed: %s\\n", gamemode_error_string() )
  53. }
  54. /* run the process */
  55. /* Not required, gamemoded can clean up after game exits */
  56. gamemode_request_end();
  57. .fi
  58. .RE
  59. Atlernatively developers can define \fBGAMEMODE_AUTO\fR to mimic the behaviour of \fBlibgamemodeauto.so.0\fR:
  60. .RS 4
  61. .nf
  62. #define GAMEMODE_AUTO
  63. #include "gamemode_client.h"
  64. .fi
  65. .RE
  66. Or, distribute \fBlibgamemodeauto.so.0\fR and either link with \fB\-lgamemodeauto\fR or inject it as above with \fBLD\_PRELOAD\fR.
  67. .SH CONFIG
  68. \fBgamemoded\fR will load and merge \fBgamemode.ini\fR config files from these directories in the following order:
  69. .RS 4
  70. /usr/share/gamemode/
  71. .RE
  72. .RS 4
  73. /etc/
  74. .RE
  75. .RS 4
  76. $XDG_CONFIG_HOME or $HOME/.config/
  77. .RE
  78. .RS 4
  79. $PWD
  80. .RE
  81. Behaviour of the config file can be explained by presenting a commented example:
  82. .RS 4
  83. .nf
  84. @GAMEMODE_EXAMPLE_CONFIG@
  85. .fi
  86. .RE
  87. .SH SEE ALSO
  88. systemd(1)
  89. .SH ABOUT
  90. GameMode source can be found at \fIhttps://github.com/FeralInteractive/gamemode.git\fR
  91. .SH AUTHOR
  92. Feral Interactive (linux-contact@feralinteractive.com)