From f2666b2bab6e9c1d3ffcf8ef235936ac78864083 Mon Sep 17 00:00:00 2001 From: Alexander Bell Date: Sun, 18 May 2025 17:06:01 +0200 Subject: [PATCH] tlp --- etc/tlp.conf | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ install.bash | 20 +++++++++++++------- 2 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 etc/tlp.conf diff --git a/etc/tlp.conf b/etc/tlp.conf new file mode 100644 index 0000000..8dfa3d2 --- /dev/null +++ b/etc/tlp.conf @@ -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 diff --git a/install.bash b/install.bash index ea28261..d58c563 100644 --- a/install.bash +++ b/install.bash @@ -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