Package: guapow
guapowis an on-demand and auto performance optimizer for Linux applications. This project's name is an abbreviation forGuarana powder(Guaranáis a fruit from the Amazon rainforest with a highly caffeinated seed).Key featuresChanging applications priorities and CPU timesChanging applications IO prioritiesChanging applications CPU scheduling policies (including realtime)Changing CPU energy policyChanging applications CPU cores affinitiesChanging CPU cores frequency governorsChanging GPU power mode (onlyNvidiaandAMDdevices at the moment)Custom scriptingOptimization profilesAuto optimize all your Steam game library without having to edit Launch OptionsAnd more...IndexInstallationArch-based distrosOther distrosQuick start1. Starting the Optimizer service2. Testing guapow3. Using a profile file4. Auto-optimizing applications with the Watcher serviceOptimizationsChanging application nicenessChanging application I/O nicenessChanging application CPU schedulingChanging application CPU affinityChanging CPU cores frequency scaling governor (performance)Changing CPU cores energy policy level (full performance)Changing GPU power mode (performance)Disabling window compositorStopping applicationsExecuting custom commands and scriptsHiding mouse pointerDefining environment variablesTweaksLaunchersSteam gamesComponentsRunnerOptimizer serviceSettingsWatcher serviceMapping patternsBuilt-in patterns (steam)Ignoring processesSettingsCLIImproving optimizations timingTutorialsAuto-optimizing all your Steam gamesRoadmapDonationsInstallationArchLinux-based distrosDistribution:AUR packageInstalling withyay:yay -S guapowInstalling manually (requirespacmanandgitinstalled)git clone  https://aur.archlinux.org/guapow.git
cd guapow
makepkg -siOther distrosDistribution:PyPi packageRequiresPython 3.8 or higher(versions bellow have not been tested, but may work) andpipinstalledUbuntu 20.04 based-distros dependencies:sudo apt-get install python3 python3-pip python3-aiofiles python3-aiohttp python3-pycryptodomeInstallation:sudo pip3 install guapowQuick start1. Starting the Optimizer serviceAfter installingguapow, itsoptimizerservice must be started and enabled (the current definition requiressystemdinstalled). Theoptimizerservice is the component responsible to apply most of the available optimizations.To start and enable the service, you can use the utility toolguapow-clior do it manually (described below). Both methods requiresystemctlinstalled.Method 1: Starting and enabling withguapow-cliguapow-cli install-optimizer  # may require sudo for non-root usersMethod 2: Starting and enabling manuallyDownload the servicedefinition fileand move it to/usr/lib/systemd/systemTo start and enable it: typesystemctl enable --now guapow-opt.service(may requiresudofor non-root users)To check:if the service is running, typeps -Ao pid,comm | grep guapow-optthe service logs, type:journalctl -efu guapow-opt.service2.Testing guapowTo quickly testguapow, you have to use theguapowcommand to start and optimize a target application. The example below starts thevlcmedia player:GUAPOW_CONFIG="cpu.performance proc.nice=-1" guapow vlcThe environment variableGUAPOW_CONFIGshould be used to define the optimizations that must be applied when the target application starts. In the example above two were defined:cpu.performance: changes all CPUs frequency governors toperformance(for supported Intel cpus, also the energy policy level)proc.nice=-1: defines a CPU nice level for the started application. In simple words: a negative nice level will give more CPU priority and time for the application (more on thishere)Theguapowcommand is responsible to start a target application and requests the defined optimizations for it.How to check if the optimizations were applied ?Nice level:typeps -Ao comm,nice | grep vlcCPUs governors:typecat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governorCPU energy policies (supported Intel CPUs only):: typecat /sys/devices/system/cpu/cpu*/power/energy_perf_bias(values must be0)Optimizer service logs:typejournalctl -efu guapow-opt.serviceWhen you close the optimizedvlc, theoptimizerservice should rollback the CPU governors changes (use the commands above to re-checking)3. Using a profile fileInstead of defining the environment variableGUAPOW_CONFIGwith all the wanted optimization settings for every application, you can create a profile file.Theguapow-clitool can generate a few pre-defined profiles (that can be changed or removed later). To generate thedefaultprofile file, type the command:guapow-cli gen-profile defaultThis command should generate a file calleddefault.profilein~/.config/guapow(or/etc/guapowforrootusers)You can quickly check the file content by typing the following command:cat ~/.config/guapow/default.profile(orcat /etc/guapow/default.profile)To specify which profile should be used when callingguapow, you have to define the environment variableGUAPOW_PROFILE=profile_name(without the extension.profile). Example below:GUAPOW_PROFILE=default guapow vlcBy default, if you do not specify neither theGUAPOW_PROFILEvariable norGUAPOW_CONFIG, theguapowcommand assumes that you are requesting optimizations based on a profile nameddefault. In other words: the commandguapow vlcwould be equivalent toGUAPOW_PROFILE=default guapow vlcIf bothGUAPOW_PROFILEandGUAPOW_CONFIGwere defined,GUAPOW_PROFILEwill be ignored.Existing profile file priority:for non-root users:~/.config/guapow/{name}.profile>/etc/guapow/{name}.profilefor root users:/etc/guapow/{name}.profileIf a given profile file does not exist:if it is not nameddefault,guapowwill try to load a profile calleddefault.if thedefaultprofile does not exist, no optimization will be applied.4. Auto-optimizing applications with the Watcher serviceIf you are not willing to add theguapowcommand for every applicaton you want to optimize, you can the enable thewatcherservice.Thewatcherservice keeps looking for mapped applications/commands to be optimized, and request optimizations for them when they start.Two ways of starting and enabling it:a) Using theguapow-clitool:type:guapow-cli install-watcher(do not run this command withsudo, unless you areroot: this service ideally should be run at the user level)b)Manual installation:Download the servicedefinition fileand move it to~/.config/systemd/userTo start and enable it: typesystemctl enable --user --now guapow-opt.serviceTo check:if the service is running: typeps -Ao pid,comm | grep guapow-watchthe service logs: type:journalctl --user -efu guapow-watch.serviceTo define which applications should be watched, you have to create (or edit) thewatch.mapfile (located at~/.config/guapowor/etc/guapowforrootusers). If the file does not exist, create it before proceeding.Edit the file and add the following content:vlcAfter that, start thevlcapplication normally and check if the optimizations defined in thedefaultprofile were applied.To map applications to diferrent profiles, you can use the pattern:command_name=profile_name. Example:vlc=media
    tuxracer=gameIf the mapping line only contains the application name, thedefaultprofile is assumed.Thewatcherservice supports wild-cards and Python regex patterns for processes names or commands (more on thathere)OptimizationsThis topic describes every possible change that can be applied to the system and the target process to improve its performance and experience.They can be defined through:theGUAPOW_CONFIGenvironment variable (example)a profile file (example)Changing application nicenessThe nice level of a given application helps defining its CPU priority and time.Property definition:proc.nice=level(e.g:proc.nice=-2).The level is an integer within the range (-20 to 19).Negativevalues havehigher prioprity.The application nice level is changed after the target application starts (only once by default)Some applications change their nice level when initializing and can conflict with this optimization goal . To avoid such scenarios, it is possible to keep monitoring the target application's nice level through the propertyproc.nice.watch(orproc.nice.watch=true).The monitoring interval can be changed on the Optimizer servicesettings(propertynice.check.interval).It is possible add a delay for the renicing task using the propertyproc.nice.delay=secondsThesecondsmust be an integer (proc.nice.delay=1) or float (proc.nice.delay=0.5) higher than zero.By default, applications generally start with a nice level of0(-20its intended for very important system tasks).Changing application I/O nicenessEvery time your application needs to write or read something from the disk, it competes with other applications.The applications I/O needs are split into classes. The supported classes are described below:best_effort: default class. Divided in 8 levels (from 0 to 7). Lower levels have higher priority (e.g: 0 > 1).idle: for applications that should only perform I/O operations when no other application is doing so.realtime: first access to the disk. Divided in 8 levels (likebest_effort). Not allowed for non-root users.This optimization requires theionicecommand installed.Property definition:proc.io.class=class_name(e.g:proc.io.class=best_effort)proc.io.nice=level: an integer within 0 and 7.0is thedefaultvalue for classes supporting priority.  (e.g:proc.io.nice=1)The application I/O niceness is changed after the target application starts.The application IO class and priority can be checked though the command:ionice -p pidChanging application CPU schedulingApplications CPU scheduling behavior are split into policies.The supported policies are described below:other: default CPU time-sharing scheduling.idle: should be defined for applications with very low priority.batch: should be defined for non-interactive CPU-intensive applications.fifo: should be defined for very important applications. A FIFO application will lock the CPUs until it finishes to execute the demanded instructions. This policy is divided into priority groups from 1 to 99. Higher values = higher priority.rr(round-robin): similar tofifo, but the applications have a limited time slice to execute with others of the same policy and priority.The policiesfifoandrrare designed forrealtimeapplications and have higher priorities than the others. Applications associated with these policies can interrupt other running processes in order to execute. They should be used with care, since they can lock the entire system.Properties definitions:proc.policy=policy_name(e.gproc.policy=rr)proc.policy.priority=value: value must be an integer between1and99(only supported byfifoandrr)The application CPU scheduling is changed after the target application starts.Changing application CPU affinityCPU affinity means the instructions requested by a given application will be executed by determined CPU cores.Some applications performance can be improved when tied to less CPU cores, while keeping the other cores free for other tasks (like graphics rendering).Property definition:proc.affinity=cpuorproc.affinity=cpu0,cpu1Example 1 (affinity for CPUs 0 and 1):proc.affinity=0
proc.affinity=1Example 2 (affinity for CPUs 2 and 3):proc.affinity=2,3The application CPU affinity is changed after the target application starts.The application CPU affinity can be checked though the command:taskset -pc pidChanging CPU cores frequency scaling governor (performance)The scaling governor is responsible for managing the CPU cores clock frequencies.Theperformancegovernor keeps the supported higher clocks whenever possible without caring too much about energy saving. In theory, the CPUs will be able to handle more instructions in less time.Property definition:cpu.performance(equivalents:cpu.performance=trueorcpu.performance=1)Theoptimizerwill keep theperformancegovernor until the optimized application finishes. It handles the state if two or more optimized applications requirecpu.performance. So if application A and B requirecpu.performanceand A finishes after a while, the performance governor will be kept until B finishes.The governor is changed after the target application starts.Changing CPU cores energy policy level (full performance)Only available for supported Intel CPUs (generally laptop ones)The CPU energy policy level defines how much of energy should be saved. It ranges from 0 (no savings, full performance) to 15 (full power saving). More infohere.Property definition:cpu.performance(equivalents:cpu.performance=trueorcpu.performance=1)Theoptimizerwill keep the performance energy policy level (0) until the optimized application finishes. It handles the state if two or more optimized applications requirecpu.performance. So if application A and B requirecpu.performanceand A finishes after a while, the performance level will be kept until B finishes.The energy policy level is changed after the target application starts.Changing GPU power mode (performance)The GPU drivers can provide pre-defined power modes for different usages. Some modes focus on energy-saving, while others on performance (higher clocks ands memory transfer rate).Property definition:gpu.performance(equivalents:gpu.performance=trueorgpu.performance=1)For guapow,performancewould match theperformance power modeforNvida, andcomputemode forAMD(Intel devices are currently not supported).Theperformancemode will not overclock your GPU.Nvidia users requirenvidia-settingsandnvidia-smiinstalled.Theoptimizerservice will keep theperformancestate until the optimized application finishes. It handles the state if two or more optimized applications requiregpu.performance. So if application A and B requiregpu.performanceand A finishes after a while, the performance state will be kept until B finishes.The power mode is changed after the target application starts.Disabling window compositorWindow compositors are responsible for managing the window/desktop effects, and prevent visual glitches (like screen tearing). They generally come pre-bundled with desktop environments, window managers and distributions.Some applications perform better when the compositor is disabled (e.g: games)Not supported for wayland sessionsCurrently supported compositors:kwin(KDE desktop environment)xfwm4(XFCE desktop environment)marco(Mate desktop environment)compton/picomcompiznvidia(driver. More on thathere)Property definition:compositor.off(equivalents:compositor.off=trueorcompositor.off=1)Theoptimizerservice will keep thecompositordisabled until the optimized application finishes. It handles the state if two or more optimized applications requirecompositor.off. So if application A and B requirecompositor.offand A finishes after a while, the disabled state will be kept until B finishes.Theoptimizerservice tries to guess the installed compositor (requiresinxiinstalled) on the first request definingcompositor.off. So the first request will take more time, then the subsequent ones. To prevent that, the installed compositor can be predefined on theoptimizerservicesettings.Nvidiacompositor:available whenForceCompositionPipeline(orForceFullCompositionPipeline) are defined on the X11 or user settings.theoptimizerservice is not able to detect it by default, so you have to pre-define it through theoptimizerservicesettings.The compositor is disabled after the target application starts.Stopping applicationsSome applications can impact the performance of others while running at the same time.guapowallows to stop target applications while the optimized one is running. The applications can be stopped at two possible moments:beforethe application to be optimized startsrightafterthe application to be optimized has startedProperty definition:stop.{moment}=name_1,name_2,...Example:stop.before=a
    stop.before=b
    stop.before=c,d  # multiple can be defined on the same line using commas
    stop.after=f,gIn the example above:applicationsa,b,canddwill be stopped before the application to be optimized startsapplicationsfandgwill be stopped right after the application to be optimized startsTheoptimizerservice will not restart the stopped applications when the optimized application finishes, unless the propertystop.{moment}.relaunch(orstop.{moment}.relaunch=true) is defined. Example:stop.before=a,b 
stop.before.relaunch  # 'a' and 'b' will be restarted when the optimized application finishesTheoptimizerservicewill not relaunchstopped applications while there are other optimized applications running that require them stopped.stop.beforeis only available for applications started through therunner.Executing custom commands and scriptsguapow can execute custom commands and scripts in three possible moments:beforethe application to be optimized startsrightafterthe application to be optimized has startedwhen the optimized application finishes (finish)Property definition:scripts.{moment}=command_or_script_path_1,command_or_script_path_2,...Examples:scripts.before=vlc,firefox  # vlc and firefox commands
    scripts.before=/home/user/my_script.sh  # my_script.sh path
    scripts.after=/usr/bin/app  # app full binary path
    scripts.finish=poweroff  # poweroff commandIn the example above:commandsvlcandfirefox, and the script/home/user/my_script.shwill be executed before the application to be optimized startscommand/usr/bin/appwill be executed right after the application to be optimized startscommandpoweroffwill be executed when the optimized application finishesYou can work with the two additional properties below if the commands/scripts should only be executed when the previous finishes:scripts.{moment}.wait: will wait a script to finish before starting the next. Example:scripts.before=my_script.sh 
    scripts.before=my_script_2.sh 
    scripts.before.wait   # 'my_script_2.sh' will only be executed when 'my_script.sh' finishes.scripts.{moment}.timeout: will wait the script to finish for a limited time (in seconds), otherwise the next one in the chain will be executed. Example:scripts.after=vlc 
    scripts.after=firefox 
    scripts.after.timeout=5.5  # 'vlc' execution will be waited for `5.5`seconds. If it does not finish, 'firefox' will be started.Executing scripts at therootlevel:requires theoptimizerrunning at the root level (default installation).root execution is disabled by default as a security mechanism. It can be enabled by adding the propertyscripts.allow_root(orscripts.allow_root=true) to theoptimizerservicesettings.to request scripts execution at the root level, you have also to add the propertyscripts.{moment}.root(orscripts.{moment}.root=true) to the configuration or profile file. Example:scripts.after=/path/to/my_script.sh
   scripts.after=/path/to/my_script_2.sh
   scripts.after.root  # with this property defined, both scripts above will be executed as rootscripts.beforedoes not suport root execution(unless the user calling theguapowcommand isroot)Hiding mouse pointerSome applications do not hide the mouse pointer by default, and can spoil the user experience.Property definition:mouse.hidden(equivalents:mouse.hidden=trueormouse.hidden=1)Requiresunclutterinstalled (it does not support wayland at the moment)The mouse pointer will be hidden after the target application starts.Theoptimizerservice will keep the mouse pointer hidden until the optimized application finishes. It handles the state if two or more optimized applications requiremouse.hidden. So if application A and B requiremouse.hiddenand A finishes after a while, the pointer will be kept hidden until B finishes.Defining environment variablesYou can defined specific environment variables to be added or removed when launching the target application.Possible property definitions (they can be declared several times):proc.env=MY_VAR:MY_VAR_VALUE#  the variable name and value are separated with the symbol:proc.env=VAR_TO_REMOVE#  when no separator (:) is declared, the variable is removedExample:proc.env=COLOR:red (adds the environment variable named 'COLOR' with 'red' as value)
proc.env=THEME:dark (adds another environment variable)
proc.env=LD_PRELOAD  # (removes the environment variable named 'LD_PRELOAD')This feature has been added focusing on profile files (to keep all settings in one place).This feature is only available when the application is launched through therunner.TweaksLaunchersIf the actual application to be optimized is a child of the target process, how can I tellguapowto optimize it instead ?guapowunderstand this sort of application as alauncher. It is possible to provide a mapping telling that when application A starts optimizes B instead.Two possible ways:a) Providing the mapping through the configuration/profile propertylauncher=exe_name:name_or_command. Several launchers can be defined. Example:launcher=abc:abc-full  # this would map the executable 'abc' to an application named 'abc-full'. So 'abc-full' would be optimized instead of 'abc'
    launcher=def:def-bin   # this would map the executable 'def' to an application named 'def-bin'. So 'def-bin' would be optimized instead of 'def'b) Providing all mapping through thelaunchersfile located in~/.config/guapow(for non-root users) or/etc/guapow(for global or root usage) following the patternexe_name=name_or_command. The advantage of this approach is that you don't have to provide a per-profile/configuration mapping. But at the same time, tons of mappingsmayimpact the matching process time. Example:abc=abc-full
def=def-bin
fgh=/fgh-java.shWild-cards: the asterisk symbol*can be used when you want to match anything inside a word. Example:vlc=vlc-*  # the first started application whose name starts with 'vlc-' would be optimized instead of 'vlc'Name matching:by defaultguapowconsiders an application name (comm) matching if the mapped worddoes not start with a forward-slash (/). You can force a name matching by starting the word with the prefixn%. Examples:abc=def  # as 'def' does not starts with a forward-slash, guapow will look for an application named 'def'
    fgh=n%/xpto  # as the prefix 'n%' was provided, guapow will look for an application named '/xpto'Command matching:by defaultguapowconsiders an application command (cmdline) matching if the mapped wordstarts with a forward-slash (/). You can force a command matching by starting the word with the prefixc%. Examples:abc=/abc-full  # as 'abc-full' starts with a forward-slash, guapow will look for an application launched with the command '/abc-full'
    def=c%xpto  # as the prefix 'c%' was provided, guapow will look for an application launched with the command 'xpto'If you want to skip the launchers mapping process for a given configuration/profile, use the propertylauncher.skip_mapping(orlauncher.skip_mapping=true)Some examples of games mappings reported to work can be foundhere.Steam gamesguapowhas a tweak to look for the right Steam game executable to be optimized. This tweak is disabled by default. To enable it, you have to add the propertysteam(orsteam=true) to your configuration or profile file.You can auto-optimize all your Steam games by followingthistutorial.ComponentsRunnerTherunneris responsible for launching a target application and request optimizations for it.To launch a target application you have to use the commandguapow. There are 3 possible ways to inform the wanted optimizations:a)GUAPOW_CONFIGenvironment variable: you can provide all theoptimization propertieswith this variable separated by commas.GUAPOW_CONFIG="cpu.performance proc.nice=-1" guapow abc  # starts 'abc' and request some optimizations for itb) A profile file (/.config/guapow/{name}.profileor/etc/guapow/{name}.profile) and the environment variableGUAPOW_PROFILE. The variable value must consist of the profile file name without the extension.GUAPOW_PROFILE=media guapow abc  # starts 'abc' and requests the optimizations defined in the profile file '~/.config/guapow/media.profile`c) If you launch a command without defining the environment variables described above,guapowconsiders that you are requesting optimizations based on a profile file calleddefault. In other words:guapow commandis equivalent toGUAPOW_PROFILE=default guapow commandIt is possible to define extra optimization properties on-demand for a given profile through the environment variableGUAPOW_PROFILE_ADD(follows the same pattern as the environment variableGUAPOW_CONFIG).GUAPOW_PROFILE=media GUAPOW_PROFILE_ADD="compositor.off" guapow abc  # requests optimizations declared in the 'media' profile + 'compositor.off'To use therunnerfor launchingSteamgames, you can change the gameLaunch optionsand add something like:GUAPOW_PROFILE=steam guapow %command%(orGUAPOW_CONFIG="properties" guapow %command%). Make sure to add thesteamproperty to your configuration/profile for better optimization handling.Logs:Logs can be enabled through the environment variableGUAPOW_LOG=1(1enables /0disables)They can be written to a file through the environment variableGUAPOW_LOG_FILE=1(log directory:~/.local/share/guapow/log)Optimizer serviceTheoptimizerservice is responsible to apply most of the optimizations and tweaks to a target application and/or the system.Ideally, it should be run at therootlevel, otherwise some optimizations will not be possible.It applies the optimizations changes only once per optimization request. So, if it changes the CPUs governors to performance, and you manually change them later to something else, it will not set the governors to performance again (unless another optimization request arrives).Service definition fileBy default, it runs at port5087and demands encrypted requests for security reasons (all done automatically).Its settings are defined on the files:~/.config/guapow/opt.conf(user) or/etc/guapow/opt.conf(system). Preference: user > system (if running asroot, system is the only option)Properties:port = 5087 (TCP port)
    compositor = (pre-defines the installed compositor. Options: kwin, compiz, marco, picom, compton, nvidia)
    scripts.allow_root = false (allow custom scripts/commands to run at the root level)
    check.finished.interval = 3 (finished applications checking interval in seconds. Min accepted value: 0.5)
    launcher.mapping.timeout = 60 (maximum time in seconds to look for a process mapped to a different process. This property also affects the period to look for Steam subprocesses.  float values are allowed)
    launcher.mapping.found_timeout = 10 (maximum time in seconds to still keep looking for a process mapped to a different process after a match. This property also affects the period to look for Steam subprocesses.  float values are allowed)
    gpu.cache = false (if 'true': maps all available GPUs once after the first request (if running as a system service) or during startup (if not running as system service). Otherwise, GPUs will be mapped for every request)
    gpu.id = # comma separated list of integers representing which GPU cards should be optimized (e.g: 0, 1). If not defined, all available GPUs are considered (default)
    gpu.vendor =  # pre-defines your GPU vendor for faster GPUs mapping. Supported: nvidia, amd
    cpu.performance = false  (set cpu governors and energy policy levels to full performance on startup)
    request.allowed_users = (restricts users that can request optimizations, separated by comma. e.g: root,xpto)
    request.encrypted = true (only accepts encrypted requests for security reasons)
    profile.cache = false (cache profile files on demand to skip I/O operations. Changes to profile files require restarting)
    profile.pre_caching = false (loads all existing profile files on disk in memory during the intialization process. Requires 'profile.cache' enabled)
    nice.check.interval = 5  (processes nice levels monitoring interval in seconds)  
    optimize_children.timeout: maximum period in seconds to keep looking for the target process children (default: 30). 0 can be defined if children should be ignored.
    optimize_children.found_timeout: maximum period in seconds to still keep looking for the target process children after a child in found (default: 10). 0 can be defined if the search process should be interrupted immediately after a child is found.Its installation can be managed using theguapow-clitool:guapow-cli install-optimizer: copies the service definition file to the appropriate directory, starts and enables it.guapow-cli uninstall-optimizer: revert changes from the command below.For manual installation, checkhere.Logs:Logs are managed through the environemnt variables:GUAPOW_OPT_LOG: enables/disables logs. Options:1(enables, default) and0(disables).GUAPOW_OPT_LOG_LEVEL: controls the type of logging. Options:info,debug,errorandwarning(debugis the most detailed type). Default:info.if theoptimizeris running as a service, these variables can be changed on the definition file (/usr/lib/systemd/system/guapow-opt.service)Logs can be viewed through the command:journalctl -efu guapow-opt.serviceWatcher serviceThewatcheris an optional service that can automatically requests optimizations. It keeps looking for new started applications matching its mapping settings.It should ideally run at the user level, as it should act as the user.Its installation can be managed using theguapow-clitool:guapow-cli install-watcher: copies the service definition file to the appropriate directory, starts and enables it.guapow-cli uninstall-watcher: revert changes from the command below.For manual installation, checkhere.Application mappings are defined on the file~/.config/guapow/watch.map(user) or/etc/guapow/watch.map(system). Preference: user > system (if running asroot, system is the only option).Mappings patterns:name_or_command=profile_file_nameif the first word of the pair starts with a forward-slash (/) it will be considered acommandmatch, otherwise anamematch. Example:abc=media   # maps an application named 'abc' to the 'media' profile (~/.config/guapow/media.profile)
/bin/def=power  # maps an application started with the command '/bin/def' to the 'power' profile  (~/.config/guapow/power.profile)Wild-card:the asterik symbol*can be used in the name/command as a replacement foranything. Example:a*bc=media  # maps a process named 'a[anything]bc' to the 'media' profile
    /bin/*=power  # map any process started with the command '/bin/{anything}' to the 'power' profileRegex:if you want to provide your own Python regex, you can start the word with the prefixr:r:/bin/.+/xpto=media  # all applications started with commands following the pattern '/bin/[anything]/xpto' will be mapped to the 'media' profile
r:abc.+=power  # all applications named 'abc[anything]' will be mapped to the 'power' profileBuilt-in patterns:Pre-defined words following the pattern__word__that are evaulated as a regex.__steam__: defines a regex for any game launched throughSteam(native and Proton). Examplehere.Ignoring processes:it is possible to define patterns to ignore specific processes through the file~/.config/guapow/watch.ignore(user) (or/etc/guapow/watch.ignore(system)). Preference: user > system (if running asroot, system is the only option).this file follows the same mapping rules aswatch.map, but you don't need to provide the profile names (as it makes no sense). e.g:my_app_name
my_app_name*  
/bin/my_proc
r:/bin/.+/xptothis feature is useful if you have general mappings that cover a lot of processes inwatch.map(e.g:/usr/bin/*), but want to ignore specific onesSettingsDefined at the file~/.config/guapow/watch.conf(user) or/etc/guapow/watch.conf(system). Preference: user > system (if running asroot, system is the only option).interval = 1 (in seconds to check for new-born applications and request optimizations)
   regex.cache = true (caches pre-compiled regex mapping patterns in memory)
   mapping.cache = false (if 'true', caches the all mapping in memory to skip I/O calls. Changes to watch.map won't have effect until the service is restarted.
   ignored.cache = false (if 'true', caches the all ignored patterns in memory to skip I/O calls. Changes to watch.ignore won't have effect until the service is restarted.Logs:Logs are managed through the environment variables:GUAPOW_WATCH_LOG: enables/disables logs. Options:1(enables, default),0(disables).GUAPOW_WATCH_LOG_LEVEL: controls the type of logging that should be printed. Options:info,debug,errorandwarning(debugis the most detailed type). Default:info.If thewatcheris running as a service, these variables can be changed on the definition file (~.config/systemd/user/guapow-watch.service)Logs can be viewed through the command:journalctl --user -efu guapow-watch.serviceCLIguapow provides a CLI tool calledguapow-cliproviding utility commands.You can check the available commands by typing:guapow-cli --helpSome of the available commands:[install-uninstall]-optimizer: install/uninstalls theoptimizerservice (requiresroot).[install-uninstall]-watcher: install/uninstalls thewatcherservice.gen-profile name: generates a pre-defined profile. Check the available profiles through the--helpparameter.Improving optimizations timingThe optimizations timing can be improved by tweaking some ofguapowcomponents settings:Optimizer settings fileIf you feel that your system and network environments are secure, you can disable the optimization requests encryption through the propertyrequest.encrypted=false. This can save time, since the request encryption/decryption process is heavy.If you do not change your profile files frequently, you can enable the propertiesprofile.cache=trueandprofile.pre_caching=true. This can save time, since all the defined profiles files are pre-loaded in memory during the service initialization and will not be read for every request.You can pre-define your GPU vendor for faster GPUs mapping through the propertygpu.vendor=vendor_name.If your GPU drivers are always loaded during the system initialization, you can safely enable the propertygpu.cache=trueto skip the GPUs mapping for every request. This property is not enabled by default, since hybrid-gpu users might load theirdGPUdrivers on demand.Pre-defining your window compositor will also save time for the first request (since the "guess" process will be skipped). You can define it through thecompositor={name}property.Watcher settings fileIf you do not change yourwatchermappings frequently, you can enable the propertymapping.cache=trueto skip the reading calls for every checking iteration.TutorialsAuto-optimizing all your Steam gamesRequires thewatcherservice installed and enabled (more on thathere)Add the following entry to thewatchermapping file (~/.config/guapow/watch.mapor/etc/guapow/watch.map):__steam__=steamNow use theguapow-clito generate a Steam profile template by typing:guapow-cli gen-profile steamStart a Steam game and check if the optimizations were applied.RoadmapMore built-in optimizationsSupport more technologies and devicesImprove memory usageDonationsYou can support this project development throughko-fi.