Mask Vulkan layers in home directory or other non-/usr paths
-
runtime: Never set XDG_DATA_DIRS to just our override directory
This will break the ability to find .desktop files, etc., in their default search paths. Default to /usr/local/share:/usr/share as per the specification.
-
graphics: Add _srt_graphics_get_vulkan_search_paths to internal header
-
runtime: Mask Vulkan layers in home directory or other non-/usr paths
This avoids the Steam fossilize and overlay layers being duplicated in the container's search path.
Resolves: T26160
Merge request reports
Activity
Without this change, a Debian 10 test system lists the Steam layers twice. Running
steam-runtime-system-info
in aPRESSURE_VESSEL_SHELL=instead
environment:"implicit_layers" : [ { "json_path" : "/overrides/share/vulkan/implicit_layer.d/0-i386-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_fossilize_32", "description" : "Steam Pipeline Caching Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/i386-linux-gnu/vulkan_imp_layer/libVkLayer_steam_fossilize.so" }, { "json_path" : "/overrides/share/vulkan/implicit_layer.d/1-x86_64-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_fossilize_64", "description" : "Steam Pipeline Caching Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/libVkLayer_steam_fossilize.so" }, { "json_path" : "/overrides/share/vulkan/implicit_layer.d/2-i386-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_overlay_32", "description" : "Steam Overlay Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/i386-linux-gnu/vulkan_imp_layer/steamoverlayvulkanlayer.so" }, { "json_path" : "/overrides/share/vulkan/implicit_layer.d/3-x86_64-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_overlay_64", "description" : "Steam Overlay Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/steamoverlayvulkanlayer.so" }, { "json_path" : "/home/desktop/.local/share/vulkan/implicit_layer.d/steamfossilize_i386.json", "name" : "VK_LAYER_VALVE_steam_fossilize_32", "description" : "Steam Pipeline Caching Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/home/desktop/.local/share/Steam/ubuntu12_32/libVkLayer_steam_fossilize.so" }, { "json_path" : "/home/desktop/.local/share/vulkan/implicit_layer.d/steamfossilize_x86_64.json", "name" : "VK_LAYER_VALVE_steam_fossilize_64", "description" : "Steam Pipeline Caching Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/home/desktop/.local/share/Steam/ubuntu12_64/libVkLayer_steam_fossilize.so" }, { "json_path" : "/home/desktop/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json", "name" : "VK_LAYER_VALVE_steam_overlay_32", "description" : "Steam Overlay Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/home/desktop/.local/share/Steam/ubuntu12_32/steamoverlayvulkanlayer.so" }, { "json_path" : "/home/desktop/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json", "name" : "VK_LAYER_VALVE_steam_overlay_64", "description" : "Steam Overlay Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/home/desktop/.local/share/Steam/ubuntu12_64/steamoverlayvulkanlayer.so" } ] },
With this change, I only see our remapped version in
/overrides
as expected:"implicit_layers" : [ { "json_path" : "/overrides/share/vulkan/implicit_layer.d/0-i386-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_fossilize_32", "description" : "Steam Pipeline Caching Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/i386-linux-gnu/vulkan_imp_layer/libVkLayer_steam_fossilize.so" }, { "json_path" : "/overrides/share/vulkan/implicit_layer.d/1-x86_64-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_fossilize_64", "description" : "Steam Pipeline Caching Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/libVkLayer_steam_fossilize.so" }, { "json_path" : "/overrides/share/vulkan/implicit_layer.d/2-i386-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_overlay_32", "description" : "Steam Overlay Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/i386-linux-gnu/vulkan_imp_layer/steamoverlayvulkanlayer.so" }, { "json_path" : "/overrides/share/vulkan/implicit_layer.d/3-x86_64-linux-gnu.json", "name" : "VK_LAYER_VALVE_steam_overlay_64", "description" : "Steam Overlay Layer", "type" : "GLOBAL", "api_version" : "1.2.136", "implementation_version" : "1", "library_path" : "/overrides/lib/x86_64-linux-gnu/vulkan_imp_layer/steamoverlayvulkanlayer.so" } ]
and there is a tmpfs mounted on
~/.local/share/vulkan/implicit_layer.d
to mask the unwanted JSON manifests.Unlike the issues fixed in !234 (merged), this doesn't seem to break anything in practice, but it seems more correct like this.
mentioned in commit 63720bbb