Change the power role to just setting the energy performance preference (epp).
This commit is contained in:
parent
dd8c2ff937
commit
977e382726
@ -26,3 +26,5 @@ build_user:
|
||||
wireguard_directory: odo
|
||||
enabled_wireguard:
|
||||
- wgh
|
||||
hwpstate: true
|
||||
cores: 8
|
||||
|
@ -1,15 +0,0 @@
|
||||
tlp_config:
|
||||
PCIE_ASPM_ON_BAT: powersupersave
|
||||
USB_ALLOWLIST: "1050:0406"
|
||||
CPU_BOOST_ON_AC: "0"
|
||||
CPU_BOOST_ON_BAT: "0"
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT: "power"
|
||||
DISK_IDLE_SECS_ON_BAT: "5"
|
||||
CPU_MIN_PERF_ON_AC: "0"
|
||||
CPU_MAX_PERF_ON_AC: "100"
|
||||
CPU_MIN_PERF_ON_BAT: "0"
|
||||
CPU_MAX_PERF_ON_BAT: "100"
|
||||
# WIFI_PWR_ON_AC: "on"
|
||||
# WIFI_PWR_ON_BAT: "on"
|
||||
# CPU_HWP_DYN_BOOST_ON_AC: "0"
|
||||
# CPU_HWP_DYN_BOOST_ON_BAT: "0"
|
@ -0,0 +1,2 @@
|
||||
# Disable turboboost. This makes the laptop significantly quieter and probably helps battery life.
|
||||
w- /sys/devices/system/cpu/intel_pstate/no_turbo - - - - 1
|
@ -2,47 +2,26 @@
|
||||
package:
|
||||
name:
|
||||
- powertop
|
||||
- tlp
|
||||
state: present
|
||||
|
||||
# - name: Configure TLP
|
||||
# lineinfile:
|
||||
# path: /etc/tlp.conf
|
||||
# regexp: "^{{ item.key }}="
|
||||
# line: '{{ item.key }}="{{ item.value }}"'
|
||||
# loop: "{{ tlp_config | dict2items }}"
|
||||
# when: '" " in item.value'
|
||||
|
||||
# - name: Configure TLP
|
||||
# lineinfile:
|
||||
# path: /etc/tlp.conf
|
||||
# regexp: "^{{ item.key }}="
|
||||
# line: "{{ item.key }}={{ item.value }}"
|
||||
# loop: "{{ tlp_config | dict2items }}"
|
||||
# when: '" " not in item.value'
|
||||
|
||||
- name: Configure sysctls
|
||||
sysctl:
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
sysctl_file: /etc/sysctl.d/dirty.conf
|
||||
- name: Install tmpfiles.d configuration
|
||||
copy:
|
||||
src: "files/{{ item }}_tmpfiles.conf"
|
||||
dest: "/etc/tmpfiles.d/{{ item }}.conf"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: wheel
|
||||
loop:
|
||||
- name: vm.dirty_writeback_centisecs
|
||||
value: 2000 # Default is 500 (5 seconds)
|
||||
- disable_turboboost
|
||||
|
||||
- name: Configure sysctls
|
||||
sysctl:
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
sysctl_file: /etc/sysctl.d/laptop.conf
|
||||
- name: Favor energy efficiency for Speed Shift
|
||||
when: hwpstate is defined and hwpstate and cores is defined
|
||||
template:
|
||||
src: "templates/{{ item.src }}.j2"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: wheel
|
||||
loop:
|
||||
- name: vm.laptop_mode
|
||||
value: 5
|
||||
|
||||
- name: Enable services
|
||||
systemd:
|
||||
name: tlp.service
|
||||
daemon_reload: yes
|
||||
enabled: true
|
||||
- src: energy_performance_preference.conf
|
||||
dest: /etc/tmpfiles.d/energy_performance_preference.conf
|
||||
|
@ -0,0 +1,4 @@
|
||||
# Favor energy efficiency for Speed Shift
|
||||
{% for core in range(0, cores, 1) %}
|
||||
w- /sys/devices/system/cpu/cpufreq/policy{{core}}/energy_performance_preference - - - - power
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user