Last active
August 23, 2020 20:32
-
-
Save YamiYukiSenpai/649d953015c7492e52e1268f0c6b8ec2 to your computer and use it in GitHub Desktop.
Generates a .json file, just in case the Vulkan stops working on NVIDIA GPU due to the missing file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# RUN AS ROOT | |
# Generates a .json file, just in case the Vulkan stops working on NVIDIA GPU due to the missing file | |
# This solved the issue when I couldn't play my games that rely on Vulkan (i.e. Windows games on Steam) | |
# Source: https://twitter.com/Terry_Hendrix/status/1067506733868666880 | |
cd /usr/share/vulkan/icd.d/ | |
touch nvidia_icd.json | |
a=`vulkaninfo | grep "Vulkan Instance Version"` | |
inarr=(${a}) | |
vulkan_ver=${inarr[3]} | |
echo "{" > nvidia_icd.json | |
echo -e "\t\"file_format_version\":\"1.0.0\"," >> nvidia_icd.json | |
echo -e "\t\"ICD\": {" >> nvidia_icd.json | |
echo -e "\t\t\"library_path\":\"libGLX_nvidia.so.0\"," >> nvidia_icd.json | |
echo -e "\t\t\"api_version\":\"$vulkan_ver\"" >> nvidia_icd.json | |
echo -e "\t\"" >> nvidia_icd.json | |
echo "}" >> nvidia_icd.json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment