protonscr

[BUG] vrcompositor sefaults after ~15 seconds with Mesa 26

steamvrclosed bugFixed in Main
ValveSoftware/SteamVR-for-Linux#862 · opened 2026-01-29 by Spacefish · updated 2026-05-06 · 13 comments · github
SSpacefish 2026-01-29 github

When running SteamVR with Mesa 26, there seems to be multiple issues.. The same setup works fine with Mesa 25.3

It seems to work for a couple of seconds, where i am in the compositor and can see the controllers, however the dashboard is not shown, then vrcompositor segfaults.

[  209.493522] RenderThread[9478]: segfault at 0 ip 00006549867e87cb sp 00007af6f74680b0 error 4 in vrcompositor[2ac7cb,65498653c000+50f000] likely on CPU 8 (core 0, socket 0)
[  209.493530] Code: ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 55 48 89 e5 41 56 41 89 ce 41 55 49 89 fd 48 89 f7 41 54 49 89 d4 53 48 83 ec 30 <48> 8b 06 ff 50 18 f6 40 20 10 48 89 c3 0f 85 1a 01 00 00 4d 85 e4

i enabled drm trace logging (see dmesg.log).

When i enable vulkan validation layers i see a lot of

Validation Error: [ VUID-VkImageMemoryBarrier-oldLayout-01208 ] | MessageID = 0xf855a75b
vkCmdPipelineBarrier(): pImageMemoryBarriers[0].newLayout (VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) is not compatible with VkImage 0x80000000008[SwapChainImage] usage flags VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_STORAGE_BIT.
The Vulkan spec states: If srcQueueFamilyIndex and dstQueueFamilyIndex define a queue family ownership transfer or oldLayout and newLayout define an image layout transition, and oldLayout or newLayout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then image must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set (https://vulkan.lunarg.com/doc/view/1.4.335.0/linux/antora/spec/latest/chapters/synchronization.html#VUID-VkImageMemoryBarrier-oldLayout-01208)
Objects: 1
    [0] VkImage 0x80000000008[SwapChainImage]

and

Validation Error: [ VUID-vkCmdBeginRenderPass-initialLayout-00895 ] | MessageID = 0x34f84ef4
(Warning - This VUID has now been reported 10 times, which is the duplicate_message_limit value, this will be the last time reporting it).
vkCmdBeginRenderPass(): pRenderPassBegin->renderPass (VkRenderPass 0x3e300000003e3) was created with pCreateInfo->pAttachments[0].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, but VkFramebuffer 0x3e400000003e4 pAttachments[0] (VkImageView 0xb000000000b[SwapChainImageView]) usage is VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_STORAGE_BIT.
The Vulkan spec states: If any of the initialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set (https://vulkan.lunarg.com/doc/view/1.4.335.0/linux/antora/spec/latest/chapters/renderpass.html#VUID-vkCmdBeginRenderPass-initialLayout-00895)
Objects: 4
    [0] VkImage 0x80000000008[SwapChainImage]
    [1] VkRenderPass 0x3e300000003e3
    [2] VkFramebuffer 0x3e400000003e4
    [3] VkImageView 0xb000000000b[SwapChainImageView]

There are a lot of logmessages like in vrcompositor.log:

Thu Jan 29 2026 23:12:43.902972 [Error] - VulkanVRRenderer::ImportTextureFromSharedHandle - Failed to import shared image.

and in vrclient_wine64-preloader.txt i finds this:

Do Jan 29 2026 22:58:49.941670 [Error] - No GPU timing Vulkan device in CVRCompositorSharedTextures::BeginGPUTimingCommandBuffer!
Do Jan 29 2026 22:58:49.941683 [Error] - No Vulkan command buffer open in CGpuTiming::MarkEvent!
Do Jan 29 2026 22:58:49.941691 [Error] - Invalid command buffer in CVRCompositorSharedTextures::FinishOpenCommandBuffer!
Do Jan 29 2026 22:58:50.032679 [Info] - Enable advanced image processing of scene textures.
Do Jan 29 2026 22:58:50.050939 [Info] - Initializing CVulkanVRRenderer
Do Jan 29 2026 22:58:50.051050 [Info] - Debug utils: disabled, missing entrypoints
Do Jan 29 2026 22:58:50.054066 [Info] - Initialized Vulkan transfer ring buffer, mapped at offset 0x0x7f858ff1e000.
Do Jan 29 2026 22:58:50.054485 [Info] - Supports dmabuf formats + modifiers? - Yes!
Do Jan 29 2026 22:58:50.076608 [Info] - Setting max texture dimensions to 3227x3586 before requiring downsampling
Do Jan 29 2026 22:58:50.078853 [Info] - Created remote Vulkan image 0x4e000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.078921 [Info] - Unsupported Vulkan texture format: -1
Do Jan 29 2026 22:58:50.080889 [Info] - Created remote Vulkan image 0x4f000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.083172 [Info] - Created remote Vulkan image 0x50000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.083243 [Info] - Unsupported Vulkan texture format: -1
Do Jan 29 2026 22:58:50.085186 [Info] - Created remote Vulkan image 0x51000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.086968 [Info] - Created remote Vulkan image 0x52000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.087163 [Info] - Unsupported Vulkan texture format: -1
Do Jan 29 2026 22:58:50.089118 [Info] - Created remote Vulkan image 0x53000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.091123 [Info] - Created remote Vulkan image 0x54000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.091163 [Info] - Unsupported Vulkan texture format: -1
Do Jan 29 2026 22:58:50.092777 [Info] - Created remote Vulkan image 0x55000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.094302 [Info] - Created remote Vulkan image 0x56000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.094326 [Info] - Unsupported Vulkan texture format: -1
Do Jan 29 2026 22:58:50.095881 [Info] - Created remote Vulkan image 0x57000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.097345 [Info] - Created remote Vulkan image 0x58000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.
Do Jan 29 2026 22:58:50.097368 [Info] - Unsupported Vulkan texture format: -1
Do Jan 29 2026 22:58:50.098721 [Info] - Created remote Vulkan image 0x59000077a1, dimensions 2952 x 3280, format 43, memory size 40894464 and memory type 0.

xrclient_wine64-preloader.txt
xrclient_wayvr.txt
webhelper.txt
vrwebhelper_systemui.txt
vrwebhelper_settings_desktop.txt
vrstartup.txt
vrserver.txt
vrmonitor.txt
vrcompositor.txt
vrclient_wine64-preloader.txt
vrclient_vrwebhelper_main.txt
vrclient_vrcompositor.txt
vrclient_steam.txt
steamui_audio.txt
driver_vrlink.txt
console_log.txt
cloud_log.txt
dmesg.log.gz

Kkisak-valve maintainer 2026-01-29 github

Hello @Spacefish, a regression in your video driver should also be reported to your video driver vendor.

SSpacefish 2026-01-29 github

Hello @Spacefish, a regression in your video driver should also be reported to your video driver vendor.

It´s amdgpu / RADV, i see a lot of vulkan validation errors that VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT is missing. Not sure if the crash might be a result of this / a new timing of the newer RADV driver which might trigger the crash now?

SSpacefish 2026-02-19 github

Please see my vibecoded Vulkan Layer in #855 which fixes this. SteamVR does not attach a VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT flag to the swapchain images as well as render target images it seems, if you manually (via a Vulkan Layer) attach this flag anyway, it works flawlessly and doesn´t crash.

CCarbonNotes 2026-02-26 github

Just wanted to say thanks @Spacefish, Debian updated to Mesa 26 and that Vulkan layer works as a bandaid until SteamVR/Mesa can properly identify the problem and fix the issue. Got me video output instead of a blank display with both 2.14.5 as well as 2.15.4.

PPacketdancer 2026-04-07 github

Fixed in 2.16.1, which is now out!

SSpacefish 2026-04-07 github

@Packetdancer still broken for me in 2.16.1 if i enable vulkan validation layers i see:

[2026-04-08 00:10:10] Validation Error: [ VUID-VkImageMemoryBarrier-oldLayout-01208 ] | MessageID = 0xf855a75b
[2026-04-08 00:10:10] vkCmdPipelineBarrier(): pImageMemoryBarriers[0].newLayout (VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) is not compatible with VkImage 0x90000000009[SwapChainImage] usage flags VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_STORAGE_BIT.
[2026-04-08 00:10:10] The Vulkan spec states: If srcQueueFamilyIndex and dstQueueFamilyIndex define a queue family ownership transfer or oldLayout and newLayout define an image layout transition, and oldLayout or newLayout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then image must have been created with the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage flag set (https://vulkan.lunarg.com/doc/view/1.4.335.0/linux/antora/spec/latest/chapters/synchronization.html#VUID-VkImageMemoryBarrier-oldLayout-01208)
[2026-04-08 00:10:10] Objects: 1
[2026-04-08 00:10:10]     [0] VkImage 0x90000000009[SwapChainImage]

Which means the swapchain images are created with VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_STORAGE_BIT and someone tries to change their layout to VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL which is not allowed if they wherent create with VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

see: https://vulkan.lunarg.com/doc/view/1.4.335.0/linux/antora/spec/latest/chapters/synchronization.html#VUID-VkImageMemoryBarrier-oldLayout-01208

There must be a call to vkCreateSwapchainKHR in your SteamVR compositor code, where a VkSwapchainCreateInfoKHR is passed as the second parameter. This VkSwapchainCreateInfoKHR has an imageUsage parameter, where you set VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_STORAGE_BIT however it should be VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_STORAGE_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

PPacketdancer 2026-04-09 github

Hm. I'll reopen the issue then, thanks for the heads-up. Can you confirm what headset/setup you're using?

We cleaned a lot of this up for vrlink, but I wonder if there's another area that got missed...

GGladox114 2026-04-09 · hidden on GitHub github

I assume that my 303 issue where vrcompositor crashes also goes into here as its an issue with Mesa 26. #879

Same with my setup:

Operating System: Arch Linux KDE Plasma Version: 6.6.3 KDE Frameworks Version: 6.24.0 Qt Version: 6.11.0 Kernel Version: 6.19.10-zen1-1-zen (64-bit) Graphics Platform: Wayland Processors: 6 × Intel® Core™ i5-8600K CPU @ 3.60GHz Memory: 26 GB of RAM (25,1 GB usable) Graphics Processor: AMD Radeon RX 6750 XT SteamVR version: 2.16.1

vrcompositor.log

Headset: Valve Index
Mesa Version: 26.0.4-1

SSpacefish 2026-04-10 github

Hm. I'll reopen the issue then, thanks for the heads-up. Can you confirm what headset/setup you're using?

We cleaned a lot of this up for vrlink, but I wonder if there's another area that got missed...

I am using a Valve Index on Wayland (KDE)

I suspect the swap chain setup path is maybe different there. It gets the DRM device via the Wayland DRM leasing protocol, does the mode setting and swap chain setup is probably directly after that.

PPacketdancer 2026-04-28 github

@Spacefish - I forgot to ask this more recently, but is this still happening for you under 2.16.3?

(There's been some changes that I hope might fix this, though none was explicitly for this.)

PPacketdancer 2026-04-28 github

As an aside, I have also gone in and added the color attachment bit to the swapchain even for the async (compute) path, though I forgot to edit the ticket when I did. That's not in 2.16.3, but should be in 2.16.4.

I'm just curious if the other stuff in 2.16.3 had any impact.

SSpacefish 2026-05-03 github

@Packetdancer running 2.16.4 without my custom layer that adds the bit fixes the issue for me. Thanks a lot 👍🏻.

Also thanks for adding timeline semaphores :)

PPacketdancer 2026-05-06 github

The timeline semaphores were not me, but yes, they were an incredibly valuable change.

Nothing extracted yet.