GitXplorerGitXplorer
e

racf

public
2 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
3116e3ca3bebfbbd5635a61809f2749aeeeea494

rm gh action

eexplosion-mental committed a year ago
Verified
d2e88decd7e9036576c169e8cec19220592869c9

add github action

eexplosion-mental committed a year ago
Verified
e4f0c61aa865a77aade600cb7bdc58764f415699

tests.rs: move config tests into config.rs (tests.rs deleted)

eexplosion-mental committed a year ago
Verified
7ee4aea15f88fa05d14003973c6ec23cae360bfe

modularize source code

eexplosion-mental committed a year ago
Verified
54134ba968803ee405059801189fdb000577a5a3

update deps

eexplosion-mental committed a year ago
Verified
4c832b91d6fb8126ca9cbd142b8201572bd53db7

readme: add related section

eexplosion-mental committed a year ago

README

The README file for this repository.

racf - auto cpu frequencer

crates io downloads license dependency status loc CodeBerg

Simple and configurable tool that dynamically switches turbo boost and the kernel governor in order to have a corresponding relationship between the computer's capabilities and the actual usage.

Another important variable is whether the machine is charging or using the battery, depending on this state racf will use the corresponding configuration profile.

This is intended mainly for battery based machines like laptops. Desktops could benefit, I haven't really thought about it that much (e.g. those systems would only be on the '[ac]' profile).

A rewrite of sacf in rust.

Reference: cpufreq

Usage

racf --help

Note A very helpful flag is --run-once which, runs once; and thus no need for racf to stay in the background. This way you can manually tweak your system with the help of racf whenever you actually need it (might be useful to put this in the status bar).

Building and Installing

Currently you need to build it from source (not that big) with cargo and then, optionally, move it to your PATH. In the example bellow I use /usr/local/bin/ as the PREFIX (target) directory.

cargo build --release
cp -f ./target/release/racf /usr/local/bin/

Alternatively use cargo install racf

Configuration

This repo contains racf.toml configuration example with the respective documentation for it's parameters.

racf searches config files in:

  1. /etc/racf.toml
  2. /etc/racf/racf.toml
  3. /etc/racf/config.toml

The first config file that is found is used.

You can copy the file like so:

cp -f racf.toml /etc/racf.toml

or simply copy and paste it.

TODO

  • Implement user space for thermal controls (just like thermald) [seems a bit complicated]
  • Allow to define profiles with an Optional battery percentage value

Related