Skip to content

Add migration to backfill Mesa Vulkan driver for pre-vulkan.sh installs#6090

Open
ki11e6 wants to merge 2 commits into
basecamp:devfrom
ki11e6:fix/backfill-vulkan-driver-migration
Open

Add migration to backfill Mesa Vulkan driver for pre-vulkan.sh installs#6090
ki11e6 wants to merge 2 commits into
basecamp:devfrom
ki11e6:fix/backfill-vulkan-driver-migration

Conversation

@ki11e6

@ki11e6 ki11e6 commented Jun 14, 2026

Copy link
Copy Markdown

What

Adds a migration that installs the Mesa Vulkan driver (vulkan-intel / vulkan-radeon / vulkan-asahi) on systems that were set up before install/config/hardware/vulkan.sh was added (commit 694eb8c, 2026-02-20).

Fixes #6089.

Why

install/ scripts only run once, at initial setup. vulkan.sh was introduced as an install-time step but no migration was shipped, so it never reaches pre-existing machines. Intel/AMD systems installed before that date have no Mesa Vulkan ICD to this day.

On hybrid (Optimus) laptops the impact is user-visible: NVIDIA Vulkan ships via nvidia-utils, so the discrete GPU becomes the only Vulkan device. mpv (default vo=gpu-next/Vulkan) then renders on the dGPU and cross-presents to the iGPU-driven compositor, which stalls ("Application Not Responding"). Installing vulkan-intel restored the iGPU as a Vulkan device and fixed it.

How

The migration mirrors the detection in vulkan.sh and relies on omarchy-pkg-add, which is idempotent (pacman -S --needed) — so it is a no-op on systems that already have the driver (e.g. fresh installs). The migration timestamp (1780929365) is derived from the current dev HEAD commit, per omarchy-dev-add-migration convention, and sorts after the latest existing migration.

Testing

Verified on an affected machine (Omarchy 3.8.2, Intel UHD 630 + NVIDIA GTX 1650, installed 2026-02-18): vulkan-intel was absent, the dGPU was the only Vulkan device, and mpv froze. After installing vulkan-intel, both GPUs appear as Vulkan devices and mpv renders on Intel without stalling.

Copilot AI review requested due to automatic review settings June 14, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a migration script to backfill Mesa Vulkan ICD packages on previously installed systems so Intel/AMD/Apple GPUs have the appropriate Vulkan driver available.

Changes:

  • Introduces a migration that detects GPU vendor and installs the matching Mesa Vulkan driver package(s).
  • Uses an associative array mapping vendor → package and installs via omarchy-pkg-add when applicable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread migrations/1780929365.sh Outdated
@@ -0,0 +1,25 @@
echo "Install missing Mesa Vulkan driver for Intel/AMD/Apple GPUs"
Comment thread migrations/1780929365.sh
Comment on lines +9 to +13
declare -A VULKAN_DRIVERS=(
[Intel]=vulkan-intel
[AMD]=vulkan-radeon
[Apple]=vulkan-asahi
)
Comment thread migrations/1780929365.sh Outdated
@@ -0,0 +1,25 @@
echo "Install missing Mesa Vulkan driver for Intel/AMD/Apple GPUs"
Comment thread migrations/1780929365.sh
Comment on lines +17 to +21
for vendor in "${!VULKAN_DRIVERS[@]}"; do
if lspci | grep -iE "(VGA|Display).*$vendor" >/dev/null; then
PACKAGES+=("${VULKAN_DRIVERS[$vendor]}")
fi
done
@ki11e6

ki11e6 commented Jun 14, 2026

Copy link
Copy Markdown
Author

Thanks for the review. Addressing the automated feedback:

  • Apple/Asahi via lspci — good catch, and correct: Apple Silicon GPUs aren't PCI devices so that branch never fires. It was inherited verbatim from install/config/hardware/vulkan.sh. Since a backfill should only do what reliably works, I've scoped the migration to Intel/AMD and dropped the Apple entry rather than add Asahi platform detection (out of scope for this fix). The same lspci limitation in vulkan.sh itself is probably worth a separate look.
  • Shebang / bashisms — intentional, matches repo convention: every script in migrations/ is shebang-less and bin/omarchy-migrate runs them via bash "$file", so declare -A/arrays are safe. vulkan.sh uses the same construct.
  • Leading indentation on line 1 — the committed file has echo at column 0 (no leading whitespace); appears to be a false positive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulkan driver not backfilled: pre-vulkan.sh installs left without Mesa Vulkan ICD

2 participants