gamemoded.1 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. .\" Manpage for gamemoded.
  2. .\" Contact linux-contact@feralinteractive.com to correct errors or typos.
  3. .TH gamemoded 1 "6 March 2018" "0.3" "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 \-h
  21. Print help text
  22. .TP 8
  23. .B \-v
  24. Print the version
  25. .SH USAGE
  26. \fBlibgamemodeauto.so\fR can be pre-loaded into any program to request \fBgamemoded\fR begin or end the mode, like so:
  27. .RS 4
  28. LD_PRELOAD=/usr/\e$LIB/libgamemodeauto.so \./game
  29. .RE
  30. Or by setting the steam launch options for a game:
  31. .RS 4
  32. LD_PRELOAD=$LD_PRELOAD:/usr/\e$LIB/libgamemodeauto.so %command%
  33. .RE
  34. The \fBgamemode_client.h\fR header can be used by developers to build the requests into a program:
  35. .RS 4
  36. .nf
  37. #include "gamemode_client.h"
  38. if( gamemode_request_start() < 0 ) {
  39. fprintf( stderr, "gamemode request failed: %s\\n", gamemode_error_string() )
  40. }
  41. /* run the process */
  42. /* Not required, gamemoded can clean up after game exits */
  43. gamemode_request_end();
  44. .fi
  45. .RE
  46. Atlernatively developers can define \fBGAMEMODE_AUTO\fR to mimic the behaviour of \fBlibgamemodeauto.so\fR:
  47. .RS 4
  48. .nf
  49. #define GAMEMODE_AUTO
  50. #include "gamemode_client.h"
  51. .fi
  52. .RE
  53. Or, distribute \fBlibgamemodeauto.so\fR and either link with \fB\-lgamemodeauto\fR or inject it as above with \fBLD\_PRELOAD\fR.
  54. .SH CONFIG
  55. \fBgamemoded\fR can be configured with a \fBgamemode.ini\fR file found in \fB/usr/share/gamemode/\fR. The daemon will load the config file on start-up if it exists.
  56. Behaviour of the config file can be explained by presenting a commented example:
  57. .RS 4
  58. .nf
  59. [filter]
  60. ; If "whitelist" entry has a value(s)
  61. ; gamemode will reject anything not in the whitelist
  62. ;whitelist=RiseOfTheTombRaider
  63. ; Gamemode will always reject anything in the blacklist
  64. blacklist=HalfLife3
  65. glxgears
  66. .fi
  67. .RE
  68. This config file will currently reject any games that match \fIHalfLife3\fR or \fIglxgears\fR, but can be modified to only accept \fIRiseOfTheTombRaider\fR by removing the semicolon preceding the fourth line.
  69. .SH SEE ALSO
  70. systemd(1)
  71. .SH ABOUT
  72. GameMode source can be found at \fIhttps://github.com/FeralInteractive/gamemode.git\fR
  73. .SH AUTHOR
  74. Feral Interactive (linux-contact@feralinteractive.com)