GithubHelp home page GithubHelp logo

wh1t3h47 / cpu_powersave Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 16 KB

Bash script to control CPU power consumption, featuring ACPI AC auto detection and Intel Turbo Technology

Shell 100.00%
python cpu powersave acpi shell bash shell-script posix linux systemd linux-shell pstate intel governor modprobe laptop

cpu_powersave's Introduction

CPU Powersave

Shell Script Linux Kali Linux

A small bash utility to scale down or up CPU power consumption

Pequena utilidade escrita em bash para aumentar ou diminuir o consumo de energia da CPU

By wh1t3h47

(Antônio Martos Harres)

- https://github.com/wh1t3h47

Features

  1. Automatically detects if charger is plugged and acts accordingly to the context;
  2. Set your own limits for maximium clock, core count and governor;
  3. Control your CPU whenever a power source change and automatically apply the battery or AC profile.

WARNINGS:

  1. This script runs as root, so make sure it's owned by user and group root and it's not writable by any other user, otherwise you're installing a tick bomb inside your system;
  2. Do NEVER set a script with suid bit: If your shell script has suid priviledge, it's a backdoor waiting to be exploited, any user could gain root without password.

Dependencies:

  • cpufreq
  • cpufreqd
  • lscpu
  • Linux

TODO

  • 1. Make disable_pstate a parameter
  • 2. Respect max pstate clock as well
  • 3. Find a better solution to detect max clock speed
  • 4. Implement systemd service
  • 5. Make governor a parameter
  • 6. modprobe all governors
  • 7. Create a way to configure CPU settings for each amount of battery

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.