#cpu #battery #clockspeed

app autoclockspeed

A utility to check stats about your CPU, and auto regulate clock speeds to help with either performance or battery life

5 releases

0.1.7 Jan 13, 2022
0.1.6 Oct 1, 2021
0.1.5 Sep 13, 2021
0.1.4 Sep 7, 2021
0.1.3 Jul 16, 2021

#325 in Command line utilities

30 downloads per month

MIT license

46KB
1K SLoC

Auto Clock Speed (acs) Rust

A utility to check stats about your CPU, and auto regulate clock speeds to help with either performance or battery life.

image

Goals

  • First and foremost, this is a project to learn about Rust and Linux
  • Secondly, try to improve upon AdnanHodzic's already amazing auto-cpufreq
    • Add options to display raw output of governors, clockspeed, turbo, battery, etc. for use in scripts or display panels like polybar.

Install Latest Release

If you have cargo on your machine, skip to step 3

  1. Install rustup.rs.

  2. Setup rust

    rustup override set stable
    rustup update stable
    
  3. Install from crates

    cargo install autoclockspeed
    

Install from github

Do steps 1 and 2 from other install if you don't have rust installed, then do this next step.

  1. Clone the project and install

    git clone https://github.com/JakeRoggenbuck/auto-clock-speed
    
    cargo install --path auto-clock-speed
    

Systemd

In order to have auto-clock-speed start when you restart your computer you must follow these instruction

# IMPORTANT: Modify the service file to include
# the path to the binary file 
# (usually /home/username/.cargo/bin/acs)
# In the auto clock speed directory run this command to
# move the service file into your systemd directory
sudo cp acs.service /etc/systemd/system/
# Start and enable the service
sudo systemctl start acs
sudo systemctl enable acs

# Check service is up and running
systemctl status acs

Usage

Monitor

# Show the min, max, and current cpu frequency
# along with the cpu governor
acs monitor

# A delay (in milliseconds) can be set for both monitor and run
acs monitor --delay 1000

Run

# Run requires sudo because it edits the cpu's frequency

# Edit speeds and shows exactly what monitor does
sudo acs run

# Shows no output but still edits speeds
sudo acs run --quiet

Get

# Get information about the system

# View all of get's subcommands
acs get --help

acs get temp
acs get freq
acs get speeds

Help

Automatic CPU frequency scaler and power saver

USAGE:
    acs <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    get        Get a specific value or status
    help       Prints this message or the help of the given subcommand(s)
    monitor    Monitor each cpu, it's min, max, and current speed, along with the governor
    run        Run the daemon, this checks and edit your cpu's speed

Dependencies

~5.5MB
~113K SLoC

9a