Previously noted at https://github.com/ValveSoftware/steam-for-linux/issues/1890#issuecomment-220858890.
This is a small subset of #1890 that is necessary for interop with the Vulkan-Loader, so I think it would make sense to fix this part even if ~/.steam* need to continue to exist (which, if I understand correctly, they do, because they are "API" used by third-party games).
The larger request in #1890 is to stop using ~/.steam*, and I don't want to get into that.
I encountered a similar issue. Icon files are placed in $XDG_DATA_HOME/icons directory, but .desktop files are placed in $HOME/.local/share/applications directory instead of $XDG_DATA_HOME/applications directory if you put a check "Create an application shortcut" during game installation.
Your system information
Steps for reproducing this issue:
~/.steamout of the way (or delete it, or use a newly-created user)~/.local/share/vulkan/implicit_layer.d(or move it out of the way, or use a newly-created user)XDG_DATA_HOME="$HOME/mock-data-home" steamExpected result
Steam should create
steamfossilize_i386.json,steamfossilize_x86_64.json,steamoverlay_i386.json,steamoverlay_x86_64.jsonin~/mock-data-home/vulkan/implicit_layer.d, where they will be found by all versions of Vulkan-Loader since 1.0.30.0 (specifically KhronosGroup/Vulkan-Loader@6e3ebec) in processes that inherit environment variables from Steam.The Steam Runtime contains Vulkan-Loader 1.2.x (currently 1.2.170, but I'm looking into upgrading to 1.2.198), so we can rely on having at least that version.
Actual result
Steam creates those files in
~/.local/share/vulkan/implicit_layer.d, which will not be searched ifXDG_DATA_HOMEis set.References
Layer discovery is documented here: https://github.com/KhronosGroup/Vulkan-Loader/blob/master/docs/LoaderLayerInterface.md#linux-layer-discovery
On Linux, it follows the XDG basedir spec, searching both the "config" and "data" stacks: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Other notes
I think Steam is correct to install its ICDs into the XDG "user-specific data files" path, but it should match the Vulkan loader's behaviour by following
$XDG_DATA_HOMEinstead of hard-coding~/.local/share.To avoid duplication, it should probably do the equivalent of this for a transitional period, so that the files are removed from
~/.local/shareand only written to$XDG_DATA_HOME, if different: