Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
/ power_management Public archive

Change cpu governors and scaling drivers when plugging /unplugging

License

Notifications You must be signed in to change notification settings

cch000/power_management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple power Management for laptops

What does it do?

  • Changes the default cpu governor to conservative, helps save battery (you should test it).
  • When the laptop is plugged in the cpu governor is chaged to performance and the scaling driver is changed to amd-pstate epp.
  • When the laptop is unplugged conservative is set as the cpu governor, the power profile is set to power-saver and the performance scaling driver is changed to amd-pstate.

Requisites

  • amd cpu (at least zen2)
  • kernel >= 6.3 or a patched kernel with amd-pstate epp

Testing

In order to test if conservative cpu governor actually helps you save battery you can use tools such as battop to see the real time discharge rate of your laptop.

To see the current governor:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Install

git clone https://github.com/cch000/power_management.git
cd power_management
chmod +x install
sudo ./install

Reboot

Uninstall

chmod +x uninstall
sudo ./uninstall

Don't forget to reboot.

About

Change cpu governors and scaling drivers when plugging /unplugging

Topics

Resources

License

Stars

Watchers

Forks

Languages