Skip to content

fix(graphics): pick working Vulkan drivers on AMD and Intel and fall back to OpenGL without one - #155

Merged
CoderDayton merged 2 commits into
mainfrom
fix/gpu-compat
Dec 1, 2026
Merged

CoderDayton merged 2 commits into
mainfrom
fix/gpu-compat

Conversation

@CoderDayton

Copy link
Copy Markdown
Owner

Fixes the Vulkan driver pick on AMD and Intel and a couple of freeze paths.

  • VK_LOADER_DRIVERS_DISABLE was colon-joined, which the loader never matched, so lavapipe was never filtered out. It now uses comma globs. A user-pinned VK_DRIVER_FILES is left as given.
  • Intel pins ANV and hasvk together, so Haswell/Broadwell get a device when ANV is installed. AMDVLK is accepted, GPUs on vfio-pci and similar are skipped, and ICDs are found under XDG data dirs (Flatpak) and /run/opengl-driver (NixOS).
  • When no driver can be pinned, a forked child (5 s cap, never destroys its instance) checks for a hardware Vulkan device. With none, Nightcap starts on OpenGL instead of a blank window.
  • ANV_SYS_MEM_LIMIT and MESA_VK_ENABLE_SUBMIT_THREAD are Intel-only now, and NODEVICE_SELECT is no longer set for a pinned AMD/Intel ICD so DRI_PRIME works.
  • Ctrl+V reads the clipboard outside the text editor lock (a slow Wayland clipboard owner held it up to 5 s), and drops the paste if focus moved meanwhile.
  • A late initial Wayland configure is retried and no longer quits the launch.

NVIDIA with the nvidia driver behaves the same, except the two Intel-only variables are no longer set.

Full suite passes under xvfb. Not tested on real AMD or Intel hardware yet, so it needs someone on those to try it.

…back to OpenGL without one

- Fix VK_LOADER_DRIVERS_DISABLE syntax (comma globs) so lavapipe is really
  filtered; a user-pinned VK_DRIVER_FILES list is left alone.
- Pin ANV and hasvk together on Intel, accept AMDVLK, skip GPUs bound to
  vfio-pci and similar, and search XDG data dirs and /run/opengl-driver.
- With no pinned driver, probe devices in a forked child (5 s cap) and
  switch to OpenGL when there is no hardware Vulkan device.
- Gate ANV_SYS_MEM_LIMIT and the Mesa submit thread on Intel, and keep
  Mesa's device selector for pinned AMD/Intel ICDs.
- Read the clipboard outside the text editor lock and drop the paste if
  focus moved meanwhile.
- Retry the initial Wayland sync and continue instead of quitting.
@CoderDayton
CoderDayton merged commit f5fd399 into main Dec 1, 2026
6 checks passed
@CoderDayton
CoderDayton deleted the fix/gpu-compat branch December 1, 2026 17:33
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.

1 participant