Enable Wayland and GPU drivers

This commit is contained in:
Ariejan de Vroom 2024-06-06 22:22:51 +02:00
parent ea4ae50be3
commit 8b3c8e506d
Signed by: ariejan
GPG Key ID: AD739154F713697B
4 changed files with 74 additions and 2 deletions

View File

@ -4,5 +4,6 @@
roles: roles:
- { role: 01_host_info } - { role: 01_host_info }
- { role: 02_basics } - { role: 02_basics }
- { role: 03_packages } - { role: 03_wayland }
- { role: 04_user } - { role: 05_packages }
- { role: 07_user }

View File

@ -0,0 +1,71 @@
---
- name: Install Xorg
community.general.pacman:
name:
- xorg-xwayland
state: present
become: true
- name: Detect GPU
# ansible.builtin.shell: set -o pipefail && lspci -v | grep -A1 -e VGA -e 3D # noqa command-instead-of-shell
ansible.builtin.shell: set -o pipefail && lspci | grep -i 'VGA\|3D\|display' # noqa command-instead-of-shell
register: gpu_result
changed_when: no
- name: Install GPU drivers (AMD)
community.general.pacman:
name:
- mesa
- mesa-utils
# https://wiki.archlinux.org/title/Xorg
- xf86-video-amdgpu
# https://wiki.archlinux.org/title/Hardware_video_acceleration
- mesa-vdpau
- libva-mesa-driver
# https://wiki.archlinux.org/title/Vulkan
- vulkan-radeon
# https://wiki.archlinux.org/title/GPGPU
- rocm-hip-runtime
- rocm-hip-sdk
- hip-runtime-amd
- rocm-core
- rocm-opencl-runtime
- rocm-opencl-sdk
state: present
become: true
when: ("'radeon' in gpu_result.stdout.lower()") or ("'amd/ati' in gpu_result.stdout.lower()")
- name: Install GPU drivers (Intel)
community.general.pacman:
name:
- mesa
- mesa-utils
# https://wiki.archlinux.org/title/Xorg
- xf86-video-intel
# https://wiki.archlinux.org/title/Hardware_video_acceleration
- intel-media-driver
- libva-intel-driver
# https://wiki.archlinux.org/title/Vulkan
- vulkan-intel
# https://wiki.archlinux.org/title/GPGPU
- intel-compute-runtime
- opencl-clover-mesa
state: present
become: true
when: "'intel' in gpu_result.stdout.lower()"
- name: Install GPU drivers (Nvidia)
community.general.pacman:
name:
- mesa
- mesa-utils
# https://wiki.archlinux.org/title/Xorg
- nvidia
# https://wiki.archlinux.org/title/Hardware_video_acceleration
- nvidia-utils
# https://wiki.archlinux.org/title/GPGPU
- cuda
- opencl-nvidia
state: present
become: true
when: "'nvidia' in gpu_result.stdout.lower()"