[Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
Moderator: Moderators for English X Forum
[Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
Version: X4: Foundations (GOG) 2.50 Hotfix 1.
GPU: Sapphire Pulse Vega 56.
I tried to benchmark the game using Mesa's Vulkan overlay. However the overlay didn't show up. After some investigation, it turned out, that the game (X4 binary) does something weird to VK_LAYER_PATH environment variable, namely overrides it with "vulkan/linux" value, which makes Vulkan loader fail to load explicit layers, including the Mesa HUD I was trying to use.
See: https://bugs.freedesktop.org/show_bug.cgi?id=111054
Can you please fix it? The game shouldn't be overriding VK_LAYER_PATH like that.
GPU: Sapphire Pulse Vega 56.
I tried to benchmark the game using Mesa's Vulkan overlay. However the overlay didn't show up. After some investigation, it turned out, that the game (X4 binary) does something weird to VK_LAYER_PATH environment variable, namely overrides it with "vulkan/linux" value, which makes Vulkan loader fail to load explicit layers, including the Mesa HUD I was trying to use.
See: https://bugs.freedesktop.org/show_bug.cgi?id=111054
Can you please fix it? The game shouldn't be overriding VK_LAYER_PATH like that.
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH
That's quite strange, but I've got it to run with some workarounds.
I've created an implicit layer definition in ~/.local/share/vulkan/implicit_layer.d like this:
And added following env variables to the launcher:
I've created an implicit layer definition in ~/.local/share/vulkan/implicit_layer.d like this:
Code: Select all
{
"file_format_version" : "1.0.0",
"layer" : {
"name": "VK_LAYER_MESA_overlay_64",
"type": "GLOBAL",
"library_path": "/usr/lib64/libVkLayer_MESA_overlay.so",
"api_version": "1.1.73",
"implementation_version": "1",
"description": "MESA Overlay Layer",
"disable_environment": { "DISABLE_VK_LAYER_MESA_overlay": "1" },
"enable_environment": { "ENABLE_VK_LAYER_MESA_overlay": "1" }
}
}
Code: Select all
VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay_64
ENABLE_VK_LAYER_MESA_overlay=1
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH
Yeah, I expect implicit layers to work. It's explicit ones that are messed up, due to the game messing up VK_LAYER_PATH variable.
A simpler way to work around it, is to create "vulkan/linux" subdirectories under the same location where your X4 binary is, and symlink your VkLayer_MESA_overlay.json there. That will use the hardcoded path in the game, and the HUD will come up.
A simpler way to work around it, is to create "vulkan/linux" subdirectories under the same location where your X4 binary is, and symlink your VkLayer_MESA_overlay.json there. That will use the hardcoded path in the game, and the HUD will come up.
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH
Hi, it was needed for our testing.
I committed a fix, though I can't promise it'll be released with the next minor patch.
It might have to wait for a major release.
I committed a fix, though I can't promise it'll be released with the next minor patch.
It might have to wait for a major release.
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH
Great, thanks! By the way, for testing you can always override the location of the layers using the above mentioned environment variable explicitly when running the binary, so there is no need to hardcode it
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH
Just tested it with latest GOG release (2.60 hotfix 2). This issue is still there. Did you mean some major version like 3.x?
-
- Moderator (English)
- Posts: 4764
- Joined: Fri, 21. Dec 18, 18:23
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
I suggest checking if the issue still exists with the current beta (3.00). If it does then maybe it has been overlooked somehow.
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
I don't have access to 3.0 unfortunately since GOG doesn't provide beta versions (and I have the GOG version). But I'll give it another test once 3.0 hits GOG.Imperial Good wrote: ↑Wed, 25. Dec 19, 05:05I suggest checking if the issue still exists with the current beta (3.00). If it does then maybe it has been overlooked somehow.
-
- Moderator (English)
- Posts: 4764
- Joined: Fri, 21. Dec 18, 18:23
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
Strange, according to the beta instructions GOG should offer the same betas as Steam.
viewtopic.php?f=192&t=405397
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
Interesting, but I don't use Galaxy - it's not wired with Linux releases on GOG backend anyway - it only works with Windows ones. Do you know how to get beta Linux versions on GOG? I'd be really interested. The download through their site doesn't show anything beta related. I'll also ping GOG about it.Imperial Good wrote: ↑Wed, 25. Dec 19, 07:15Strange, according to the beta instructions GOG should offer the same betas as Steam.
viewtopic.php?f=192&t=405397
-
- Moderator (English)
- Posts: 4764
- Joined: Fri, 21. Dec 18, 18:23
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
If the service is not available on Linux that I guess there is no Linux beta sadly.shmerl wrote: ↑Thu, 26. Dec 19, 02:52Interesting, but I don't use Galaxy - it's not wired with Linux releases on GOG backend anyway - it only works with Windows ones. Do you know how to get beta Linux versions on GOG? I'd be really interested. The download through their site doesn't show anything beta related. I'll also ping GOG about it.
-
- Moderator (English)
- Posts: 30436
- Joined: Fri, 16. Apr 04, 19:21
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
CBJ explained it here.
A dog has a master; a cat has domestic staff.
Re: [Linux/bug] Vulkan layers don't work with X4 due to game overriding VK_LAYER_PATH - Fix in a future build.
Linux Beta is not available on GoG.