diff --git a/migrations/1780929365.sh b/migrations/1780929365.sh new file mode 100644 index 0000000000..ca4b314555 --- /dev/null +++ b/migrations/1780929365.sh @@ -0,0 +1,24 @@ +echo "Install missing Mesa Vulkan driver for Intel/AMD GPUs" + +# Backfill for systems installed before install/config/hardware/vulkan.sh existed. +# install/ scripts only run at initial setup, so machines set up earlier never +# received a Mesa Vulkan ICD for their iGPU (leaving e.g. NVIDIA as the only Vulkan +# device on hybrid laptops). omarchy-pkg-add is idempotent, so this is a no-op when +# the driver is already present. + +declare -A VULKAN_DRIVERS=( + [Intel]=vulkan-intel + [AMD]=vulkan-radeon +) + +PACKAGES=() + +for vendor in "${!VULKAN_DRIVERS[@]}"; do + if lspci | grep -iE "(VGA|Display).*$vendor" >/dev/null; then + PACKAGES+=("${VULKAN_DRIVERS[$vendor]}") + fi +done + +if (( ${#PACKAGES[@]} > 0 )); then + omarchy-pkg-add "${PACKAGES[@]}" +fi