Install a second set of mesa's vulkan drivers in parallel and use them by default using drop-in files only?
David Airlie
airlied at redhat.com
Tue Jan 28 20:37:20 UTC 2025
On Wed, Jan 29, 2025 at 4:52 AM Thorsten Leemhuis <fedora at leemhuis.info> wrote:
>
> Lo! Is it possible to install mesa's vulkan drivers in parallel to the
> ones from the Linux distro and make all apps used them by default using
> drop-in files only?
>
> I'm asking, as I want to provide a RPM package with in a 3rd party repo
> which provides mesa's vulkan drivers that have features compiled in the
> distro in question (Fedora) is unwilling to enable in their regular mesa
> builds.
>
> I tried a few things before sending this mail and was easily able to
> install the driver in parallel (in /usr/lib64/dri-freeworld) with its
> own ICD file (in /etc/vulkan/icd.d/ – which to my understanding in a
> place with a higher priority in the vulkan loader). But apps
> nevertheless always used the driver from the distro by default. To my
> untrained eyes it looks like libVkLayer_MESA_device_select.so reorders
> things (see https://fosstodon.org/@kernellogger/113900753049070871 if
> you care about details) and set a higher priority for the the distro's
> vulkan driver. But I was able to use the driver in installed in parallel
> by using VK_DRIVER_FILE or by temporarily moving the distro's icd file
> for the driver in question out of the way -- so it works, but both those
> approaches are no options that work well in the add-on package I want to
> provide. That's why I'm reaching out here in the hope that someone might
> know a trick to realize what I want to do.
Uggh, sounds like a bug in the loader or in device select reordering,
At a guess device select picks things on the first probe trip, but
maybe either uses the first or last one that matches the underlying
hw,
it might be that it could be patched to reorder things so it works,
but it could also be the loader ordering things, I'd probably try and
debug device select layers default pick and see if it gets called a
few times when you have multiple installed.
Dave.
More information about the mesa-dev
mailing list