Giter Club home page Giter Club logo

fastgame's Introduction

FastGame

This is a project I started for fun and for learning purposes. It allows the user to apply small system configuration tweaks that may(or may not) increase gaming performance. The kernel Process Events Connector is used to monitor creation and destruction of processes. When the kernel sends us the PID value of a recently created process we read the file /proc/PID/comm and if the process name matches the game executable name provided in the user interface a few settings are applied to the game process.

Application usage

When the window is opened it will show the value of the system parameters. This is a good moment to open the presets menu and saving the current settings in a profile named default or whatever name you prefer. This will make it easier to recover your system default settings while doing tests.

Once you have configured the parameters click on the Apply button in the window top left corner. After a few seconds an authentication window should be shown by your system. A few of the available settings can only be changed with root access. After authentication the settings that can be immediately applied will be applied. And a server that listens to the kernel Process Events Connector will be launched. This server applies to the game process settings like cpu affinity, priority scheduler, etc. It will be automatically finished once the main window is closed. So keep FastGame window open while playing!

If you want to apply environment variables it is necessary to launch the game with fastgame_launcher. In Steam all that you have to do is putting fastgame_launcher %command% in the launch options.

Features

First of all have in mind that there is no guarantee that the settings exposed by FastGame will improve your game performance. Think of FastGame as an easy way to test if they can help you. That being said these are the current settings that can be configured through FastGame:

  • Set Environment variables
  • Pass command line arguments to the game executable
  • Game cpu affinity configuration
  • Change the cpu frequency governor
  • Change the process niceness (autogroup supported)
  • Use /dev/cpu_dma_latency to avoid deep C-States
  • Apply the SCHED_BATCH priority scheduler to the game process
  • Apply the SCHED_RR priority scheduler to the wineserver process
  • Set the wineserver cpu affinity
  • Change the disk scheduler
  • Change the readahead and nr_requests values
  • Disable the disk add_random
  • Apply the Realtime IO priority to the game process
  • Set amdgpu performance level, power cap and irq affinity
  • Set Nvidia powermize and clock offset state
  • Configure the virtual memory cache pressure
  • Configure the virtual memory compaction proactiveness
  • Configuring transparent hugepages
  • Saving all the settings above to a preset file that can be easily loaded

Compilation

cd fastgame
cmake -B build
cmake --build build

fastgame's People

Contributors

vistaus avatar wwmm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastgame's Issues

Installation on Ubuntu 23.10 not straightforward

Hi WW, I am trying to install this but had to do several additional steps not mentioned in the installation steps. Before doing ninja, the meson build command will fail on ubuntu 23.10. What needs to be installed BEFORE are the following packages so far:

sudo apt install libgtkmm-4.0-dev libadwaita-1-dev libudisks2-dev
These 3 will cover at least meson finishing the build process

Then the ninja finishes everything but we still need:

ninja install
in order to install it systemwide.

But even after doing all of these, I get the following when executing fastgame:

fastgame: error while loading shared libraries: libfastgame_nvidia.so: cannot open shared object file: No such file or directory

Crash when trying to access hwmon kernel sysfs interface with Intel Haswell graphics (i5-4300U)

When trying to launch fastgame it fails with:

** (fastgame:120735): ERROR **: 15:10:31.292:
unhandled exception (type std::exception) in signal handler:
what: filesystem error: directory iterator cannot open directory: No such file or directory [/sys/class/drm/card0/device/hwmon/]

Trace/breakpoint trap (core dumped)

I'm running Archlinux, and there is no "hwmon" file.

$ uname -a Linux archlinux 5.9.6-zen1-1-zen #1 ZEN SMP PREEMPT Thu, 05 Nov 2020 21:00:51 +0000 x86_64 GNU/Linux

I'm using a Lenovo Thinkpad x240

# find /sys -name "*hwmon*"
/sys/kernel/tracing/events/hwmon
/sys/kernel/tracing/events/hwmon/hwmon_attr_show
/sys/kernel/tracing/events/hwmon/hwmon_attr_store
/sys/kernel/tracing/events/hwmon/hwmon_attr_show_string
/sys/kernel/debug/tracing/events/hwmon
/sys/kernel/debug/tracing/events/hwmon/hwmon_attr_show
/sys/kernel/debug/tracing/events/hwmon/hwmon_attr_store
/sys/kernel/debug/tracing/events/hwmon/hwmon_attr_show_string
/sys/class/hwmon
/sys/class/hwmon/hwmon4
/sys/class/hwmon/hwmon2
/sys/class/hwmon/hwmon0
/sys/class/hwmon/hwmon5
/sys/class/hwmon/hwmon3
/sys/class/hwmon/hwmon1
/sys/devices/platform/thinkpad_hwmon
/sys/devices/platform/thinkpad_hwmon/hwmon
/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon4
/sys/devices/platform/coretemp.0/hwmon
/sys/devices/platform/coretemp.0/hwmon/hwmon5
/sys/devices/virtual/thermal/thermal_zone0/hwmon0
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/hwmon1
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08/PNP0C09:00/ACPI0003:00/power_supply/AC/hwmon2
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08/PNP0C09:00/PNP0C0A:01/power_supply/BAT1/hwmon3
/sys/bus/platform/devices/thinkpad_hwmon
/sys/bus/platform/drivers/thinkpad_hwmon
/sys/bus/platform/drivers/thinkpad_hwmon/thinkpad_hwmon
/sys/module/thinkpad_acpi/drivers/platform:thinkpad_hwmon
$ ls /sys/class/drm/card0/device/
ari_enabled               consumer:0000:00:03.0  driver_override  i2c-1  link           numa_node  resource0     subsystem
boot_vga                  d3cold_allowed         drm              i2c-2  local_cpulist  power      resource2     subsystem_device
broken_parity_status      device                 enable           i2c-3  local_cpus     remove     resource2_wc  subsystem_vendor
class                     devspec                firmware_node    i2c-4  modalias       rescan     resource4     uevent
config                    dma_mask_bits          graphics         i2c-5  msi_bus        reset      revision      vendor
consistent_dma_mask_bits  driver                 i2c-0            irq    msi_irqs       resource   rom

IOT crash (Arch Linux)

This occurs with both a system installation via pacman and a manual build built myself.

Terminal output:

fastgame

(fastgame:2040741): Gtk-WARNING **: 21:14:33.419: Theme parser error: gtk-dark.css:5688:3-9: No property named "height"

(fastgame:2040741): Gtk-WARNING **: 21:14:33.432: Theme directory actions/16-Dark of theme ZafiroCircle has no size field


(fastgame:2040741): Adwaita-WARNING **: 21:14:34.013: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.
/usr/include/c++/13.1.1/bits/stl_vector.h:1125: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
[1]    2040741 IOT instruction (core dumped)  fastgame

And yes, I have indeed tried running sudo glib-compile-schemas /usr/share/glib-2.0/schemas like mentioned in #4.

Not launching - Old library

Hey there,
I am having some problems with launching fastgame: fastgame: error while loading shared libraries: libboost_filesystem.so.1.75.0: cannot open shared object file: No such file or directory
When listing the /usr/lib directory, the library now has the version 1.76.0, so please update FG!
Thanks!

Not open on Ubuntu- Mate 22.04LTS

Hi, i have a Problem with this Error- Massages in the Mate- Terminal.
If i start fastgame from Terminal it says:

(fastgame:19050): Adwaita-WARNING **: 23:05:12.568: No known Yaru accent 'MATE'

(fastgame:19050): GLib-GIO-ERROR **: 23:05:12.569: Settings schema 'com.github.wwmm.fastgame' is not installed
Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)

then it close...

Can You please help me? I don't know what i did wrong...

NVIDIA section's "Mode" option is empty

As the title says. I have a GTX 980, and in the previous version of the fastgame launcher's UI the "Mode" section showed different performance modes for the GPU. Now that option is just empty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.