The only supported OpenGL formats on Linux are:
https://registry.khronos.org/OpenGL/api/GL/glext.h
such as GL_RGBA8 (reported as 0x81A5) and GL_RGBA16F (reported as 0x8CAC)
Where are you finding these mappings?
I'm not the original poster, and I don't have all the information i would need to publish to get the problem fixed. However, I am having this very problem with the Blender VR Viewport plugin. Crashing on "failed to create swapchain" as mentioned by OP.
Blender currently has a conflict with the NVidia open driver where blender will crash on boot if using the vulkan backend, so i am hitting a hard wall with using this software due to steamvr's unwillingness to use opengl.
NVIDIA-SMI 610.43.03 KMD Version: 610.43.03 CUDA UMD Version: 13.3
Kernel: Linux 7.1.3-2-cachyos
SteamVR 2.16.7
Steam Client Update released July 22nd. (Pacman states cachyos/steam version 1.0.0.86-2)
Here is the blender console output (blenderfucky.txt). If you need more information of me, please point me in the direction of the tools to actually obtain that information, as i'm rather clueless and new to Linux's internal systems.
Nothing extracted yet.
Describe the bug
When attempting to run OpenXR applications using the OpenGL graphics backend on Linux via SteamVR (version 2.9.6 confirmed), the
xrCreateSwapchainfunction call fails withXR_ERROR_RUNTIME_FAILURE. Detailed logs reveal a precedingGL_INVALID_OPERATIONerror occurring during the swapchain creation process.This failure occurs even when using swapchain formats that are reported as supported by SteamVR via
xrEnumerateSwapchainFormats, such asGL_RGBA8(reported as0x81A5) andGL_RGBA16F(reported as0x8CAC).Furthermore, there is a notable discrepancy between the format values reported by SteamVR for some formats (e.g.,
0x8CACforGL_RGBA16F) and the values defined in standard OpenGL header files like<GL/glcorearb.h>or GLAD-generated headers (which consistently defineGL_RGBA16Fas0x881A). While this value mismatch itself can cause format selection issues in applications relying on header definitions, the core problem reported here is that even when this mismatch is manually bypassed (by using the runtime-reported values), thexrCreateSwapchaincall still fundamentally fails within the SteamVR runtime.The Vulkan graphics backend works correctly under the same conditions.
To Reproduce
Steps to reproduce the behavior:
hello_xrsample application on a Linux system.hello_xrsample from the build directory with the OpenGL backend specified:./hello_xr -g OpenGLXR_ERROR_RUNTIME_FAILUREoriginating fromxrCreateSwapchainafter selecting a swapchain format (eitherGL_RGBA8orGL_RGBA16F, depending on application preference logic if modified). Detailed logs show a precedingGL_INVALID_OPERATIONerror.(Self-correction for header value mismatch required to even reach
xrCreateSwapchain: The stockhello_xrmight fail earlier due to the format value mismatch. To reproduce thexrCreateSwapchainfailure itself, one needs to modifySelectColorSwapchainFormatingraphicsplugin_opengl.cppto either hardcode the runtime-reported values like36012/ 0x8CAC / or33189/ 0x81A5 /, or implement logic that explicitly searches for these values in the list returned byxrEnumerateSwapchainFormats.)Expected behavior
hello_xr -g OpenGLshould successfully create the OpenGL swapchain using one of the formats reported as supported by SteamVR (likeGL_RGBA8orGL_RGBA16F) and launch the application, rendering the VR scene.System Information (please complete the following information):
Issue reproduced on SteamVR Stable 2.9.6.
Screenshots
Not applicable. Relevant console logs showing enumerated formats and the subsequent failure will be attached separately.
Additional context
./hello_xr -g Vulkan2) works without issues on the same system setup.xrCreateSwapchainfailing with internal OpenGL errors within the runtime) strongly suggests the root cause lies within SteamVR's OpenXR/OpenGL handling, likely independent of ALVR.GL_RGBA16F(0x8CACvs0x881A). While this value mismatch is problematic for application compatibility, the core issue is thatxrCreateSwapchainfails even when this mismatch is bypassed by using the runtime-reported values.GL_RGBA8(value0x81A5matched headers) also fails duringxrCreateSwapchain.