Direct mode on NVIDIA 460, 465, 470, 495 and 510 causes segmentation fault
Issue description transferred from internal tracker.
On nvidia 450.x direct mode works fine.
On nvidia 460.x (I tested 460.39 from Ubuntu 20.04) a swapchain present segfaults in the nvidia driver. No vulkan validation warnings.
card | driver | status |
---|---|---|
RTX 3080 (LHR) | 510.54 | |
GTX 1080 | 510.54 | |
GTX 970 | 510.47 | |
GTX 1080 | 495.44 | |
GTX 1080 | 470.103 | |
GTX 1080 | 460.39 | |
GTX 1080 | 450.x |
SteamVR works on both drivers, so the issue is something we do different. I suspect an nvidia driver issue.
backtrace from a while ago
DEBUG [comp_window_direct_get_primary_display_mode] found display mode 2160x1200@89.53
DEBUG [comp_window_direct_get_primary_display_mode] Updating compositor settings nominal frame interval from 11111111 (90.000001 Hz) to 11169814 (89.527000 Hz)
DEBUG [comp_target_swapchain_create_image_views] Creating 2 image views.
DEBUG [renderer_allocate_renderings] Allocating 2 Command Buffers.
DEBUG [xrt_gfx_provider_create_system] Done 0x5555560f0c70
DEBUG [system_compositor_create_native_compositor] SYSCOMP_CREATE_NATIVE_COMPOSITOR
Thread 1 "monado-service" received signal SIGSEGV, Segmentation fault.
0x00007fffe82e6da3 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
(gdb) bt full
#0 0x00007fffe82e6da3 in () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
#1 0x00007fffe8587eca in () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
#2 0x00007fffe850083d in () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
#3 0x00007fffe84fcc33 in () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
#4 0x00007fffe84fb4d1 in () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
#5 0x00007fffe85ce620 in () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.460.39
#6 0x00007fffe95ef5bf in () at /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#7 0x0000555555586fcf in comp_target_swapchain_present (ct=0x555556285c20, queue=0x55555660d908, index=1, semaphore=0x5555567f34f8, desired_present_time_ns=2889596630920, present_slop_ns=500000) at ../src/xrt/compositor/main/comp_target_swapchain.c:299
cts = 0x555556285c20
vk = 0x5555560f0e88
__PRETTY_FUNCTION__ = "comp_target_swapchain_present"
times = {presentID = 6, desiredPresentTime = 2889596130920}
timings = {sType = VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE, pNext = 0x0, swapchainCount = 1, pTimes = 0x7fffffffdf60}
presentInfo = {sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, pNext = 0x0, waitSemaphoreCount = 1, pWaitSemaphores = 0x7fffffffdf30, swapchainCount = 1, pSwapchains = 0x555556285cc0, pImageIndices = 0x7fffffffdf3c, pResults = 0x0}
#8 0x00005555555820d0 in comp_target_present (ct=0x555556285c20, queue=0x55555660d908, index=1, semaphore=0x5555567f34f8, desired_present_time_ns=2889596630920, present_slop_ns=500000) at ../src/xrt/compositor/main/comp_target.h:270
#9 0x000055555558468b in renderer_present_swapchain_image (r=0x5555567dfd10, desired_present_time_ns=2889596630920, present_slop_ns=500000) at ../src/xrt/compositor/main/comp_renderer.c:794
ret = -2037304773
__func__ = "renderer_present_swapchain_image"
#10 0x00005555555840d2 in comp_renderer_draw (r=0x5555567dfd10) at ../src/xrt/compositor/main/comp_renderer.c:666
ct = 0x555556285c20
c = 0x5555560f0c70
__PRETTY_FUNCTION__ = "comp_renderer_draw"
#11 0x000055555557f112 in compositor_layer_commit (xc=0x5555560f0c70, frame_id=6, sync_handle=-1) at ../src/xrt/compositor/main/comp_compositor.c:438
c = 0x5555560f0c70
__func__ = "compositor_layer_commit"
slot_id = 0
num_layers = 0
__PRETTY_FUNCTION__ = "compositor_layer_commit"
#12 0x0000555555578ee7 in xrt_comp_layer_commit (xc=0x5555560f0c70, frame_id=6, sync_handle=-1) at ../src/xrt/include/xrt/xrt_compositor.h:997
#13 0x000055555557b0a8 in main_loop (s=0x55555609e330) at ../src/xrt/ipc/server/ipc_server_process.c:882
predicted_display_time_ns = 2889600630920
predicted_display_period_ns = 11169814
now_ns = 2889594464682
diff_ns = 6166238
frame_id = 6
xc = 0x5555560f0c70
#14 0x000055555557b58f in ipc_server_main (argc=1, argv=0x7fffffffe338) at ../src/xrt/ipc/server/ipc_server_process.c:1081
s = 0x55555609e330
ret = 0
__func__ = "ipc_server_main"
#15 0x000055555556c44d in main (argc=1, argv=0x7fffffffe338) at ../src/xrt/targets/service/main.c:26