Configure vm.laptop_mode and vm.dirty_writeback_centisecs.
This commit is contained in:
parent
0340d2fd51
commit
dd8c2ff937
@ -23,3 +23,6 @@ graphics_driver: "intel"
|
|||||||
build_user:
|
build_user:
|
||||||
name: talexander
|
name: talexander
|
||||||
group: talexander
|
group: talexander
|
||||||
|
wireguard_directory: odo
|
||||||
|
enabled_wireguard:
|
||||||
|
- wgh
|
||||||
|
15
ansible/roles/power/defaults/main.yaml
Normal file
15
ansible/roles/power/defaults/main.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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"
|
@ -2,8 +2,45 @@
|
|||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- powertop
|
- powertop
|
||||||
|
- tlp
|
||||||
state: present
|
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
|
||||||
|
loop:
|
||||||
|
- name: vm.dirty_writeback_centisecs
|
||||||
|
value: 2000 # Default is 500 (5 seconds)
|
||||||
|
|
||||||
|
- name: Configure sysctls
|
||||||
|
sysctl:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
|
state: present
|
||||||
|
sysctl_file: /etc/sysctl.d/laptop.conf
|
||||||
|
loop:
|
||||||
|
- name: vm.laptop_mode
|
||||||
|
value: 5
|
||||||
|
|
||||||
- name: Enable services
|
- name: Enable services
|
||||||
systemd:
|
systemd:
|
||||||
name: tlp.service
|
name: tlp.service
|
||||||
|
Loading…
Reference in New Issue
Block a user