Skip to content
Snippets Groups Projects

Mask Vulkan layers in home directory or other non-/usr paths

Merged Simon McVittie requested to merge wip/t26160 into master
  • 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Without this change, a Debian 10 test system lists the Steam layers twice. Running steam-runtime-system-info in a PRESSURE_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.

  • Ludovico de Nittis approved this merge request

    approved this merge request

  • mentioned in commit 63720bbb

Please register or sign in to reply
Loading