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

Having both GL and GL32 extension results in duplicated Vulkan nvidia_icd.json files #112

Open
jp7677 opened this issue May 18, 2022 · 2 comments

Comments

@jp7677
Copy link

jp7677 commented May 18, 2022

Hi there,

I have a standard Fedora 36 installation with NVIDIA drivers installed (x64 and i686 libraries installed) and both the GL and GL32 flatpak application installed. Running vulkaninfo on the host shows a single GPU which matches reality. When running a Vulkan application inside flatpak however, the application sees the same device twice.

I'm not familiar how the driver setup in flatpak works, but this looks very similar to negativo17/nvidia-driver#95 where both the x64 and i686 nvidia driver put an Vulkan icd file with the same content into /usr/share/vulkan/icd.d/ which made Vulkan to load the same device twice. So my completely uneducated guess would be that this lines https://github.com/flathub/org.freedesktop.Platform.GL.nvidia/blob/master/nvidia-apply-extra.c#L112 and https://github.com/flathub/org.freedesktop.Platform.GL.nvidia/blob/master/nvidia-apply-extra.c#L463 (probably also https://github.com/flathub/org.freedesktop.Platform.GL.nvidia/blob/master/nvidia-apply-extra.c#L117) should only apply to the GL/x64 driver package. I could be wrong though.

Kind regards and thanks a lot for all your hard work!

@jp7677
Copy link
Author

jp7677 commented May 18, 2022

The bottles flatpak application (https://flathub.org/apps/details/com.usebottles.bottles) has a built-in health check window which show a.o. the following:

Graphics:
    vendors:
        nvidia:
            vendor: nvidia
            envs:
                __NV_PRIME_RENDER_OFFLOAD: '1'
                __GLX_VENDOR_LIBRARY_NAME: nvidia
                __VK_LAYER_NV_optimus: NVIDIA_only
            icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json
    prime:
        integrated: null
        discrete: null

It shows indeed two NVIDIA related Vulkan icd files.

@TingPing TingPing changed the title Vulkan applications running in flatpak seeing same device twice Having both GL and GL32 extension results in duplicated Vulkan nvidia_icd.json files May 19, 2022
@koplo199
Copy link

I confirm it still is happening with latest drivers, 535.104.05 at the time of writing.
Bottles now have a workaround for this specific issue: bottlesdevs/Bottles@5627b5b

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

No branches or pull requests

2 participants