This commit is contained in:
Alexander Bell 2025-05-18 17:06:01 +02:00
parent 668df5d242
commit f2666b2bab
2 changed files with 62 additions and 7 deletions

49
etc/tlp.conf Normal file
View File

@ -0,0 +1,49 @@
START_CHARGE_THRESH_BAT1=75
STOP_CHARGE_THRESH_BAT1=80
START_CHARGE_THRESH_AC=75
STOP_CHARGE_THRESH_AC=80
# CPU
CPU_DRIVER_OPMODE_ON_AC=active
CPU_DRIVER_OPMODE_ON_BAT=guided # enables setting min max frequency
CPU_SCALING_GOVERNOR_ON_AC=powersave
CPU_SCALING_GOVERNOR_ON_BAT=conservative
CPU_SCALING_MIN_FREQ_ON_BAT=0
CPU_SCALING_MAX_FREQ_ON_BAT=1500000
CPU_ENERGY_PERF_POLICY_ON_AC=performance
CPU_ENERGY_PERF_POLICY_ON_BAT=power
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
PLATFORM_PROFILE_ON_AC=performance
PLATFORM_PROFILE_ON_BAT=low-power
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0
CPU_HWP_DYN_BOOST_ON_AC=1
CPU_HWP_DYN_BOOST_ON_BAT=0
# Adaptive Backlight Modulation
AMDGPU_ABM_LEVEL_ON_AC=0
AMDGPU_ABM_LEVEL_ON_BAT=3
# GPU
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=low
NMI_WATCHDOG=0
MEM_SLEEP_ON_AC=s2idle
MEM_SLEEP_ON_BAT=deep
# Radio
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=on
RESTORE_DEVICE_STATE_ON_STARTUP=0
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
PCIE_ASPM_ON_BAT=powersupersave
USB_AUTOSUSPEND=1

View File

@ -58,14 +58,20 @@ echo '[Service]\nExecStart=\nExecStart=-/sbin/agetty --noreset --noclear --autol
# Battery optimization
# https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#installing-auto-cpufreq
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
cd auto-cpufreq && sudo ./auto-cpufreq-installer
sudo auto-cpufreq --install
sudo auto-cpufreq --update
sudo auto-cpufreq --stats
#git clone https://github.com/AdnanHodzic/auto-cpufreq.git
#cd auto-cpufreq && sudo ./auto-cpufreq-installer
#sudo auto-cpufreq --install
#sudo auto-cpufreq --update
#sudo auto-cpufreq --stats
# https://wiki.archlinux.org/title/Framework_Laptop_13#Battery_control
yay -S fw-ectool-git
ectool chargecontrol normal 80 80
#yay -S fw-ectool-git
#ectool chargecontrol normal 80 80
cp ~/dotfiles/etc/tlp.conf /etc/
pacman -S tlp tlp-rdw
systemctl enable tlp.service
systemctl enable NetworkManager-dispatcher.service
systemctl mask systemd-rfkill.service # Needed for auto-disable of BT on boot by TLP
systemctl mask systemd-rfkill.socket # Also needed for auto-disable BT
###################################################################
# MANUAL CONFIGURATION REQUIRED