Scenario and the problem:
I'm running two instances of the same Steam game on my main user X. To do that, I'm launching first instance on my main user and the other instance on another user. This works as I intended, but I can't get Vulkan to work on my second instance.
I'm running a second Steam instance from a different user with:
Code:
xhost local:remoto && sudo -u remoto /usr/games/steam -applaunch 1041320
This works great using WINED3D. I'm trying to run it with Vulkan, because the game process will consumption about 50% less CPU with it.
Troubleshooting:
To state that vulkan isn't working running through another user with sudo, I do:
Code:
xhost local:remoto && sudo -u remoto VK_LOADER_DEBUG=all vulkaninfo
The output:
Code:
error: XDG_RUNTIME_DIR not set in the environment.
ERROR: setupLoaderTermPhysDevs: *Failed to detect any valid GPUs in the current config
ERROR: setupLoaderTrampPhysDevs: *Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
I tried to do the scenario above with SSH X11 Forwarding instead of sudo, but I got the exact same result.
The problem isn't Direct Rendering, since I'm running the game just fine with WINED3D with the above scenario.
Output of
Code:
xhost local:remoto && sudo -u remoto glxinfo | grep "OpenGL renderer string"
Code:
non-network local connections being added to access control list
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop
Vulkan works fine if I run VK_LOADER_DEBUG=all vulkaninfo at the 'remoto' user Xsession.