Skip to content

Instantly share code, notes, and snippets.

@jmcerrejon
Last active March 21, 2024 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmcerrejon/a08eca2bba3e5e23bda2b3f7d7506ab0 to your computer and use it in GitHub Desktop.
Save jmcerrejon/a08eca2bba3e5e23bda2b3f7d7506ab0 to your computer and use it in GitHub Desktop.
reinstall_vulkan_driver.sh
#!/bin/bash
# This script was created by PiKISS (https://github.com/jmcerrejon/PiKISS).
# It reinstalls the Vulkan driver for Mesa.
# If you don't want to use it, please make sure you delete the file: /etc/apt/apt.conf.d/99reinstall-vulkan-driver-hook
function reinstall_vulkan_driver() {
readonly BUILD_MESA_VULKAN_DRIVER_DIR="$HOME/mesa_vulkan/build"
if [[ ! -d $BUILD_MESA_VULKAN_DRIVER_DIR ]]; then
echo "Vulkan driver not found. Exiting..."
exit 1
fi
cd "$BUILD_MESA_VULKAN_DRIVER_DIR" || exit 1
echo "Reinstalling Vulkan driver..."
sudo ninja install > /dev/null 2>&1
echo "Vulkan driver reinstalled!."
}
reinstall_vulkan_driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment