Added mesa role

This commit is contained in:
2026-08-26 09:14:32 +02:00
parent 883415048a
commit 0ece3a6eff
3 changed files with 50 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
# community.general.pacman ignores the repo/pkg syntax, so call pacman.
- name: Install the patched Mesa stack
become: true
ansible.builtin.command:
argv: "{{ ['pacman', '-S', '--noconfirm'] + (mesa_stack | map('regex_replace', '^', 'bc250-cachyos/') | list) }}"
register: mesa_install
changed_when: "'there is nothing to do' not in mesa_install.stdout"
- name: Read the installed Mesa version
ansible.builtin.command: pacman -Q mesa
register: mesa_ver
changed_when: false
# bc250-cachyos pkgrel carries a dot (1.67), the official one does not.
- name: Verify the patched Mesa is the installed one
ansible.builtin.assert:
that: "'.' in mesa_ver.stdout.split('-')[-1]"
fail_msg: "Installed {{ mesa_ver.stdout }}: expected a bc250-cachyos pkgrel like 1.67."
# The gfx103 patch is opt-in and off by default. Without this the device
# stays GFX10.1 and mesh/task shaders are not exposed.
- name: Enable the GFX10.3 promotion globally
become: true
ansible.builtin.lineinfile:
path: /etc/environment
regexp: '^RADV_GFX103='
line: 'RADV_GFX103=1'
# Pin last: IgnorePkg outranks the repo/pkg syntax, so writing it before
# the install would make pacman prompt instead of proceeding.
- name: Pin the Mesa stack against upstream upgrades
become: true
ansible.builtin.lineinfile:
path: /etc/pacman.conf
regexp: '^IgnorePkg\s*='
line: "IgnorePkg = {{ mesa_stack | join(' ') }}"
insertafter: '^\[options\]'
+9
View File
@@ -0,0 +1,9 @@
mesa_stack:
- mesa
- opencl-mesa
- vulkan-radeon
- vulkan-mesa-implicit-layers
- lib32-mesa
- lib32-opencl-mesa
- lib32-vulkan-radeon
- lib32-vulkan-mesa-implicit-layers
+4
View File
@@ -5,5 +5,9 @@
role: kernel
- name: Install fan control and temperature driver
role: fan
# GPU stuff
- name: Install GPU governor
role: gpu_governor
- name: Install Mesa
role: mesa