diff --git a/handlers.yml b/handlers.yml index 38cfd5a..8bd8efe 100644 --- a/handlers.yml +++ b/handlers.yml @@ -85,3 +85,7 @@ enabled: true scope: user daemon-reload: true + +- name: reload sysctl configuration + become: true + command: 'sysctl --system' diff --git a/tasks/setup.yml b/tasks/setup.yml index 101a7e9..c133d37 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -66,6 +66,57 @@ name: fstrim.timer enabled: true +- block: + - name: remove the sysctl.d directory + become: true + file: + path: /etc/sysctl.d + state: absent + - name: recreate the sysctl.d directory + become: true + file: + path: /etc/sysctl.d + state: directory + mode: 755 + - name: copy sysctl files + become: true + template: + src: '{{ item.src }}' + dest: '{{ item.dest }}' + loop: + - { + src: 'templates/desktop/sysctl/99-sysrq.conf.j2', + dest: '/etc/sysctl.d/99-sysrq.conf' + } + - { + src: 'templates/desktop/sysctl/98-forward.conf.j2', + dest: '/etc/sysctl.d/98-foward.conf' + } + notify: reload sysctl configuration + + - name: remove the modprobe.d directory + become: true + file: + path: /etc/modprobe.d + state: absent + - name: recreate the modprobe.d directory + become: true + file: + path: /etc/modprobe.d + state: directory + mode: 755 + - name: copy modprobe files + become: true + template: + src: '{{ item.src }}' + dest: '{{ item.dest }}' + loop: + - { + src: 'templates/desktop/modprobe/99-amdgpu.conf.j2', + dest: '/etc/modprobe.d/99-amdgpu.conf' + } + when: platform == 'desktop' + # TODO: set fan settings to `quiet` with smbios-thermal-ctl - name: remove old configuration files @@ -82,4 +133,4 @@ state: absent owner: root group: root - when: platform == "laptop" + when: platform == 'laptop' diff --git a/templates/desktop/modprobe/99-amdgpu.conf.j2 b/templates/desktop/modprobe/99-amdgpu.conf.j2 new file mode 100644 index 0000000..2ef56d7 --- /dev/null +++ b/templates/desktop/modprobe/99-amdgpu.conf.j2 @@ -0,0 +1,5 @@ +# {{ ansible_managed }} + +# disable Panel Self Refresh for 6.10 +# see https://bbs.archlinux.org/viewtopic.php?pid=2191514#p2191514 +options amdgpu dcdebugmask=0x12 diff --git a/templates/desktop/sysctl/98-forward.conf.j2 b/templates/desktop/sysctl/98-forward.conf.j2 new file mode 100644 index 0000000..16f90a8 --- /dev/null +++ b/templates/desktop/sysctl/98-forward.conf.j2 @@ -0,0 +1,2 @@ +# {{ ansible_managed }} +net.ipv4.ip_forward = 1 diff --git a/templates/desktop/sysctl/99-sysrq.conf.j2 b/templates/desktop/sysctl/99-sysrq.conf.j2 new file mode 100644 index 0000000..a4c7283 --- /dev/null +++ b/templates/desktop/sysctl/99-sysrq.conf.j2 @@ -0,0 +1,2 @@ +# {{ ansible_managed }} +kernel.sysrq = 1