Commit Graph

45 Commits

Author SHA1 Message Date
1a5dd8f93e Add note that there is an Ubuntu Cosmic package now available! 2019-02-06 16:35:37 +00:00
372a640d39 Add "gamemoderun", a wrapper bash script like "primusrun"
This should remove a point of failure currently where users fail to set LD_PRELOAD correctly, or the path is wrong somehow.

	FWIW: The old method still works, and I've noted that in the README.
2019-02-05 21:16:02 +00:00
f13e098fd8 Update the explanation at the start 2019-01-31 19:40:08 +00:00
5db6555f23 Re-order the install dependencies title 2019-01-31 19:31:52 +00:00
020e1464db Make the package manager part clearer 2019-01-31 19:31:05 +00:00
d6dd30d544 More minor edits to README
* Add titles to features
	* Remove now defunct "Users" title
	* Add title to Integrations
	* Move up CPU overclocking warning into Features
2019-01-31 19:28:24 +00:00
055ac95c59 Add titles to building and installing 2019-01-31 19:23:03 +00:00
7b5fcfac1d Add the travis status 2019-01-31 19:19:52 +00:00
d3e298f710 A big README refactor
* Move the explanation of features down
	* Move the explanation of developer info down
	* Move configuration info up
	* Simplify build instructions
2019-01-31 19:16:19 +00:00
b64e143753 Merge pull request #85 from terencode/master
Add with-pam-group meson option
2018-12-10 09:53:29 +00:00
06ec97f968 Add with-pam-group meson option
This adds 10-gamemode.conf as a limits.d configuration file and with-pam-group meson option to allow renicing as an unpriviledged user being part of the specified group.

Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-12-07 21:50:58 +01:00
6759b5653e gamemode: Apply io priority to clients
This commit allows changing the io priority of the client to a value
specified in the configuration file. That can possibly reduce lags or
latency when a game has to load assets on demand and you have background
IO activity running (or other concurrent IO).

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-10-03 04:24:56 +02:00
10333cfb10 README: Mention Fedora packages
GameMode is now in the official Fedora repository.
2018-09-29 09:27:48 +01:00
9bbe8fb4bf README: Mention Gentoo support
Gentoo has merged the gamemode ebuild into portage as of:
https://github.com/gentoo/gentoo/pull/9700#issuecomment-423886373

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-09-24 09:13:24 +02:00
ceb476052d Update to version 1.2 2018-07-21 09:33:32 +01:00
c3dce81a57 Further formatting fixes 2018-07-13 10:32:34 +01:00
e3eb136dbe Fix formatting 2018-07-13 10:31:57 +01:00
b504863a60 Document how to uninstall
Issue #59.
2018-07-13 10:30:55 +01:00
154496dd2a README.md: use version library in examples
Now that versioned libraries are created, use that in the examples
provided.
2018-07-02 14:14:47 +02:00
2c1525cf34 Added build notes for the git master
The build instructions here only cater for release 1.1.
This adds in build notes for the master branch.
2018-06-21 05:52:03 +03:00
af51844069 docs: Add a warning about potential resource starvation
Warn the user about adjusting `SCHED_ISO` to too high CPU usage values
as it may render the OS unresponsive.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-06-10 10:07:23 +02:00
b52fe148e6 docs: Document priority inversion caveats
Depending on the local system architecture and the game architecture,
changes to the scheduling may result in priority inversion which has
counter-intuitive effects on performance. Let's document these to give
the user a chance to detect and fix this problem.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-06-10 09:38:57 +02:00
8425292e92 config: Allow renice configuration
This commit adds configuration support for the renice value and amends
documentation and examples. This commit by itself does nothing, the
following commit is needed to actually apply the new settings.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-06-10 09:33:02 +02:00
0df077ab64 Leverage soft real time capabilities
Kernels that support SCHED_ISO scheduling policy can give processes soft
real time support. This improves latency without compromising system
stability. See https://lwn.net/Articles/720227/.

This commit adds support for setting this policy with a safe fall back if
kernel support is lacking by just ignoring the error condition.

Additionally, it also tries to raise the nice priority of the game to -4
to give it a slight IO and CPU priority over other background processes.
This needs PAM adjustments to allow users raising priority to certain
levels. If it doesn't work, the fall back strategy is also ignoring the
error condition. See /etc/security/limits.conf.

Kernels that currently support SCHED_ISO include kernels with Con
Kolivas MuQSS patchset (likely the CK patchset). This patchset is
generally recommended for desktop machines but usually not found in
standard distribution kernels due to lack of widespread stability tests.

Signed-off-by: Kai Krakow <kai@kaishome.de>
2018-05-23 22:23:42 +02:00
edcefb3133 added info about overclocking (#49)
* added info about overclocking
2018-05-11 15:12:25 +01:00
da58061945 Add a note for dbus-user-session as seen in issues like #48 2018-05-11 08:59:51 +01:00
3d34444d79 Merge branch 'master' into 1.1RC 2018-05-01 15:45:57 +01:00
8bd9587e80 Provide a cascaded merge-overwrite config approach for #6
gamemoded will now load and merge settings from the following locations - arrays will merge and single settings will overwrite.

	1. /usr/share/gamemode/
	2. /etc/
	3. $XDG_CONFIG_HOME or $HOME/.config/
	4. $PWD
2018-05-01 15:42:54 +01:00
b8b2b0415e Update to 1.1 ready for release 2018-04-25 15:50:05 +01:00
3eea07255e Add gamemode_query_status and teach gamemoded '-s'
This allows the client to query the daemon about the status of gamemode.

	Returns the following:
		 0 if gamemode is inactive
		 1 if gamemode is active
		 2 if gamemode is active and this client is registered
		-1 if the query failed

	Passing -s to gamemoded will simply query and print the current status.

	Allows for more comprehensive testing when using 'gamemoded -r' as well as more reactionary program behaviour
2018-04-25 14:51:38 +01:00
03ee174fe6 Exclude submodules from the format suggestion 2018-04-25 14:45:51 +01:00
3a5050b175 Update README.md 2018-04-24 17:23:02 +01:00
d26aac7147 Add support for user defined local script plugins
A much requested feature, this allows for providing custom scripts in the config file. An example in the man page is below and would trigger both a system notification, and allow control over a background crypto mining script automatically in gamemode.

	[custom]
	; Custom scripts (executed using the shell) when gamemode starts and ends
	start=notify-send "GameMode started"
	    /home/me/bin/stop_ethmining.sh

	end=notify-send "GameMode ended"
	    /home/me/bin/start_ethmining.sh

	Scripts are run with system() and do not have any special privilages, as with the rest of the daemon, custom scripts that require root will need their own permissions set up externally.

	This commit also renames two defines as they needed to be moved to the public interface.
2018-04-24 16:59:17 +01:00
14d671214f Add "reaper_freq" config setting in the "general" section
This simply allows control over the reaper thread frequency.

	Defaults to 5 as before.
2018-04-24 14:37:39 +01:00
c2432d6182 Add git to the install dependencies as seen in #36 2018-04-24 13:43:44 +01:00
a5b0198ceb doc/examples: remove 'ninja' as explicit dep (#4)
as it's already required by meson.
Also use the default unit file path (/usr/lib/systemd/user/) for
packaged versions. /etc/systemd/user is intended for manually installed
services.

arch-meson is just a Meson wrapper with correct arch packaging prefixes set.
2018-04-13 10:28:00 +01:00
a5ceeaaa28 Update README.md
* Install off the 1.0 tag not master
* Generally remove some headers to clean up the view on GitHub
* Link to contributors page as we now have more than 2
2018-04-13 10:24:48 +01:00
53eece339c README: added Fedora build requirements.
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
2018-04-11 10:14:33 +01:00
187364ad5d Update README.md
Add a note about distribution packages being preferable.
2018-04-10 14:59:21 +01:00
4f14c807ba 1.0: Finalised for release
Updating the README.md to bring it ready for wider release:
* Removed some points that were more implementation details
* Added Contributions section
* Simplified the usage section
* Expanded initial explanation
* Fixed steam launch command to allow the overlay to still work

Others:
* Mark as 1.0
* Update the license file for 2018
2018-04-04 10:06:23 +01:00
759cbc3c40 Add config file parsing
Checks for a gamemode.ini in /usr/share/gamemode/ (or in the cwd for debugging)

	Currently allows for blacklisting and whitelisting clients based on rudimentary needle-haystack executable name checks

	See the example/gamemode.ini file for expected syntax

	Using the BSD licensed inih library (with additional meson.build file)
2018-03-23 16:59:15 +00:00
73fb3e97e6 Update README.md for 0.2 release
Add pkg-config for ubuntu
	Suggest using bootstrap script
	Change TODO section into a planned features section
	Add changelog file
2018-03-23 16:59:01 +00:00
9e36ffe9f9 Use correct LIB escaping for LD_PRELOAD
This ensures we use the architecture independent path in the environment
variable, allowing multiarch + multilib system paths to be respected.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2018-03-05 17:32:02 +00:00
ee1c51d0b0 Add clang format file
This is a slightly modified version of Ikey's format for usysconf found here: https://github.com/solus-project/usysconf/blob/master/.clang-format

Modifications are to change to tab indentation, and tab/indent widths of 4
You'll never please everyone, but I find tabs for indentation is the most pragmatic approach to keeping most people happy about indent length arguments.
2018-03-05 17:32:01 +00:00
c459c05076 Initial 0.1 commit
This is a small daemon/libary to enable games to request a
performance "game mode" from the system.

Currently only implemented to upgrade the CPU governor and
automatically downgrade it once done.

A game only needs to load libgamemodeauto to activate the request.
Which means an LD_PRELOAD can be applied to any game to activate
the mode as needed.

However gamemode_client.h can be used to manually activate/deactivate
the mode as needed, and also perform error checking.

The libs are miminal loaders to call into an installed libgamemode
which, if the daemon is installed and running, will send through
the equivelant game mode request, and magic will happen.

See the README.md for more details.

Currently licensed under the BSD 3 clause license.
2018-03-05 17:32:01 +00:00