Failed to choose the 12-bit precision window on AMD graphics card

hi community and team,
I encountered problems while setting up Psychtoolbox to achieve a precision of 12 bits. My configuration is as follows:
OS: Ubuntu 22.04.5 LTS;
GPU: AMD® Radeon pro w7600;
Matlab: R2024b;
I installed the Psychtoolbox for Matlab from NeuroDebian.
My settings for achieving a precision of 12 bits are:

PsychDefaultSetup(2); 
PsychImaging('PrepareConfiguration'); 
PsychImaging('AddTask', 'General', 'EnableNative16BitFrameBuffer'); 
PsychImaging('AddTask', 'General', 'NormalizedHighresColorRange'); 
controlScreen = screens(1);
testScreen1 = screens(2); 
testScreen2 = screens(3); 
[testWindowPtr1, testScreenRect1] = Psychimaging('OpenWindow', testScreen1, 0); [testWindowPtr2, testScreenRect2] = Psychimaging('OpenWindow', testScreen2, 0);

The following runtime information was obtained:

PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.19 - Build date: Jun 22 2024).
PTB-INFO: OS support status: Linux 6.8.0-59-generic Supported.
PTB-INFO: Type ‘PsychtoolboxVersion’ for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file ‘License.txt’ in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: For information about paid support, support memberships and other commercial services, please type
PTB-INFO: ‘PsychPaidSupportAndServices’.

PTB-INFO: Trying to enable at least 10 bpc fixed point framebuffer.
PTB-INFO: Linux native 10 bit per color framebuffer requested, and the OS claims it is working fine. Good.
PTB-INFO: Real (OS native, queried) color resolution of the GPU framebuffer is 10 bits per RGB color component.
PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.

PTB-INFO: OpenGL-Renderer is AMD :: GFX1102 (gfx1102, LLVM 15.0.7, DRM 3.57, 6.8.0-59-generic) :: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
PTB-INFO: VBL startline = 2160 , VBL Endline = -1
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.666775 ms [59.999611 Hz]. (50 valid samples taken, stddev=0.002555 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.666944 ms [59.999001 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Using usercode override framebuffer rect [0, 0, 3840, 2160] for image processing.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049633 …
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing. Alpha blending should work correctly.
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus post-processing (if any).
PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.
PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-1] of screen 1.
PsychVulkanCore-ERROR: Could not find any suitable gpu to present to given window for requested settings!
Error in function OpenWindow: Usage error
Failed to open vulkan output window.

i wonder if PsychVulkanCore-ERROR: Could not find any suitable gpu to present to given window for requested settings! means that i have a unsupported amd gpu for Psychtoolbox.

Judging from other PTB-INFO, it seems that there is no problem with my settings. However, in the end, it tells me that it is unable to create the window I need.

I would be grateful for any suggestions and replies.

-ziyuan

Note that the ‘NormalizedHighresColorRange’ task below is fine to specify for extra documentation, but it is not strictly needed to specify, as it is implied by both the high bit precision framebuffer task ‘EnableNative16BitFrameBuffer’, and iirc by PsychDefaultSetup(2). This just as a remark, with no relevance to your problem.

Also, if you only want to use the highest precision 12 bpc mode, you don’t need to enable 10 bit color depth for the X-Screen via XOrgConfCreator generated config files, as this Vulkan powered high precision mode is independent of the “regular” OpenGL driven 8 and 10 bpc modes. Doesn’t help here, probably also doesn’t hurt. One case it may hurt is if you’d use 10 bpc mode on the same X-Screen as the Matlab GUI, as Matlab has a bug that has been reported long ago to Mathworks, but never been fixed, in that their whole GUI freezes or crashes on 10 bit display X-Screens! It can be avoided by running Matlab in a terminal window without GUI (matlab -nodesktop), or using GNU/Octave instead, or using 10 bit mode only on non-GUI X-Screens ie. screen 1,2,3… like you probably do, or by using the Vulkan display backend, like you do here implicitely by using 16 bpc mode… Again, good to know about this embarassing flaw of Matlab, compared to Octave, but not relevant to your problem. Just sayin…

The output looks good until the end, and your GPU should be supported. Could be something related to your first failed attempt with the downloaded AMD drivers messing something up. Could be that the required AMDVLK Vulkan driver is not properly installed, which would cause a fallback to Mesa’s standard RADV Vulkan driver - which can’t do this 16 bpc ~ effective 12 bpc output mode.

Execute PsychVulkan('Verbosity', 5) and then rerun your code, for more diagnostic debug output and then report back.

-mario

Thanks for your prompt reply Mario!

As for your previous suggestion, I chose to reinstall the system(install amdvlk only), so I think “the first failed attempt with the downloaded AMD drivers” will not affect this setting.

What i did this time:
XOrgConfCreator the config file for 3screens and select NO for the advanced setting without the default 10bit;

Then Execute:
PsychVulkan('Verbosity', 5) it return 3;

Rerun the code:

PsychDefaultSetup(2); 
PsychImaging('PrepareConfiguration'); 
PsychImaging('AddTask', 'General', 'EnableNative16BitFrameBuffer');
controlScreen = screens(1);
testScreen1 = screens(2); 
testScreen2 = screens(3); 
[testWindowPtr1, testScreenRect1] = Psychimaging('OpenWindow', testScreen1, 0);

The Reported PTB-Info:

PsychVulkanCore-INFO: At startup there are 23 Vulkan instance extensions available.

PsychVulkanCore-INFO: 0. instance extension is ‘VK_KHR_device_group_creation’.

PsychVulkanCore-INFO: 1. instance extension is ‘VK_KHR_display’.

PsychVulkanCore-INFO: 2. instance extension is ‘VK_KHR_external_fence_capabilities’.

PsychVulkanCore-INFO: 3. instance extension is ‘VK_KHR_external_memory_capabilities’.

PsychVulkanCore-INFO: 4. instance extension is ‘VK_KHR_external_semaphore_capabilities’.

PsychVulkanCore-INFO: 5. instance extension is ‘VK_KHR_get_display_properties2’.

PsychVulkanCore-INFO: 6. instance extension is ‘VK_KHR_get_physical_device_properties2’.

PsychVulkanCore-INFO: 7. instance extension is ‘VK_KHR_get_surface_capabilities2’.

PsychVulkanCore-INFO: 8. instance extension is ‘VK_KHR_surface’.

PsychVulkanCore-INFO: 9. instance extension is ‘VK_KHR_wayland_surface’.

PsychVulkanCore-INFO: 10. instance extension is ‘VK_KHR_xcb_surface’.

PsychVulkanCore-INFO: 11. instance extension is ‘VK_KHR_xlib_surface’.

PsychVulkanCore-INFO: 12. instance extension is ‘VK_EXT_acquire_xlib_display’.

PsychVulkanCore-INFO: 13. instance extension is ‘VK_EXT_debug_report’.

PsychVulkanCore-INFO: 14. instance extension is ‘VK_EXT_debug_utils’.

PsychVulkanCore-INFO: 15. instance extension is ‘VK_EXT_direct_mode_display’.

PsychVulkanCore-INFO: 16. instance extension is ‘VK_EXT_display_surface_counter’.

PsychVulkanCore-INFO: 17. instance extension is ‘VK_EXT_swapchain_colorspace’.

PsychVulkanCore-INFO: 18. instance extension is ‘VK_KHR_surface_protected_capabilities’.

PsychVulkanCore-INFO: 19. instance extension is ‘VK_EXT_acquire_drm_display’.

PsychVulkanCore-INFO: 20. instance extension is ‘VK_EXT_surface_maintenance1’.

PsychVulkanCore-INFO: 21. instance extension is ‘VK_KHR_portability_enumeration’.

PsychVulkanCore-INFO: 22. instance extension is ‘VK_LUNARG_direct_driver_loading’.

PsychVulkanCore-INFO: Found and enabled 0. instance extension ‘VK_KHR_surface’.

PsychVulkanCore-INFO: Found and enabled 1. instance extension ‘VK_KHR_get_surface_capabilities2’.

PsychVulkanCore-INFO: Found and enabled 2. instance extension ‘VK_KHR_external_memory_capabilities’.

PsychVulkanCore-INFO: Found and enabled 3. instance extension ‘VK_KHR_external_semaphore_capabilities’.

PsychVulkanCore-INFO: Found and enabled 4. instance extension ‘VK_KHR_get_physical_device_properties2’.

PsychVulkanCore-INFO: Found and enabled 5. instance extension ‘VK_EXT_debug_utils’.

PsychVulkanCore-INFO: Found and enabled 6. instance extension ‘VK_KHR_xlib_surface’.

PsychVulkanCore-INFO: Found and enabled 7. instance extension ‘VK_EXT_acquire_xlib_display’.

PsychVulkanCore-INFO: Found and enabled 8. instance extension ‘VK_KHR_display’.

PsychVulkanCore-INFO: Found and enabled 9. instance extension ‘VK_EXT_direct_mode_display’.

PsychVulkanCore-INFO: Found and enabled 10. instance extension ‘VK_EXT_swapchain_colorspace’.

PsychVulkanCore-INFO: Vulkan instance (version 1.3.290) created.

PsychVulkanCore-INFO: At startup there are 1 Vulkan devices available.

PsychVulkanCore-INFO: GPU 0: ‘Unknown AMD GPU’ : Vulkan 1.4.313 : VendorId 0x1002 : DeviceId 0x7480 : Discrete graphics card.

PsychVulkanCore-INFO: GPU 0: Driver ‘AMD open-source driver’ [2025.Q2.1 (LLPC)] : Driver version 0x80015d

PsychVulkanCore-INFO: GPU 0: Probing the following 182 device extensions against required set.

PsychVulkanCore-INFO: 0. device extension is ‘VK_KHR_16bit_storage’.

PsychVulkanCore-INFO: 1. device extension is ‘VK_KHR_8bit_storage’.

PsychVulkanCore-INFO: 2. device extension is ‘VK_KHR_acceleration_structure’.

PsychVulkanCore-INFO: 3. device extension is ‘VK_KHR_bind_memory2’.

PsychVulkanCore-INFO: 4. device extension is ‘VK_KHR_buffer_device_address’.

PsychVulkanCore-INFO: 5. device extension is ‘VK_KHR_calibrated_timestamps’.

PsychVulkanCore-INFO: 6. device extension is ‘VK_KHR_compute_shader_derivatives’.

PsychVulkanCore-INFO: 7. device extension is ‘VK_KHR_cooperative_matrix’.

PsychVulkanCore-INFO: 8. device extension is ‘VK_KHR_copy_commands2’.

PsychVulkanCore-INFO: 9. device extension is ‘VK_KHR_create_renderpass2’.

PsychVulkanCore-INFO: 10. device extension is ‘VK_KHR_dedicated_allocation’.

PsychVulkanCore-INFO: 11. device extension is ‘VK_KHR_deferred_host_operations’.

PsychVulkanCore-INFO: 12. device extension is ‘VK_KHR_depth_stencil_resolve’.

PsychVulkanCore-INFO: 13. device extension is ‘VK_KHR_descriptor_update_template’.

PsychVulkanCore-INFO: 14. device extension is ‘VK_KHR_device_group’.

PsychVulkanCore-INFO: 15. device extension is ‘VK_KHR_draw_indirect_count’.

PsychVulkanCore-INFO: 16. device extension is ‘VK_KHR_driver_properties’.

PsychVulkanCore-INFO: 17. device extension is ‘VK_KHR_dynamic_rendering’.

PsychVulkanCore-INFO: 18. device extension is ‘VK_KHR_dynamic_rendering_local_read’.

PsychVulkanCore-INFO: 19. device extension is ‘VK_KHR_external_fence’.

PsychVulkanCore-INFO: 20. device extension is ‘VK_KHR_external_fence_fd’.

PsychVulkanCore-INFO: 21. device extension is ‘VK_KHR_external_memory’.

PsychVulkanCore-INFO: 22. device extension is ‘VK_KHR_external_memory_fd’.

PsychVulkanCore-INFO: 23. device extension is ‘VK_KHR_external_semaphore’.

PsychVulkanCore-INFO: 24. device extension is ‘VK_KHR_external_semaphore_fd’.

PsychVulkanCore-INFO: 25. device extension is ‘VK_KHR_format_feature_flags2’.

PsychVulkanCore-INFO: 26. device extension is ‘VK_KHR_fragment_shader_barycentric’.

PsychVulkanCore-INFO: 27. device extension is ‘VK_KHR_fragment_shading_rate’.

PsychVulkanCore-INFO: 28. device extension is ‘VK_KHR_get_memory_requirements2’.

PsychVulkanCore-INFO: 29. device extension is ‘VK_KHR_global_priority’.

PsychVulkanCore-INFO: 30. device extension is ‘VK_KHR_imageless_framebuffer’.

PsychVulkanCore-INFO: 31. device extension is ‘VK_KHR_image_format_list’.

PsychVulkanCore-INFO: 32. device extension is ‘VK_KHR_index_type_uint8’.

PsychVulkanCore-INFO: 33. device extension is ‘VK_KHR_line_rasterization’.

PsychVulkanCore-INFO: 34. device extension is ‘VK_KHR_load_store_op_none’.

PsychVulkanCore-INFO: 35. device extension is ‘VK_KHR_maintenance1’.

PsychVulkanCore-INFO: 36. device extension is ‘VK_KHR_maintenance2’.

PsychVulkanCore-INFO: 37. device extension is ‘VK_KHR_maintenance3’.

PsychVulkanCore-INFO: 38. device extension is ‘VK_KHR_maintenance4’.

PsychVulkanCore-INFO: 39. device extension is ‘VK_KHR_maintenance5’.

PsychVulkanCore-INFO: 40. device extension is ‘VK_KHR_maintenance6’.

PsychVulkanCore-INFO: 41. device extension is ‘VK_KHR_maintenance7’.

PsychVulkanCore-INFO: 42. device extension is ‘VK_KHR_maintenance8’.

PsychVulkanCore-INFO: 43. device extension is ‘VK_KHR_map_memory2’.

PsychVulkanCore-INFO: 44. device extension is ‘VK_KHR_multiview’.

PsychVulkanCore-INFO: 45. device extension is ‘VK_KHR_pipeline_binary’.

PsychVulkanCore-INFO: 46. device extension is ‘VK_KHR_pipeline_executable_properties’.

PsychVulkanCore-INFO: 47. device extension is ‘VK_KHR_pipeline_library’.

PsychVulkanCore-INFO: 48. device extension is ‘VK_KHR_push_descriptor’.

PsychVulkanCore-INFO: 49. device extension is ‘VK_KHR_ray_query’.

PsychVulkanCore-INFO: 50. device extension is ‘VK_KHR_ray_tracing_maintenance1’.

PsychVulkanCore-INFO: 51. device extension is ‘VK_KHR_ray_tracing_pipeline’.

PsychVulkanCore-INFO: 52. device extension is ‘VK_KHR_ray_tracing_position_fetch’.

PsychVulkanCore-INFO: 53. device extension is ‘VK_KHR_relaxed_block_layout’.

PsychVulkanCore-INFO: 54. device extension is ‘VK_KHR_sampler_mirror_clamp_to_edge’.

PsychVulkanCore-INFO: 55. device extension is ‘VK_KHR_sampler_ycbcr_conversion’.

PsychVulkanCore-INFO: 56. device extension is ‘VK_KHR_separate_depth_stencil_layouts’.

PsychVulkanCore-INFO: 57. device extension is ‘VK_KHR_shader_atomic_int64’.

PsychVulkanCore-INFO: 58. device extension is ‘VK_KHR_shader_clock’.

PsychVulkanCore-INFO: 59. device extension is ‘VK_KHR_shader_draw_parameters’.

PsychVulkanCore-INFO: 60. device extension is ‘VK_KHR_shader_expect_assume’.

PsychVulkanCore-INFO: 61. device extension is ‘VK_KHR_shader_float16_int8’.

PsychVulkanCore-INFO: 62. device extension is ‘VK_KHR_shader_float_controls’.

PsychVulkanCore-INFO: 63. device extension is ‘VK_KHR_shader_float_controls2’.

PsychVulkanCore-INFO: 64. device extension is ‘VK_KHR_shader_integer_dot_product’.

PsychVulkanCore-INFO: 65. device extension is ‘VK_KHR_shader_maximal_reconvergence’.

PsychVulkanCore-INFO: 66. device extension is ‘VK_KHR_shader_non_semantic_info’.

PsychVulkanCore-INFO: 67. device extension is ‘VK_KHR_shader_quad_control’.

PsychVulkanCore-INFO: 68. device extension is ‘VK_KHR_shader_subgroup_extended_types’.

PsychVulkanCore-INFO: 69. device extension is ‘VK_KHR_shader_subgroup_rotate’.

PsychVulkanCore-INFO: 70. device extension is ‘VK_KHR_shader_subgroup_uniform_control_flow’.

PsychVulkanCore-INFO: 71. device extension is ‘VK_KHR_shader_terminate_invocation’.

PsychVulkanCore-INFO: 72. device extension is ‘VK_KHR_spirv_1_4’.

PsychVulkanCore-INFO: 73. device extension is ‘VK_KHR_storage_buffer_storage_class’.

PsychVulkanCore-INFO: 74. device extension is ‘VK_KHR_swapchain’.

PsychVulkanCore-INFO: 75. device extension is ‘VK_KHR_swapchain_mutable_format’.

PsychVulkanCore-INFO: 76. device extension is ‘VK_KHR_synchronization2’.

PsychVulkanCore-INFO: 77. device extension is ‘VK_KHR_timeline_semaphore’.

PsychVulkanCore-INFO: 78. device extension is ‘VK_KHR_uniform_buffer_standard_layout’.

PsychVulkanCore-INFO: 79. device extension is ‘VK_KHR_variable_pointers’.

PsychVulkanCore-INFO: 80. device extension is ‘VK_KHR_vertex_attribute_divisor’.

PsychVulkanCore-INFO: 81. device extension is ‘VK_KHR_vulkan_memory_model’.

PsychVulkanCore-INFO: 82. device extension is ‘VK_KHR_workgroup_memory_explicit_layout’.

PsychVulkanCore-INFO: 83. device extension is ‘VK_KHR_zero_initialize_workgroup_memory’.

PsychVulkanCore-INFO: 84. device extension is ‘VK_EXT_4444_formats’.

PsychVulkanCore-INFO: 85. device extension is ‘VK_EXT_attachment_feedback_loop_layout’.

PsychVulkanCore-INFO: 86. device extension is ‘VK_EXT_border_color_swizzle’.

PsychVulkanCore-INFO: 87. device extension is ‘VK_EXT_calibrated_timestamps’.

PsychVulkanCore-INFO: 88. device extension is ‘VK_EXT_color_write_enable’.

PsychVulkanCore-INFO: 89. device extension is ‘VK_EXT_conditional_rendering’.

PsychVulkanCore-INFO: 90. device extension is ‘VK_EXT_conservative_rasterization’.

PsychVulkanCore-INFO: 91. device extension is ‘VK_EXT_custom_border_color’.

PsychVulkanCore-INFO: 92. device extension is ‘VK_EXT_depth_clamp_control’.

PsychVulkanCore-INFO: 93. device extension is ‘VK_EXT_depth_clamp_zero_one’.

PsychVulkanCore-INFO: 94. device extension is ‘VK_EXT_depth_clip_control’.

PsychVulkanCore-INFO: 95. device extension is ‘VK_EXT_depth_clip_enable’.

PsychVulkanCore-INFO: 96. device extension is ‘VK_EXT_depth_range_unrestricted’.

PsychVulkanCore-INFO: 97. device extension is ‘VK_EXT_descriptor_buffer’.

PsychVulkanCore-INFO: 98. device extension is ‘VK_EXT_descriptor_indexing’.

PsychVulkanCore-INFO: 99. device extension is ‘VK_EXT_device_address_binding_report’.

PsychVulkanCore-INFO: 100. device extension is ‘VK_EXT_dynamic_rendering_unused_attachments’.

PsychVulkanCore-INFO: 101. device extension is ‘VK_EXT_extended_dynamic_state’.

PsychVulkanCore-INFO: 102. device extension is ‘VK_EXT_extended_dynamic_state2’.

PsychVulkanCore-INFO: 103. device extension is ‘VK_EXT_extended_dynamic_state3’.

PsychVulkanCore-INFO: 104. device extension is ‘VK_EXT_external_memory_dma_buf’.

PsychVulkanCore-INFO: 105. device extension is ‘VK_EXT_external_memory_host’.

PsychVulkanCore-INFO: 106. device extension is ‘VK_EXT_fragment_shader_interlock’.

PsychVulkanCore-INFO: 107. device extension is ‘VK_EXT_frame_boundary’.

PsychVulkanCore-INFO: 108. device extension is ‘VK_EXT_global_priority’.

PsychVulkanCore-INFO: 109. device extension is ‘VK_EXT_global_priority_query’.

PsychVulkanCore-INFO: 110. device extension is ‘VK_EXT_graphics_pipeline_library’.

PsychVulkanCore-INFO: 111. device extension is ‘VK_EXT_hdr_metadata’.

PsychVulkanCore-INFO: 112. device extension is ‘VK_EXT_host_query_reset’.

PsychVulkanCore-INFO: 113. device extension is ‘VK_EXT_image_2d_view_of_3d’.

PsychVulkanCore-INFO: 114. device extension is ‘VK_EXT_image_drm_format_modifier’.

PsychVulkanCore-INFO: 115. device extension is ‘VK_EXT_image_robustness’.

PsychVulkanCore-INFO: 116. device extension is ‘VK_EXT_image_sliced_view_of_3d’.

PsychVulkanCore-INFO: 117. device extension is ‘VK_EXT_image_view_min_lod’.

PsychVulkanCore-INFO: 118. device extension is ‘VK_EXT_index_type_uint8’.

PsychVulkanCore-INFO: 119. device extension is ‘VK_EXT_inline_uniform_block’.

PsychVulkanCore-INFO: 120. device extension is ‘VK_EXT_line_rasterization’.

PsychVulkanCore-INFO: 121. device extension is ‘VK_EXT_load_store_op_none’.

PsychVulkanCore-INFO: 122. device extension is ‘VK_EXT_memory_budget’.

PsychVulkanCore-INFO: 123. device extension is ‘VK_EXT_memory_priority’.

PsychVulkanCore-INFO: 124. device extension is ‘VK_EXT_mutable_descriptor_type’.

PsychVulkanCore-INFO: 125. device extension is ‘VK_EXT_nested_command_buffer’.

PsychVulkanCore-INFO: 126. device extension is ‘VK_EXT_non_seamless_cube_map’.

PsychVulkanCore-INFO: 127. device extension is ‘VK_EXT_pageable_device_local_memory’.

PsychVulkanCore-INFO: 128. device extension is ‘VK_EXT_pci_bus_info’.

PsychVulkanCore-INFO: 129. device extension is ‘VK_EXT_physical_device_drm’.

PsychVulkanCore-INFO: 130. device extension is ‘VK_EXT_pipeline_creation_cache_control’.

PsychVulkanCore-INFO: 131. device extension is ‘VK_EXT_pipeline_creation_feedback’.

PsychVulkanCore-INFO: 132. device extension is ‘VK_EXT_pipeline_library_group_handles’.

PsychVulkanCore-INFO: 133. device extension is ‘VK_EXT_post_depth_coverage’.

PsychVulkanCore-INFO: 134. device extension is ‘VK_EXT_primitive_topology_list_restart’.

PsychVulkanCore-INFO: 135. device extension is ‘VK_EXT_primitives_generated_query’.

PsychVulkanCore-INFO: 136. device extension is ‘VK_EXT_private_data’.

PsychVulkanCore-INFO: 137. device extension is ‘VK_EXT_provoking_vertex’.

PsychVulkanCore-INFO: 138. device extension is ‘VK_EXT_queue_family_foreign’.

PsychVulkanCore-INFO: 139. device extension is ‘VK_EXT_robustness2’.

PsychVulkanCore-INFO: 140. device extension is ‘VK_EXT_sampler_filter_minmax’.

PsychVulkanCore-INFO: 141. device extension is ‘VK_EXT_sample_locations’.

PsychVulkanCore-INFO: 142. device extension is ‘VK_EXT_scalar_block_layout’.

PsychVulkanCore-INFO: 143. device extension is ‘VK_EXT_separate_stencil_usage’.

PsychVulkanCore-INFO: 144. device extension is ‘VK_EXT_shader_atomic_float’.

PsychVulkanCore-INFO: 145. device extension is ‘VK_EXT_shader_atomic_float2’.

PsychVulkanCore-INFO: 146. device extension is ‘VK_EXT_shader_demote_to_helper_invocation’.

PsychVulkanCore-INFO: 147. device extension is ‘VK_EXT_shader_image_atomic_int64’.

PsychVulkanCore-INFO: 148. device extension is ‘VK_EXT_shader_module_identifier’.

PsychVulkanCore-INFO: 149. device extension is ‘VK_EXT_shader_replicated_composites’.

PsychVulkanCore-INFO: 150. device extension is ‘VK_EXT_shader_stencil_export’.

PsychVulkanCore-INFO: 151. device extension is ‘VK_EXT_shader_subgroup_ballot’.

PsychVulkanCore-INFO: 152. device extension is ‘VK_EXT_shader_subgroup_vote’.

PsychVulkanCore-INFO: 153. device extension is ‘VK_EXT_shader_viewport_index_layer’.

PsychVulkanCore-INFO: 154. device extension is ‘VK_EXT_subgroup_size_control’.

PsychVulkanCore-INFO: 155. device extension is ‘VK_EXT_texel_buffer_alignment’.

PsychVulkanCore-INFO: 156. device extension is ‘VK_EXT_tooling_info’.

PsychVulkanCore-INFO: 157. device extension is ‘VK_EXT_transform_feedback’.

PsychVulkanCore-INFO: 158. device extension is ‘VK_EXT_vertex_attribute_divisor’.

PsychVulkanCore-INFO: 159. device extension is ‘VK_EXT_vertex_input_dynamic_state’.

PsychVulkanCore-INFO: 160. device extension is ‘VK_EXT_ycbcr_image_arrays’.

PsychVulkanCore-INFO: 161. device extension is ‘VK_AMD_buffer_marker’.

PsychVulkanCore-INFO: 162. device extension is ‘VK_AMD_device_coherent_memory’.

PsychVulkanCore-INFO: 163. device extension is ‘VK_AMD_draw_indirect_count’.

PsychVulkanCore-INFO: 164. device extension is ‘VK_AMD_gcn_shader’.

PsychVulkanCore-INFO: 165. device extension is ‘VK_AMD_gpa_interface’.

PsychVulkanCore-INFO: 166. device extension is ‘VK_AMD_gpu_shader_half_float’.

PsychVulkanCore-INFO: 167. device extension is ‘VK_AMD_gpu_shader_int16’.

PsychVulkanCore-INFO: 168. device extension is ‘VK_AMD_memory_overallocation_behavior’.

PsychVulkanCore-INFO: 169. device extension is ‘VK_AMD_mixed_attachment_samples’.

PsychVulkanCore-INFO: 170. device extension is ‘VK_AMD_shader_ballot’.

PsychVulkanCore-INFO: 171. device extension is ‘VK_AMD_shader_core_properties’.

PsychVulkanCore-INFO: 172. device extension is ‘VK_AMD_shader_core_properties2’.

PsychVulkanCore-INFO: 173. device extension is ‘VK_AMD_shader_early_and_late_fragment_tests’.

PsychVulkanCore-INFO: 174. device extension is ‘VK_AMD_shader_explicit_vertex_parameter’.

PsychVulkanCore-INFO: 175. device extension is ‘VK_AMD_shader_image_load_store_lod’.

PsychVulkanCore-INFO: 176. device extension is ‘VK_AMD_shader_info’.

PsychVulkanCore-INFO: 177. device extension is ‘VK_AMD_shader_trinary_minmax’.

PsychVulkanCore-INFO: 178. device extension is ‘VK_GOOGLE_decorate_string’.

PsychVulkanCore-INFO: 179. device extension is ‘VK_GOOGLE_hlsl_functionality1’.

PsychVulkanCore-INFO: 180. device extension is ‘VK_GOOGLE_user_type’.

PsychVulkanCore-INFO: 181. device extension is ‘VK_VALVE_mutable_descriptor_type’.

PsychVulkanCore-INFO: Found and enabled 0. device extension ‘VK_KHR_swapchain’.

PsychVulkanCore-INFO: Found and enabled 1. device extension ‘VK_KHR_external_memory’.

PsychVulkanCore-INFO: Found and enabled 2. device extension ‘VK_KHR_external_semaphore’.

PsychVulkanCore-INFO: Found and enabled 3. device extension ‘VK_KHR_maintenance1’.

PsychVulkanCore-INFO: Found and enabled 4. device extension ‘VK_KHR_external_memory_fd’.

PsychVulkanCore-INFO: Found and enabled 5. device extension ‘VK_KHR_external_semaphore_fd’.

PsychVulkanCore-INFO: Found and enabled 6. device extension ‘VK_EXT_hdr_metadata’.

PsychVulkanCore-INFO: Device extension ‘VK_AMD_display_native_hdr’ is not supported.

PsychVulkanCore-INFO: Device extension ‘VK_GOOGLE_display_timing’ is not supported.

PsychVulkanCore-INFO: Device extension ‘VK_KHR_present_wait’ is not supported.

PsychVulkanCore-INFO: Device extension ‘VK_KHR_present_id’ is not supported.

PsychVulkanCore-INFO: GPU 0: ACCEPTED AND ACTIVATED! Count now 1

PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-1] of screen 1.

PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.19 - Build date: Jun 22 2024).

PTB-INFO: OS support status: Linux 6.8.0-59-generic Supported.

PTB-INFO: Type ‘PsychtoolboxVersion’ for more detailed version information.

PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with

PTB-INFO: some restrictions. See file ‘License.txt’ in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: For information about paid support, support memberships and other commercial services, please type

PTB-INFO: ‘PsychPaidSupportAndServices’.

PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.

PTB-INFO: OpenGL-Renderer is AMD :: GFX1102 (gfx1102, LLVM 15.0.7, DRM 3.57, 6.8.0-59-generic) :: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

PTB-INFO: VBL startline = 2160 , VBL Endline = -1

PTB-INFO: Measured monitor refresh interval from VBLsync = 16.671863 ms [59.981300 Hz]. (50 valid samples taken, stddev=0.002016 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 16.666944 ms [59.999001 Hz].

PTB-INFO: Small deviations between reported values are normal and no reason to worry.

PTB-INFO: Using usercode override framebuffer rect [0, 0, 3840, 2160] for image processing.

PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049633 …

PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing. Alpha blending should work correctly.

PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus post-processing (if any).

PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.

PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-1] of screen 1.

PsychVulkanCore-INFO: gpu [Unknown AMD GPU] has access to target display 0x74c3bd698000. Trying to switch to direct display mode…

PsychVulkanCore-INFO: gpu [Unknown AMD GPU] display 0x74c3bd698000 switched to direct display mode. Setting up for direct display surface.

PsychVulkanCore-INFO: Target 3840 x 2160 @60.000000 Hz versus mode[0]: 3840 x 2160 @59.999001 Hz

PsychVulkanCore-INFO: Selecting video mode[0]: 3840 x 2160 @59.999001 Hz

PsychVulkanCore-INFO: For gpu [Unknown AMD GPU] created a direct display surface [0x74c3be7e7c90] for display window 1

PsychVulkanCore-INFO: Probing if gpu ‘Unknown AMD GPU’ supports presenting to the target surface: Yes

Surface minImageCount 1 - maxImageCount 16

Surface currentExtent 3840 x 2160 pixels with up to 1 view layers

Display native HDR properties as queried from monitor:

Display Supports control of HDR local dimming: No

Display Gamut R: [0.000000, 0.000000]

Display Gamut G: [0.000000, 0.000000]

Display Gamut B: [0.000000, 0.000000]

Display Gamut WP: [0.000000, 0.000000]

Display minLuminance: 0.000000 nits

Display maxLuminance: 0.000000 nits

Content maxFrameAverageLightLevel: 0.000000 nits

Content maxContentLightLevel: 0.000000 nits

Surface number of supported surface colorspace + pixelformat combinations: 4

[0] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [0] Swapchain format VK_FORMAT_B8G8R8A8_UNORM

[1] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [1] Swapchain format VK_FORMAT_B8G8R8A8_SRGB

[2] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [2] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32

[3] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [3] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32

PsychVulkanCore-INFO: Vulkan gpu ‘Unknown AMD GPU’ does not support required precision 3 in the fullscreen configuration required by window 1.

PsychVulkanCore-INFO: Does gpu 1 [Unknown AMD GPU] meet our requirements for target surface: No

PsychVulkanCore-ERROR: Could not find any suitable gpu to present to given window for requested settings!

Error in function OpenWindow: Usage error

Failed to open vulkan output window.

according to the PsychVulkan info mentioned above, It seems that the PsychVulkanCore at first thinks that my amd video card is capable of supporting the target window, and then thinks that it doesn’t, is this due to not installing amdvlk correctly? Or is it just my display device that doesn’t support it?

by the way, when i use command line ls /usr/share/vulkan/icd.d/ the result is

intel_hasvk_icd.x86_64.json lvp_icd.x86_64.json virtio_icd.x86_64.json
intel_icd.x86_64.json radeon_icd.x86_64.json

Does the result result mean that the amdvlk is not installed correctly? i followed the install instruction here: https://github.com/GPUOpen-Drivers/AMDVLK

thanks again for your help!

-ziyuan

So, after spending multiple hours of detective work, at a cost that would normally be billable at over 1500 Euros under paid support (you’re welcome), I’m 98% confident that this is a bad screwup of AMD’s Vulkan driver team - iow. a AMDVLK driver bug/limitation! This didn’t get noticed by myself, because the severe lack of financial funding of PTB in the last years made it impossible to test this as frequently, and also impossible to afford the modern AMD graphics cards I’d need to test AMDVLK driver releases after September 2023.

Seems all 16 bit high precision framebuffer modes, both for SDR and HDR displays are broken, and only the 8 bit and 10 bit modes work :frowning: .

Anyhow, the earliest/oldest AMDVLK driver release that supports your specific model of graphics card (Navi33 gpu architecture), would be v2023.Q2.3, linked below:

I would install that driver and then retry. If it works, upgrade further until it doesn’t, to find the most recent non-broken driver for your graphics card. And please report back which one worked and which was the first one to fail. Maybe it is possible to find out what exactly broke it, which is still a bit of a mystery to me right now.

Update: I do have the likely cause for breakage of 16 bit ultra-high precision modes, which effectively provide 12 bpc precision, and the breakage was almost certainly introduced in driver release v-2023.Q2.2 from May 22, 2023. This likely means you are out of luck with your graphics card for the moment, as it requires a minimum of v-2023.Q2.3, and thereby already the earliest driver for your graphics card has broken 16 bit support. Doing testing on the latest driver I could use on my machines v-2023.Q3.3 indeed breaks all 16 bit support.

That said, trying the likely last non-broken driver v-2023.Q2.1 could be worth a try. It doesn’t officially support your graphics card, but who knows, maybe it is still workable, given that we only use a small subset of Vulkan for our purposes, so you might get lucky. Can’t do more than not work - which is what you already have now.

Thank you very much for your help Mario! I’ll try to download different versions of vulkan as you said to test and give feedback!

Update
What i did:

  1. install the oldest support Navi33 gpu architecture Q2.3 amdvlk;
  2. Rerun the code above for configuring a 12-bit precision window
  3. The reported info (list some key different information here):

PsychVulkanCore-INFO: Vulkan instance (version 1.3.290) created.
PsychVulkanCore-INFO: At startup there are 1 Vulkan devices available.
PsychVulkanCore-INFO: GPU 0: ‘Unknown AMD GPU’ : Vulkan 1.3.252 : VendorId 0x1002 : DeviceId 0x7480 : Discrete graphics card.
PsychVulkanCore-INFO: GPU 0: Driver ‘AMD open-source driver’ [2023.Q2.3 (LLPC)] : Driver version 0x80010f (The info here i believe can confirm the swith to the target version of Vulkan)

PsychVulkanCore-INFO: Vulkan gpu ‘Unknown AMD GPU’ does not support required precision 3 in the fullscreen configuration required by window 1.
PsychVulkanCore-INFO: Does gpu 1 [Unknown AMD GPU] meet our requirements for target surface: No
PsychVulkanCore-ERROR: Could not find any suitable gpu to present to given window for requested settings!
Error in function OpenWindow: Usage error
Failed to open vulkan output window.

Then

  1. install the latest driver that support 12-bit precision as the test from Mario Q2.1 amdvlk;
  2. Rerun the code above for configuring a 12-bit precision window
  3. The reported info (list some key different information here):

PsychVulkanCore-INFO: Vulkan instance (version 1.3.290) created.
PsychVulkanCore-INFO: At startup there are 2 Vulkan devices available.
PsychVulkanCore-INFO: GPU 0: ‘Null hardware (RADV NAVI10)’ : Vulkan 1.3.255 : VendorId 0x1002 : DeviceId 0x7310 : Discrete graphics card.
PsychVulkanCore-INFO: GPU 0: Driver ‘radv’ [Mesa 23.2.1-1ubuntu3.1~22.04.2] : Driver version 0x5c02001
PsychVulkanCore-INFO: GPU 0: Probing the following 159 device extensions against required set.

PsychVulkanCore-INFO: GPU 0: ACCEPTED AND ACTIVATED! Count now 1
PsychVulkanCore-INFO: GPU 1: ‘llvmpipe (LLVM 15.0.7, 256 bits)’ : Vulkan 1.3.255 : VendorId 0x10005 : DeviceId 0x0 : Software renderer.
PsychVulkanCore-INFO: GPU 1: Driver ‘llvmpipe’ [Mesa 23.2.1-1ubuntu3.1~22.04.2 (LLVM 15.0.7)] : Driver version 0x1
PsychVulkanCore-INFO: GPU 1: Skipped, because not a suitable standard discrete or integrated gpu. (The info here i think is due to the unsupported version of AMDVLK for my graphics card)

PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-1] of screen 1.
PsychVulkanCore-INFO: Vulkan gpu ‘Null hardware (RADV NAVI10)’ does not represent same physical gpu as required by external client on window 1.
PsychVulkanCore-INFO: Requested OpenGL targetdeviceUUID: 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00
PsychVulkanCore-INFO: Provided Vulkan deviceUUID: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PsychVulkanCore-INFO: Does gpu 1 [Null hardware (RADV NAVI10)] meet our requirements for target surface: No
PsychVulkanCore-ERROR: Could not find any suitable gpu to present to given window for requested settings!
Error in function OpenWindow: Usage error
Failed to open vulkan output window.

so i believe the only solution is to switch to a older version of graphics card that can be supported by v-2023.Q2.1. AMDVLK.

Thanks again for Mario’s help!

-ziyuan

Ok, so this confirms the brokeness exists since at least v-2023.Q2.2 from May 22, 2023, and that AMDVLK drivers only work on the gpu’s they say they will work.

But not to despair yet: I did some more hacking and testing on my machine with the most recent (and now confirmed by my own testing to be broken wrt. high precision support) 2023-Q3.3 from September 2023, the last one to work on my older graphics cards of the pre-Navi / pre-RDNA generation.

For the upcoming Psychtoolbox release, I implemented a hack in Psychtoolbox, to cheat the driver into doing what it falsely claims it can’t do - support 10 bpc in SDR and 16 bpc fixed and floating point in SDR and HDR again. The hack works for me and gets applied to all driver releases of v-2023.Q2.2 and later. So after over 12 hours of work, I think we might have a way to solve this problem for modern AMD RDNA / Navi gpu’s of the last few years, ie. the RDNA 3 and later models. At least until the AMDVLK team breaks something else…

However, future versions of Psychtoolbox for Matlab on Linux, including the one with this hack, will also require a paid software license key, just as the MS-Windows and Apple macOS versions do since beginning of April.

So once this is released, you will need a subscription. Luckily, a single machine key can be had for 50 Euros + applicable taxes from our store, so that’s much cheaper than throwing away your graphics card.

-mario

I’m looking forward to the new release! By the way, I’d also like to ask, amd’s graphics cards with navi2x architecture don’t even mention support for 12bit output on the official website, will this affect the output of psychtoolbox’s 12bit precision? Is there a definite connection?

-ziyuan

Pretty much all half-way modern graphics cards from AMD (like anything since “Sea Islands” from around the year 2014) do support 16 bpc rendering/image-processing/framebuffers/scanout, and the last stages of the display engines work with up to 12 bpc precision, ie. the last 4 bits get truncated or rounded to a net 12 bpc output - matching what higher end displays can take as input via recent DisplayPort or HDMI.

Often recent hardware from Intel or NVidia or Qualcomm or even modern RaspberryPi’s has similar capabilities, but how much of it is exposed is a software issue. On Linux most (all?) capable hardware that can do 10 bpc is supported to do 10 bpc. In general the hardware limit across all vendors I know of is a best case maximum of 12 bpc on the actual video output.

This makes sense, because commercial mass-market consumer display devices can’t do more than 12 bpc at best, so it would be a waste of electronic circuitry for mainstream graphics cards manufacturers to support more than 12 bpc, despite the fact that DisplayPort and HDMI video standards do specify up to 16 bpc. Just that nobody seems to implement that. Outside of special vision science research applications, or maybe some medical display applications like radiology monitors, there is also not much of a consumer need for more than 12 bpc.

So the hardware can do it, but if it is actually exposed and usable depends on the low-level operating system display drivers and the OpenGL/Vulkan graphics drivers, display server etc., which is where software limitations come into play. macOS and MS-Windows usually limit framebuffer precision to 10 bpc, and often only allow 10 bpc for HDR displays (HDR-10 standard etc.), or for more expensive pro-class graphics cards. Sometimes floating point 16 bit is somewhat supported for HDR displays. The specifics depend on graphics card vendor, Intel vs. Apple Silicon for macOS, and other factors.

Psychtoolbox supported 10 bpc and sometimes 11 bpc or more, on AMD via low-level gpu programming hacks - overriding the operating system - since sometimes over 15 years, on Linux and later also on macOS for IntelMacs with AMD graphics.

In the last couple of years since ~2018 I’ve switched to implementing high precision framebuffer support in the Linux kernel and its drivers and in the OpenGL drivers and in the AMDVLK open-source driver myself, contributing that code to Linux kernel, Mesa, X-Server, AMDVLK etc. That’s why Linux can do 10 bpc output under X-Windows with OpenGL on pretty much any graphics hardware that can do it - the stuff you can select with XOrgConfCreator. And AMDVLK can do up to 16 bpc on Linux despite official AMD product docu not mentioning it, as that stuff is usually aimed at MS-Windows capabilities only.

PsychImaging()'s relevant help text sections explain this. The only reason this doesn’t work with recent AMDVLK for Navi is because AMDs driver team broke it, ironically, as it turns out from a bit of research into why the breaking changes were made, because some AMD employee thought 16 bpc is not supported by their hardware under Linux. Apparently it was easier for that person to read/belief their product ads for Windows, instead of reading the Linux source code or their own git commit log, where I gave detailed explanations of why this works. Strong work!

Because I was the one introducing 16 bpc support under Linux for AMD, with a better understanding of their hardware and driver than one of the people who is paid to do driver work, I was able to figure out a hack for upcoming PTB to trick broken AMDVLK drivers into enabling 16 bpc anyway, despite the fact it thinks it can’t do it.

Still it took me over 12 hours of detective work with access to the source code to figure out, how somebody could manage to break this functionality :frowning: Mostly because their way of doing open-source development on AMDVLK is extremely awful - they don’t do one git commit per logical change, as is good practice, but they dump one monster commit with dozens or hundreds of unrelated changes, modifying hundreds of source files, every time a AMDVLK release is made! This is known as “throw it over the fence” open-source and generally frowned upon as very bad practice, but it is still much better than no open-source code at all. The thing is that much of the source code between AMDVLK and AMDVLK-Pro for Linux, and their MS-Windows Vulkan drivers is shared code, so you see some very bad development practices seeping in from the Windows driver side, and the wild mix of Windows and Linux cases also makes for mild headaches after trying to read the code…

Another big problem with this approach is that management and marketing priorities of MS-Windows impair Linux functionality. E.g., the properly developed Linux open-source OpenGL and Vulkan drivers - contained in the MESA graphics libraries and developed by teams of totally different developers - usually strive to maintain very long backwards compatibility with old hardware, sometimes over two decades back. The shared AMDVLK driver basically drops support for AMD hardware on Linux at the same point in time when the MS-Windows drivers do - the primary goal being to sell newer models of AMD gpu’s by turning older models into unsupported scrap. My most modern AMD gpu atm. is a AMD RavenRidge integrated gpu from early 2019, with a modern DCN display engine, like Navi, but with the older Vega rendering architecture, unlike Navi’s RDNA architecture. So for all practical means and purposes I could use my 2019 gpu to develop and test code for more modern Navi gpu, if it weren’t for recent AMDVLK versions since September 2023 ripping out support for all pre-Navi gpu’s, turning 4 year old graphics cards into scrap metal, as far as AMDVLK is concerned. This simply for sales reasons, not out of technical neccessity.

The much better long term solution for this would be for me to invest time into improving support in the Mesa Vulkan drivers for things we’d like to have, and where others haven’t already done the job. And then only keep AMDVLK on life support wrt. Psychtoolbox until Mesa’s Vulkan driver is a better replacement. Because Mesa has well maintained drivers and keeps things backwards compatible much longer, whereas AMDVLK is pretty bad at old hardware support. Also, it has lower code quality and way more bugs, as this isn’t the first time I had to either fix AMD’s driver for them, or find workarounds inside Psychtoolbox, when that was easier. Pretty much at least one major screwup by AMD’s AMDVLK driver team every year.

Of course the proper solution requires the funding to do such work, and PTB’s funding over the last 10 years was atrocious and unsustainable. Which is why as a last resort we are now switching of the paid software license subscription model for all new PTB versions.

hi Mario,
Over the past few days in order to determine a computer configuration that would get 12bit precision, we borrowed an AMD NAVI22 graphics card AMD RX6700XT; however when I installed the last functional amdvlk Version 2023.Q2.1 mentioned above and attempted to turn on the EnableNative16BitFrameBuffer; I suffered a crash of matlab (every single try). After I sent the crash log back to matlab officials they seem to think it’s a known issue, caused by the 14th gen intel cpu https://ww2.mathworks.cn/matlabcentral/answers/2174514-why-does-matlab-sporadically-crash-on-my-13th-or-14th-generation-intel-processor(our cpu is right the i7-14700KF, but we can’t get another test computer at the moment :sob:).

Since the end of the log mentions that the source code can be checked if the MEX-file used is external, I thought I’d take a chance and ask if you have any experience with this ; the crash log file is below:

MATLAB Log File: /home/colorlab/matlab_crash_dump.5843-1


MATLAB Log File


         	abort() detected at 2025-05-16 12:45:59 +0800

Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : ubuntu:GNOME
GNU C Library : 2.35 stable
Graphics Driver : Uninitialized hardware
Graphics card 1 : 0x1002 ( 0x1002 ) 0x73df Version 0.0.0.0 (0-0-0)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 12384474
MATLAB Root : /usr/local/MATLAB/R2024b
MATLAB Version : 24.2.0.2923080 (R2024b) Update 6
OpenGL : hardware
Operating System : Ubuntu 22.04.5 LTS
Process ID : 5843
Processor ID : x86 Family 6 Model 183 Stepping 1, GenuineIntel
Session Key : 97febe2e-24fb-49bf-a486-abd98b0a0a42
Window System : The X.Org Foundation (12101004), display :1

Fault Count: 1

Abnormal termination:
abort()

Current Thread: ‘PTB mainthread’ id 129251292468800

Register State (from fault):
RAX = 0000000000000000 RBX = 0000758da95fd640
RCX = 0000758e8f0969fc RDX = 0000000000000006
RSP = 0000758da95f3750 RBP = 0000000000001774
RSI = 0000000000001774 RDI = 00000000000016d3

R8 = 0000758da95f3820 R9 = 0000000000000000
R10 = 0000000000000008 R11 = 0000000000000246
R12 = 0000000000000006 R13 = 0000000000000016
R14 = 0000000000000002 R15 = 0000000000000001

RIP = 0000758e8f0969fc EFL = 0000000000000246

CS = 0033 FS = 0000 GS = 0000

Stack Trace (from fault):
[ 0] 0x0000758e8f0969fc /lib/x86_64-linux-gnu/libc.so.6+00616956 pthread_kill+00000300
[ 1] 0x0000758e8f042476 /lib/x86_64-linux-gnu/libc.so.6+00271478 raise+00000022
[ 2] 0x0000758e8f0287f3 /lib/x86_64-linux-gnu/libc.so.6+00165875 abort+00000211
[ 3] 0x0000758e8f089677 /lib/x86_64-linux-gnu/libc.so.6+00562807
[ 4] 0x0000758e8f13659a /lib/x86_64-linux-gnu/libc.so.6+01271194 __fortify_fail+00000042
[ 5] 0x0000758e8f136566 /lib/x86_64-linux-gnu/libc.so.6+01271142
[ 6] 0x0000758a4b61e890 /usr/lib/x86_64-linux-gnu/amdvlk64.so+06416528
[ 7] 0x0000758b2e6d8ad8 +00000000

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

I would appreciate any response!
-ziyuan

MATLAB Log File: /home/colorlab/matlab_crash_dump.5843-1


MATLAB Log File


         	abort() detected at 2025-05-16 12:45:59 +0800

Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : ubuntu:GNOME
GNU C Library : 2.35 stable
Graphics Driver : Uninitialized hardware
Graphics card 1 : 0x1002 ( 0x1002 ) 0x73df Version 0.0.0.0 (0-0-0)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 12384474
MATLAB Root : /usr/local/MATLAB/R2024b
MATLAB Version : 24.2.0.2923080 (R2024b) Update 6
OpenGL : hardware
Operating System : Ubuntu 22.04.5 LTS
Process ID : 5843
Processor ID : x86 Family 6 Model 183 Stepping 1, GenuineIntel
Session Key : 97febe2e-24fb-49bf-a486-abd98b0a0a42
Window System : The X.Org Foundation (12101004), display :1

Fault Count: 1

Abnormal termination:
abort()

Current Thread: ‘PTB mainthread’ id 129251292468800

Register State (from fault):
RAX = 0000000000000000 RBX = 0000758da95fd640
RCX = 0000758e8f0969fc RDX = 0000000000000006
RSP = 0000758da95f3750 RBP = 0000000000001774
RSI = 0000000000001774 RDI = 00000000000016d3

R8 = 0000758da95f3820 R9 = 0000000000000000
R10 = 0000000000000008 R11 = 0000000000000246
R12 = 0000000000000006 R13 = 0000000000000016
R14 = 0000000000000002 R15 = 0000000000000001

RIP = 0000758e8f0969fc EFL = 0000000000000246

CS = 0033 FS = 0000 GS = 0000

Stack Trace (from fault):
[ 0] 0x0000758e8f0969fc /lib/x86_64-linux-gnu/libc.so.6+00616956 pthread_kill+00000300
[ 1] 0x0000758e8f042476 /lib/x86_64-linux-gnu/libc.so.6+00271478 raise+00000022
[ 2] 0x0000758e8f0287f3 /lib/x86_64-linux-gnu/libc.so.6+00165875 abort+00000211
[ 3] 0x0000758e8f089677 /lib/x86_64-linux-gnu/libc.so.6+00562807
[ 4] 0x0000758e8f13659a /lib/x86_64-linux-gnu/libc.so.6+01271194 __fortify_fail+00000042
[ 5] 0x0000758e8f136566 /lib/x86_64-linux-gnu/libc.so.6+01271142
[ 6] 0x0000758a4b61e890 /usr/lib/x86_64-linux-gnu/amdvlk64.so+06416528
[ 7] 0x0000758b2e6d8ad8 +00000000

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

Update

Based on the possible solution and check for CPU from Mathwork’s Staff, the CPU show a full pass (running the Intel’s Processor Diagnostic Tool).

In addition to trying matlab, I also installed OCTAVE to try it out. Again, after running the code OCTAVE closed straight away. So I thought maybe the previous matlab crash wasn’t a cpu effect?
For this I continued to try and I upgraded the amdvlk driver to a somewhat newer version. The result: the software crash disappeared and was replaced by the first mentioned PTB-ERROR info; so can I assume that the amdvlk for 2023.Q2.1 is working, but the software(matlab and octave) had an unexpected crash.

I would appreciate any response!
-ziyuan

The AMDVLK driver, all versions until v2024-Q4.2 from December 2024, had another bug which can cause crashes with those symptoms if the connected monitor supports more than 64 video modes. Psychtoolbox 3.0.19.15 introduced yet another workaround for this problem, substantially refined in the initial Psychtoolbox 3.0.20.0 release from mid-December 2024. As your Psychtoolbox is from NeuroDebian, and they are currently way behind - at Psychtoolbox 3.0.19.14, your Psychtoolbox does not contain workarounds for these AMDVLK driver bugs.

That is why it is required to always upgrade to the very latest Psychtoolbox before reporting a problem, and generally a good idea to do so. Also a good idea to follow our release announcements, which described the issue and solution. So if you have v3.0.20.0 or later of PTB or v2024-Q4.2 or later of AMDVLK then this problem should go away, unless it is indeed a different new problem.

See original bug report:

Note that the kind of questions you ask would normally require a paid support membership, and in fact the support costs have substantially exceeded over 1000 Euros by now, but I trust you already bought or will buy a Psychtoolbox software subscription license soon, so I’m provided this advice in good faith.

Best,
-mario

Hi Mario!
Thank you very much for your trust. We have purchased a membership. Our Token is as follow:
L57CR-JS-202551794910:0cad59394af72826b73a2ff8a677b3372c9b056fb9db117880d3fc200786c2bc

Based on your earlier reply, I upgraded the version of psychtoolbox to the latest manually (didn’t upgrade the amdvlk version(keep as 2023Q2.1) because of the problems I ran into earlier). Reran the code and the feedback is as follows:

PsychVulkanCore-INFO: gpu [AMD Radeon RX 6700 XT] has access to target display 0x7398b55cc898. Trying to switch to direct display mode…

PsychVulkanCore-INFO: gpu [AMD Radeon RX 6700 XT] display 0x7398b55cc898 switched to direct display mode. Setting up for direct display surface.

PsychVulkanCore-INFO: Vulkan driver reports 131 available video modes on target display output.

PsychVulkanCore-WARNING: Vulkan driver reports 131 available video modes on target display output, but this deficient version of

PsychVulkanCore-WARNING: the AMDVLK AMD Vulkan driver can only handle at most 64 video modes per display, otherwise it will crash!

PsychVulkanCore-WARNING: I am trying to work around this problem by limiting the enumerated modes to only the first 64 modes.

PsychVulkanCore-WARNING: This may still crash, especially if you have more than one display connected to any of your AMD graphics cards!

PsychVulkanCore-WARNING: Owners of a modern AMD ‘Navi gpu family’ gpu with RDNA graphics, e.g., AMD RX 5000 series and later, can

PsychVulkanCore-WARNING: to AMDVLK release v-2024.Q4.2 or later for a properly bug fixed driver.

PsychVulkanCore-INFO: Target 3840 x 2160 @60.000000 Hz versus mode[0]: 3840 x 2160 @60.000000 Hz

PsychVulkanCore-INFO: Selecting video mode[0]: 3840 x 2160 @60.000000 Hz

It does look like psychtoolbox is trying to fix the problem we’re having (video mode is over 64), but since we have more than 2 monitors (3 in total, two for displaying the stimulus), it ends up causing the matlab/octave to crash :sob:.

And what i did next is to try the solution in the release announcements:

Repo the Source Code from AMDVLK-2023Q2.1
Then change the constant MaxModePerScreen of pal/inc/core/palPlatform.h from 64 to a generously higher value.

The locally rebuilding driver consistently fails at the step cmake --build builds/Release64.
But the build of the latest version of amdvlk(2025Q2.1) from source code succeeded. The results of the attempt made me a little desperate.

I’m reaching out to inquire if you happen to have a pre-built AMDVLK driver package (.deb file) with MaxModePerScreen already increased to 256? I’m still new to driver deployment and have been struggling to build it successfully myself. I understand this might be beyond your typical scope of support, but I’m truly at a loss on how to proceed next.

Thanks again for all the help you provided earlier!

Appreciate any replies.
–Ziyuan

What I actually meant was that you’ll need a subscription license to use the upcoming PTB 3.0.22. under Matlab+Linux. What you bought here is a classic paid support membership which won’t enable the upcoming PTB. But I also appreciate this additional purchase, as it will cover at least a fraction of the support costs for our problem at hand.

Yes, that’s the crash bug, and indeed PTB can only work around the AMDVLK bug for a single display setup reliably, and sometimes on dual-display depending on luck. The proper solution is a different one: Upgrade to the very latest AMDVLK driver, which doesn’t have that crash bug anymore. Then wait for PTB 3.0.22.0 to be released and upgrade to that. That should hopefully fix the 12 bpc issue as well. The ETA for 3.0.22.0 is sometime next week. I’ll post a link in this thread once it advanced enough, so maybe you can copy some needed mex files as a sneak preview. Stay tuned…

Best,
-mario

Ok, get these two new mex files and put then into the Psychtoolbox/PsychBasic/ folder:

https://github.com/kleinerm/Psychtoolbox-3/raw/refs/heads/master/Psychtoolbox/PsychBasic/PsychVulkanCore.mexa64

https://github.com/kleinerm/Psychtoolbox-3/raw/refs/heads/master/Psychtoolbox/PsychBasic/WaitSecs.mexa64

Then run PsychLicenseHandling('Setup');. This should activate the 14 days free trial for the new mex files. Then retry if the new driver manages to work around the bugs of your, updated to the very latest available version, AMDVLK driver.

Wow that is really fast! i will try it later then report back my test results. Thanks for your work!

Update
What i did:

  1. Replace with the new mew file. And activate them.
  2. Upgrade the AMDVLK to 2025.Q2.1
  3. Rerun the code with PsychImaging('AddTask', 'General', 'EnableNative16BitFrameBuffer');

Still with some error:

PTB-INFO: OpenGL-Renderer is AMD :: AMD Radeon RX 6700 XT (navi22, LLVM 15.0.7, DRM 3.57, 6.8.0-59-generic) :: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
PTB-INFO: Screen 1 : Window 10 : VBL startline = 2160 : VBL Endline = -1
PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.667399 ms [59.997362 Hz]. (50 valid samples taken, stddev=0.000568 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.667778 ms [59.995998 Hz].
PTB-INFO: Using usercode override framebuffer rect [0, 0, 3840, 2160] for image processing.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049633 …
PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing.
PTB-INFO: Will use 32 bits per color component floating point framebuffer for any stimulus post-processing.
PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.
PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-2] of screen 1.
PsychVulkanCore-INFO: gpu [AMD Radeon RX 6700 XT] has access to target display 0x7dec25647f08. Trying to switch to direct display mode…
PsychVulkanCore-INFO: gpu [AMD Radeon RX 6700 XT] display 0x7dec25647f08 switched to direct display mode. Setting up for direct display surface.
PsychVulkanCore-INFO: Vulkan driver reports 131 available video modes on target display output.
PsychVulkanCore-INFO: Target 3840 x 2160 @60.000000 Hz versus mode[0]: 3840 x 2160 @59.995998 Hz
PsychVulkanCore-INFO: Selecting video mode[0]: 3840 x 2160 @59.995998 Hz
PsychVulkanCore-INFO: For gpu [AMD Radeon RX 6700 XT] created a direct display surface [0x7dec2666f9d0] for display window 1
PsychVulkanCore-INFO: Probing if gpu ‘AMD Radeon RX 6700 XT’ supports presenting to the target surface: Yes
Surface minImageCount 1 - maxImageCount 16
Surface currentExtent 3840 x 2160 pixels with up to 1 view layers
Display native HDR properties as queried from monitor:

PsychVulkanCore-INFO: High color precision format override for broken AMDVLK driver! Number of driver returned supported surface colorspace + pixelformat combinations: 6
Surface number of supported surface colorspace + pixelformat combinations: 7
[0] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [0] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[1] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [1] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[2] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [2] Swapchain format VK_FORMAT_R16G16B16A16_UNORM
[3] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [3] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[4] For colorspace VK_COLOR_SPACE_HDR10_ST2084_EXT - [4] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[5] For colorspace VK_COLOR_SPACE_HDR10_ST2084_EXT - [5] Swapchain format VK_FORMAT_R16G16B16A16_UNORM
[6] For colorspace VK_COLOR_SPACE_HDR10_ST2084_EXT - [6] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
PsychVulkanCore-INFO: Does gpu 1 [AMD Radeon RX 6700 XT] meet our requirements for target surface: Yes
PsychVulkanCore-INFO: gpuIndex 1 [AMD Radeon RX 6700 XT] auto-selected as optimal gpu for presenting to the target surface.
PsychVulkanCore-INFO: Using 16 bpc unorm [0; 1] range RGBA16 framebuffer.
PsychVulkanCore-ERROR: vkCreateSwapchainKHR() failed for window 1: res=-13.
Error in function OpenWindow: Usage error
Failed to open vulkan output window.

It looks like the new mex file worked, but something else came up

-ziyuan

Yep. The mex file did its job, and yet another failure happened. That is so sad.

What I would try is downgrade the AMDVLK driver to a version that is recent enough to avoid the crash-bug, but older than the most recent one, to see if there is some version that fixed the old crash-bug, but didn’t introduce yet another bug or problem.

The oldest driver version that should not crash is v-2024.Q4.2 from 4th December 2024. If one works then move to the next one, until failure, so we can find out what is the last working version.

Update: I did btw. look at the code to try to find out why error code -13 was thrown here, but unfortunately that is VK_ERROR_UNKNOWN, the catch-all error code for “something went wrong, you figure it out, good luck, you’ll need it!” - a catch all for over 50 different possible causes. After a few more hours of detective work in extremely convoluted code, I think it’s not realistically possible to figure out why this fails now in this way without me having access to the actual modern hardware and the latest drivers and lot of time, so as far as clever solutions or workarounds in PTB go, this is probably the end of the road.

If the above “try some more drivers and hope for the best” doesn’t work out with the 3 or 4 possible driver candidates, then we are in the land of truly awful hacks with unknown chance of success.

Ok, one more thing to try:

This is the amdvlk v2023.Q3.3 driver from 29th September 2023, the final driver to support the old pre-Navi/RDNA AMD graphics cards that I have. I have built it from source code, but with the hack added that should allow to use display monitors with up to 512 video modes without crashing. This driver has been tested on my machines and confirmed to make 16 bpc framebuffers work on my older gpu’s.

It is supposed to also support most gpu’s from oldish Polaris and Vega (the ones I have) up to Navi 33 aka RDNA3, so it should probably work with your graphics cards and your monitors. And does to 16 bpc on my older pre-Navi gpu’s.

So maybe this one works. This is just the driver itself, not a .deb installer package, so you have to download that file and copy it over /usr/lib/x86_64-linux-gnu/amdvlk64.so, restart Matlab, see what happens now.

It was a nightmare to build this driver, took me multiple hours and numerous attempts and I had to hack and fix AMD’s code to make it finally compile on Ubuntu 22.04.5-LTS.

Lets hope this works. Unless one of the drivers I mentioned in my previous posts did the trick, in which case it would be good to know what the latest version was that actually worked. But this self-built driver is basically the most minimal baseline.

Good luck.

Actually, this version might be even better:

It is the same as the one before, but I managed to backport the “unlimited number of video modes” fix from current drivers, so this should cope with any display monitor, even future ones with more than 512 modes.

[Work time spent in total ~30 hours. Paid work time ~30 minutes.]

wow, thank you very much for sharing mario, I’ll test it as soon as I’m free; by the way, is the previous .mex file available for continued use via membership license, since I activated it a week ago

Yes. It is part of the upcoming Psychtoolbox 3.0.22, which will require a license for Linux + Matlab as well.

If you could provide some testing feedback early coming week, I might be able to update documentation in the soon to be released v3.0.22.0 for others wrt. the 16 bpc situation with AMDVLK. Otherwise this issue will have to wait until after my vacation, until at least July.

Thanks,
-mario

Hi Mario!
Sorry for the delayed feedback. Recently, I’ve been occupied with seeking alternative multi - screen 12bit solutions (almost all failed).
From my attempts, it seems that the amdvlk you modified is functioning properly!
My code:

screens = Screen('Screens');
if numel(screens) < 3
   error('');
end
% idx for Screen
controlScreen = screens(1); % 
testScreen1 = screens(2);   % 
testScreen2 = screens(3);   % 
PsychDefaultSetup(2);
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'EnableNative16BitFramebuffer');
screens = Screen('Screens');
[lcdd, lcdRect1] = PsychImaging('OpenWindow', testScreen2, 0);
PsychImaging('PrepareConfiguration');
PsychImaging('AddTask', 'General', 'EnableNative16BitFramebuffer');
[dlpp, dlpRect2] = PsychImaging('OpenWindow', testScreen1, 0);
WaitSecs(2)
Screen('CloseAll');

The PTB-Info:

PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit Intel (Version 3.0.21 - Build date: Mar 28 2025).

PTB-INFO: OS support status: Linux 6.8.0-59-generic Supported.

PTB-INFO: For information about paid support and other commercial services, please type ‘PsychPaidSupportAndServices’.

PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT license, with some

PTB-INFO: restrictions. See file ‘License.txt’ in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: Psychtoolbox and its prebuilt mex files are distributed in the hope that they will be useful, but WITHOUT

PTB-INFO: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.

PTB-INFO: OpenGL-Renderer is AMD :: GFX1102 (gfx1102, LLVM 15.0.7, DRM 3.57, 6.8.0-59-generic) :: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

PTB-INFO: Screen 2 : Window 10 : VBL startline = 2048 : VBL Endline = -1

PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.

PTB-INFO: Measured monitor refresh interval from VBLsync = 20.013027 ms [49.967453 Hz]. (50 valid samples taken, stddev=0.003251 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 20.009604 ms [49.976002 Hz].

PTB-INFO: Using usercode override framebuffer rect [0, 0, 2560, 2048] for image processing.

PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049633 …

PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing.

PTB-INFO: Will use 32 bits per color component floating point framebuffer for any stimulus post-processing.

PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.

PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 2560, 2048] to align with display output 0 [DisplayPort-4] of screen 2.

PsychVulkanCore-INFO: gpu [Unknown AMD GPU] has access to target display 0x720ffd98dd80. Trying to switch to direct display mode…

PsychVulkanCore-INFO: gpu [Unknown AMD GPU] display 0x720ffd98dd80 switched to direct display mode. Setting up for direct display surface.

PsychVulkanCore-INFO: Vulkan driver reports 4 available video modes on target display output.

PsychVulkanCore-INFO: Target 2560 x 2048 @50.000000 Hz versus mode[0]: 2560 x 2048 @50.000000 Hz

PsychVulkanCore-INFO: Selecting video mode[0]: 2560 x 2048 @50.000000 Hz

PsychVulkanCore-INFO: For gpu [Unknown AMD GPU] created a direct display surface [0x720fff299610] for display window 1

PsychVulkanCore-INFO: Probing if gpu ‘Unknown AMD GPU’ supports presenting to the target surface: Yes

Surface minImageCount 1 - maxImageCount 16

Surface currentExtent 2560 x 2048 pixels with up to 1 view layers

Display native HDR properties as queried from monitor:

Display Supports control of HDR local dimming: No

Display Gamut R: [0.000000, 0.000000]

Display Gamut G: [0.000000, 0.000000]

Display Gamut B: [0.000000, 0.000000]

Display Gamut WP: [0.000000, 0.000000]

Display minLuminance: 0.000000 nits

Display maxLuminance: 0.000000 nits

Content maxFrameAverageLightLevel: 0.000000 nits

Content maxContentLightLevel: 0.000000 nits

PsychVulkanCore-INFO: High color precision format override for broken AMDVLK driver! Number of driver returned supported surface colorspace + pixelformat combinations: 2

Surface number of supported surface colorspace + pixelformat combinations: 4

[0] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [0] Swapchain format VK_FORMAT_B8G8R8A8_UNORM

[1] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [1] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32

[2] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [2] Swapchain format VK_FORMAT_R16G16B16A16_UNORM

[3] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [3] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT

PsychVulkanCore-INFO: Does gpu 1 [Unknown AMD GPU] meet our requirements for target surface: Yes

PsychVulkanCore-INFO: gpuIndex 1 [Unknown AMD GPU] auto-selected as optimal gpu for presenting to the target surface.

PsychVulkanCore-INFO: Using 16 bpc unorm [0; 1] range RGBA16 framebuffer.

PsychVulkanCore-INFO: PsychCreateInteropTexture: Got POSIX memory fd 743.

PsychVulkanCore-INFO: PsychCreateInteropTexture: Success for window 1.

PsychVulkanCore-INFO: PsychRecordCopyCommandBuffer(): Swapchainbuffer 0: Using vkCmdBlitImage() blit for interop → swapchain transfer.

PsychVulkanCore-INFO: PsychRecordCopyCommandBuffer(): Swapchainbuffer 1: Using vkCmdBlitImage() blit for interop → swapchain transfer.

PsychVulkan-INFO: 16 bpc linear precision framebuffer will be used.

PsychVulkan-INFO: Using linear rendering layout framebuffer for interop rendering.

PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-0] of screen 1.

PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.

PTB-INFO: OpenGL-Renderer is AMD :: GFX1102 (gfx1102, LLVM 15.0.7, DRM 3.57, 6.8.0-59-generic) :: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2

PTB-INFO: Screen 1 : Window 11 : VBL startline = 2160 : VBL Endline = -1

PTB-INFO: Will try to use OS-Builtin OpenML sync control support for accurate Flip timestamping.

PTB-INFO: Measured monitor refresh interval from VBLsync = 16.670628 ms [59.985744 Hz]. (50 valid samples taken, stddev=0.002651 ms.)

PTB-INFO: Reported monitor refresh interval from operating system = 16.667778 ms [59.995998 Hz].

PTB-INFO: Using usercode override framebuffer rect [0, 0, 3840, 2160] for image processing.

PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 1049633 …

PTB-INFO: Will use 32 bits per color component floating point framebuffer for stimulus drawing.

PTB-INFO: Will use 32 bits per color component floating point framebuffer for any stimulus post-processing.

PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.

PsychVulkan-INFO: Positioning onscreen window at rect [0, 0, 3840, 2160] to align with display output 0 [DisplayPort-0] of screen 1.

PsychVulkanCore-INFO: gpu [Unknown AMD GPU] has access to target display 0x720ffd98dc90. Trying to switch to direct display mode…

PsychVulkanCore-INFO: gpu [Unknown AMD GPU] display 0x720ffd98dc90 switched to direct display mode. Setting up for direct display surface.

PsychVulkanCore-INFO: Vulkan driver reports 125 available video modes on target display output.

PsychVulkanCore-WARNING: Vulkan driver reports 125 available video modes on target display output, but this deficient version of

PsychVulkanCore-WARNING: the AMDVLK AMD Vulkan driver can only handle at most 64 video modes per display, otherwise it will crash!

PsychVulkanCore-WARNING: I am trying to work around this problem by limiting the enumerated modes to only the first 64 modes.

PsychVulkanCore-WARNING: This may still crash, especially if you have more than one display connected to any of your AMD graphics cards!

PsychVulkanCore-WARNING: Owners of a modern AMD ‘Navi gpu family’ gpu with RDNA graphics, e.g., AMD RX 5000 series and later, can

PsychVulkanCore-WARNING: to AMDVLK release v-2024.Q4.2 or later for a properly bug fixed driver.

PsychVulkanCore-INFO: Target 3840 x 2160 @60.000000 Hz versus mode[0]: 3840 x 2160 @60.000000 Hz

PsychVulkanCore-INFO: Selecting video mode[0]: 3840 x 2160 @60.000000 Hz

PsychVulkanCore-INFO: For gpu [Unknown AMD GPU] created a direct display surface [0x720fff29f5b0] for display window 2

PsychVulkanCore-INFO: Probing if gpu ‘Unknown AMD GPU’ supports presenting to the target surface: Yes

Surface minImageCount 1 - maxImageCount 16

Surface currentExtent 3840 x 2160 pixels with up to 1 view layers

Display native HDR properties as queried from monitor:

Display Supports control of HDR local dimming: No

Display Gamut R: [0.679600, 0.320300]

Display Gamut G: [0.264600, 0.690400]

Display Gamut B: [0.150300, 0.059500]

Display Gamut WP: [0.314400, 0.350500]

Display minLuminance: 0.000000 nits

Display maxLuminance: 0.000000 nits

Content maxFrameAverageLightLevel: 0.000000 nits

Content maxContentLightLevel: 0.000000 nits

PsychVulkanCore-INFO: High color precision format override for broken AMDVLK driver! Number of driver returned supported surface colorspace + pixelformat combinations: 4

Surface number of supported surface colorspace + pixelformat combinations: 7

[0] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [0] Swapchain format VK_FORMAT_B8G8R8A8_UNORM

[1] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [1] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32

[2] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [2] Swapchain format VK_FORMAT_R16G16B16A16_UNORM

[3] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - [3] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT

[4] For colorspace VK_COLOR_SPACE_HDR10_ST2084_EXT - [4] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32

[5] For colorspace VK_COLOR_SPACE_HDR10_ST2084_EXT - [5] Swapchain format VK_FORMAT_R16G16B16A16_UNORM

[6] For colorspace VK_COLOR_SPACE_HDR10_ST2084_EXT - [6] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT

PsychVulkanCore-INFO: Does gpu 1 [Unknown AMD GPU] meet our requirements for target surface: Yes

PsychVulkanCore-INFO: gpuIndex 1 [Unknown AMD GPU] auto-selected as optimal gpu for presenting to the target surface.

PsychVulkanCore-INFO: Using 16 bpc unorm [0; 1] range RGBA16 framebuffer.

PsychVulkanCore-INFO: PsychCreateInteropTexture: Got POSIX memory fd 755.

PsychVulkanCore-INFO: PsychCreateInteropTexture: Success for window 2.

PsychVulkanCore-INFO: PsychRecordCopyCommandBuffer(): Swapchainbuffer 0: Using vkCmdBlitImage() blit for interop → swapchain transfer.

PsychVulkanCore-INFO: PsychRecordCopyCommandBuffer(): Swapchainbuffer 1: Using vkCmdBlitImage() blit for interop → swapchain transfer.

PsychVulkan-INFO: 16 bpc linear precision framebuffer will be used.

PsychVulkan-INFO: Using linear rendering layout framebuffer for interop rendering.

I can see the opened Screens on both my DLP and LCD without any error!!!:face_holding_back_tears:

Next step i would test with 1/4096 step to verify the real bit-depth

Thanks again for your help!
-ziyuan