For some reason when used with X4: Foundations, the overlay doesn't show up. Mesa master (git-75d8b4e795) Driver: radv GPU: Sapphire Pulse AMD Vega 56. X4: Foundations 2.50 Hotfix 1 (GOG version).
Just for the reference, the game is using Vulkan.
Any other information? I don't have the game, but I was able to use the overlay with games like Dota 2.
It works fine in other cases for me (like when using with Wine+dxvk in Witcher 3). So something strange is going with X4 specifically. Is there some way to narrow down why it's not loading?
Interesting, I just analyzed loaded shared libraries for case when the layer is showing up (vkcube), and I see libVkLayer_MESA_overlay.so listed. While in case of X4 it's not present. So something does prevent it from loading.
Running with VK_LOADER_DEBUG=all might help figuring out what's going wrong.
I see a strange difference. I placed my built layer in /opt/mesa-master. For vkcube when it works, I run it like this: VK_LOADER_DEBUG=all VK_LAYER_PATH=/opt/mesa-master/share/vulkan/explicit_layer.d VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay vkcube Result (it finds it): ... DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/home/user/.local/share/vulkan/implicit_layer.d DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/home/user/.local/share/vulkan/implicit_layer.d DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /opt/mesa-master/share/vulkan/explicit_layer.d ... For X4, when it doesn't work: VK_LOADER_DEBUG=all VK_LAYER_PATH=/opt/mesa-master/share/vulkan/explicit_layer.d VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay ./X4 Result: ... DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/home/user/.local/share/vulkan/implicit_layer.d DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /etc/xdg/vulkan/implicit_layer.d:/etc/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d:/usr/local/share/vulkan/implicit_layer.d:/home/user/.local/share/vulkan/implicit_layer.d DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: vulkan/linux DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: /etc/xdg/vulkan/icd.d:/etc/vulkan/icd.d:/usr/share/vulkan/icd.d:/usr/share/vulkan/icd.d:/usr/local/share/vulkan/icd.d:/home/user/.local/share/vulkan/icd.d ... WARNING: loaderAddLayerNameToList: Failed to find layer name VK_LAYER_MESA_overlay to activate WARNING: loaderAddLayerNameToList: Failed to find layer name VK_LAYER_MESA_overlay to activate ... Somehow search resolution is different so it doesn't find it.
This part looks weird (i.e. vulkan/linux there) DEBUG: ReadDataFilesInSearchPaths: Searching the following paths for manifest files: vulkan/linux
Have you checked it's not 32-bit vs. 64-bit issue? ("file" command tells you which arch given library/binary is using, and you can see where the game binary / libraries are from /proc/PID/maps file.)
The game and layer are both 64-bit.
Are you using the %command% trick in steam or some other mean? It looks like something is stripping your VK_LAYER_PATH environment variable.
I'm using GOG version, and actually launch the binary directly with those env variables prefixed for a test (X4 is a binary). I.e. VK_LOADER_DEBUG=all VK_LAYER_PATH=/opt/mesa-master/share/vulkan/explicit_layer.d VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay ./X4
(In reply to Shmerl from comment #11) > I'm using GOG version, and actually launch the binary directly with those > env variables prefixed for a test (X4 is a binary). > > I.e. > > VK_LOADER_DEBUG=all > VK_LAYER_PATH=/opt/mesa-master/share/vulkan/explicit_layer.d > VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay ./X4 Can you look at a strace dump or once the game is loaded cat /proc/<game_pid>/maps to check whether the game might be using its own version of the loader?
OK, I run it now also to match mesa-master Vulkan driver with the loader. I.e. using not the system ICD, but the one built with mesa-master (though that doesn't change the outcome, but at least reduces potential mismatches). Here is the result of /proc/<pid>/maps: https://pastebin.com/raw/vPwn0xTd
May be something is statically compiled into it?
(In reply to Shmerl from comment #13) > OK, I run it now also to match mesa-master Vulkan driver with the loader. > I.e. using not the system ICD, but the one built with mesa-master (though > that doesn't change the outcome, but at least reduces potential mismatches). > > Here is the result of /proc/<pid>/maps: https://pastebin.com/raw/vPwn0xTd Thanks it seems to be using the system loader. At this point I have no idea apart from the game manually calling setenv() to drop the VK_LAYER_PATH variable.
OK, I'll try to strace it to get some details and will also ping developers of the game with this question.
Oh, this is something already: strings X4 | grep 'vulkan/linux' VK_LAYER_PATH=vulkan/linux The game is doing something fishy, that's why above you can also see it looking for that weird "vulkan/linux" location.
(In reply to Shmerl from comment #17) > Oh, this is something already: > > strings X4 | grep 'vulkan/linux' > VK_LAYER_PATH=vulkan/linux > > The game is doing something fishy, that's why above you can also see it > looking for that weird "vulkan/linux" location. Heh, you can always try to create that directory and link to the layer's file there. Anyway it doesn't seem like a layer bug so I'm closing this. Thanks
(In reply to Lionel Landwerlin from comment #15) > Thanks it seems to be using the system loader. > At this point I have no idea apart from the game manually calling setenv() > to drop the VK_LAYER_PATH variable. Environment can be easily checked for a running program: tr '\0' '\n' < /proc/PID/environ | grep VK
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.