Git Product home page Git Product logo

ideapad_bios_scripts's Introduction

Ideapad 5 BIOS Control Scripts

This are just some simple scripts to control some BIOS settings of the Lenovo Ideapad 5 Pro 14ACN6 (It also works for other models like the ideapad 5 14ARE05).

The settings are changed using the acpi_call kernel module and the calls specified in the archwiki page.

Available Settings

  • Power mode (controls the system fan):
    • Intelligent cooling
    • Battery saving
    • Extreme performance
  • Rapid charge
  • Conserve battery (stops charging when connected to power at 60%)

I also include a script conserve_battery to turn on the battery conservation mode at 80% battery instead of 60% so when I unplug the laptop from power it has more charge. The script was made to be run in a cron job every X minutes.

Installation

If you have the acpi_call kernel module installed you can just clone the repository and run the scripts.

git clone <url>

To install the acpi_call kernel module clone its repository and run:

# Compile Module
make
sudo make install
# Load the kernel module
sudo modprobe acpi_call

Note: you have to run these commands for every new kernel you install.

Usage/Examples

sudo ./bios_power_mode <mode>

The mode value can be either:

  • INTELLIGENT_COOLING
  • POWER_SAVING
  • EXTREME_PERFORMANCE
  • RAPID_CHARGE

When setting rapid charge mode, specify on or off:

sudo ./bios_power_mode RAPID_CHARGE <on/off>

Get active mode:

sudo ./bios_power_mode active

Automate changing power modes

You can include udev rules in /etc/udev/rules.d/10-power.rules to change the BIOS power mode when the laptop is plugged/unplugged from power.

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_STATUS}=="Discharging", RUN+="/usr/local/bin/bios_power_mode BATTERY_SAVING"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_STATUS}=="Charging", RUN+="/usr/local/bin/bios_power_mode INTELLIGENT_COOLING"

To do

  • Toggle rapid charge

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.