PowerSaver is a user script (powersaver.sh
) that gives the user control to specify the power profile and manage performance strength and battery discharge rate using predefined profiles.
sudo apt install cpupower
Clone the repository and navigate to the directory:
git clone https://github.com/yourusername/powersaver.git
cd powersaver
Make the script executable:
chmod +x powersaver.sh
powersaver.sh [options]
--profile | -p [ fire | work | relax | ooo | timeisgold ]
--governor | -g [ powersave | performance ]
-
--profile [ fire | work | relax | ooo | timeisgold ]
- Fire: Max performance with high frequency and performance governor.
- Work: High performance with moderate frequency and performance governor.
- Relax: Moderate performance with lower power consumption.
- OOO: Energy-saving profile with low frequency and powersave governor.
- Time Is Gold: Minimal performance, powersave governor, and lowest frequency.
-
--governor [ powersave | performance ]
- powersave: Set the CPU to energy-saving mode.
- performance: Set the CPU to high-performance mode.
Set the profile to "fire":
./powersaver.sh --profile fire
Set the governor to "powersave":
./powersaver.sh --governor powersave
Fire profile:
[Desktop Entry]
Name=PowerSaver Fire
Exec=sh -c 'export LANG=C; export LC_ALL=C; /home/tomas/dev/bash/powersaver/powersaver.sh -p fire'
Icon=/home/tomas/dev/bash/powersaver/cpu.png
Type=Application
Terminal=false
Debug profile (keep open terminal)
[Desktop Entry]
Name=PowerSaver Fire
Exec=sh -c 'export LANG=C; export LC_ALL=C; /home/tomas/dev/bash/powersaver/powersaver.sh -p fire ; bash'
Icon=/home/tomas/dev/bash/powersaver/cpu.png
Type=Application
Terminal=true
The Unlicence. You may download this script to your smart watch if neccessary ;-)