Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan detects two GPU's with both x64 and i686 driver being installed #95

Closed
jp7677 opened this issue Feb 13, 2020 · 1 comment · Fixed by #96
Closed

Vulkan detects two GPU's with both x64 and i686 driver being installed #95

jp7677 opened this issue Feb 13, 2020 · 1 comment · Fixed by #96

Comments

@jp7677
Copy link
Contributor

jp7677 commented Feb 13, 2020

Hi there,

This is a follow up from doitsujin/dxvk#1408

Both the x64 and i686 nvidia drivers seem to put an icd file into /usr/share/vulkan/icd.d/:

ls /usr/share/vulkan/icd.d/ | grep nvidia
nvidia_icd.i686.json
nvidia_icd.x86_64.json

Both files have the same content:

$ cat /usr/share/vulkan/icd.d/nvidia_icd.i686.json
{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.1.119"
    }
}
$ cat /usr/share/vulkan/icd.d/nvidia_icd.x86_64.json
{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.1.119"
    }
}

Unfortunately this make vulkan think that I have 2 GPU's:

$ vulkaninfo
Presentable Surfaces:
=====================
GPU id : 0 (GeForce GTX 1080):
GPU id : 1 (GeForce GTX 1080):

(output is truncated).

I can manually restrict vulkan to use just one icd file with setting VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.x86_64.json in my environment, though it would be cool when just one icd file is present. This would also resolve at least the linked issue without having to set VK_ICD_FILENAMES.

@jp7677
Copy link
Contributor Author

jp7677 commented Feb 13, 2020

I guess the change needed would be here https://github.com/negativo17/nvidia-driver/blob/master/nvidia-driver.spec#L281

install -p -m 0644 nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json

should probably be

install -p -m 0644 nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/

jp7677 added a commit to jp7677/nvidia-driver that referenced this issue Feb 14, 2020
Installs a single nvidia_icd.json file, regardless the target architecture.
Having multiple Vulkan ICD manifest installed tricks Vulkan into thinking that there are two adapters installed.
Fixes negativo17#95
jp7677 added a commit to jp7677/nvidia-driver that referenced this issue Feb 14, 2020
Install a single nvidia_icd.json file, regardless the target
architecture, to prevent having two ICD manifests present
when both x64 and i686 driver libraries are installed.
Having multiple Vulkan ICD manifest installed tricks the Vulkan
loader into thinking that there are two adapters installed.

Fixes negativo17#95
jp7677 added a commit to jp7677/nvidia-driver that referenced this issue Feb 14, 2020
Install a single nvidia_icd.json file, only for x64,
to prevent having two ICD manifests present when
both x64 and i686 driver libraries are installed.
Having multiple Vulkan ICD manifest installed tricks
the Vulkan loader into thinking that two adapters are
installed.

Fixes negativo17#95
scaronni pushed a commit that referenced this issue Feb 15, 2020
Install a single nvidia_icd.json file, only for x64,
to prevent having two ICD manifests present when
both x64 and i686 driver libraries are installed.
Having multiple Vulkan ICD manifest installed tricks
the Vulkan loader into thinking that two adapters are
installed.

Fixes #95
scaronni pushed a commit that referenced this issue Feb 15, 2020
Install a single nvidia_icd.json file, only for x64,
to prevent having two ICD manifests present when
both x64 and i686 driver libraries are installed.
Having multiple Vulkan ICD manifest installed tricks
the Vulkan loader into thinking that two adapters are
installed.

Fixes #95
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 a pull request may close this issue.

1 participant