Merge branch 'power_management_linux'
This commit is contained in:
commit
1ceef073e4
@ -23,3 +23,9 @@ graphics_driver: "intel"
|
|||||||
build_user:
|
build_user:
|
||||||
name: talexander
|
name: talexander
|
||||||
group: talexander
|
group: talexander
|
||||||
|
wireguard_directory: odo
|
||||||
|
enabled_wireguard:
|
||||||
|
- wgh
|
||||||
|
cputype: "intel"
|
||||||
|
hwpstate: true
|
||||||
|
cores: 8
|
||||||
|
2
ansible/roles/cpu/files/disable_turboboost_tmpfiles.conf
Normal file
2
ansible/roles/cpu/files/disable_turboboost_tmpfiles.conf
Normal file
@ -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
|
@ -1,6 +1,2 @@
|
|||||||
# - name: Install packages
|
- include_tasks: "tasks/linux_{{cputype}}.yaml"
|
||||||
# pacman:
|
when: cputype is defined
|
||||||
# name:
|
|
||||||
# - foo
|
|
||||||
# state: present
|
|
||||||
# update_cache: true
|
|
||||||
|
27
ansible/roles/cpu/tasks/linux_intel.yaml
Normal file
27
ansible/roles/cpu/tasks/linux_intel.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
- name: Install packages
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- powertop
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install tmpfiles.d configuration
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item }}_tmpfiles.conf"
|
||||||
|
dest: "/etc/tmpfiles.d/{{ item }}.conf"
|
||||||
|
mode: 0644
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
loop:
|
||||||
|
- disable_turboboost
|
||||||
|
|
||||||
|
- 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:
|
||||||
|
- 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…
x
Reference in New Issue
Block a user