mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 07:37:21 +02:00

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.
29 lines
534 B
Bash
Executable File
29 lines
534 B
Bash
Executable File
#!/bin/bash
|
|
# Simple bootstrap script to build and run the daemon
|
|
set -e
|
|
|
|
# Echo the rest so it's obvious
|
|
set -x
|
|
meson --prefix=/usr build
|
|
cd build
|
|
ninja
|
|
|
|
# Verify user wants to install
|
|
set +x
|
|
read -p "Install to /usr? [Yy] " -r
|
|
[[ $REPLY =~ ^[Yy]$ ]]
|
|
set -x
|
|
|
|
sudo ninja install
|
|
|
|
# Verify user wants to run the daemon
|
|
set +x
|
|
read -p "Enable and run the daemon? [Yy] " -r
|
|
[[ $REPLY =~ ^[Yy]$ ]]
|
|
set -x
|
|
|
|
systemctl --user daemon-reload
|
|
systemctl --user enable gamemoded
|
|
systemctl --user start gamemoded
|
|
systemctl --user status gamemoded
|