Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI startup issue in v0.9.0 #142

Closed
korrat opened this issue Oct 20, 2024 · 12 comments
Closed

GUI startup issue in v0.9.0 #142

korrat opened this issue Oct 20, 2024 · 12 comments

Comments

@korrat
Copy link

korrat commented Oct 20, 2024

I am unable to open the GUI under Hyprland/Wayland on NixOS.

The log ends with double free or corruption (!prev) without ever showing a window.
Additionally, I see two initialization errors in the log.

Forcing GLFW to use X11 using XDG_SESSION_TYPE=x11 gets to an initial window, but no interaction is possible. It also seems that after the first interaction attempt, the log freezes as well.

Execution log:

$ ./vkdt -d all IMG.NEF
[gui] vkdt 0.9.0 (c) 2020--2024 johannes hanika
[pipe] base directory /nix/store/4d4h4sfj1vfygy5qb2nn74by4k5cy43k-vkdt-0.9.0/lib/vkdt
[pipe] home directory /home/korrat/.config/vkdt
[pipe] loaded 84 modules
[gui] glfwGetVersionString() : 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
[gui] monitor [0] HDMI-A-6 at 0 0
[gui] monitor [1] DP-3 at 0 0
[gui] monitor [2] DP-4 at 0 0
[gui] vk extension required by GLFW:
[gui]   VK_KHR_surface
[gui]   VK_KHR_wayland_surface
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] dev 0: vendorid 0x1002
[qvk] dev 0: AMD Radeon RX 7900 XT
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 4294967295
[qvk] dev 1: vendorid 0x8086
[qvk] dev 1: Intel(R) Graphics (RPL-S)
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 1073741824
[qvk] num queue families: 3
[qvk] picked device 0 with ray tracing and without float atomics and without coopmat support
[qvk] queue 0 is idx 0 family 0
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[gui] no joysticks found
[gui] you have more than 2 monitors attached! only the first two will be colour managed!
[gui] no display profile file display.HDMI-A-6, using sRGB!
[gui] no display profile file display.DP-3, using sRGB!
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[qvk] error VK_ERROR_INITIALIZATION_FAILED executing vkCreateSwapchainKHR(qvk.device, &swpch_create_info, NULL, &win->swap_chain)!
[qvk] error VK_ERROR_INITIALIZATION_FAILED executing dt_gui_create_swapchain(win)!
[db] allocating 1024.0 MB for thumbnails
[perf] upload source total:	  0.016 ms
[perf] create raytrace accel:	  0.000 ms
[perf] record command buffer:	  0.025 ms
[mem] images : peak rss 0.000244141 MB vmsize 0.000244141 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.000244141 MB vmsize 0.000244141 MB
[perf] record cmd buffer:	  0.185 ms
[perf] i-bc1    main    :	  0.004 ms
[perf] total time:	  0.004 ms
[perf] [thm] ran graph in   0ms
[perf] upload source total:	  0.225 ms
[perf] create raytrace accel:	  0.000 ms
[perf] record command buffer:	  0.007 ms
[mem] images : peak rss 0.078125 MB vmsize 0.078125 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.100708 MB vmsize 0.100708 MB
[perf] record cmd buffer:	  0.329 ms
[perf] i-bc1    main    :	  0.006 ms
[perf] total time:	  0.006 ms
[perf] [thm] ran graph in   0ms
[perf] [rawloader] load IMG.NEF in 135ms
[perf] upload source total:	  5.427 ms
[perf] create raytrace accel:	  0.000 ms
[perf] record command buffer:	  0.123 ms
[mem] images : peak rss 644.86 MB vmsize 931.344 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 158.127 MB vmsize 158.127 MB
[perf] record cmd buffer:	154.248 ms
[perf] i-raw    main    :	  1.244 ms
[perf] denoise  noop    :	  0.105 ms
[perf] hilite   half    :	  0.074 ms
[perf] hilite   reduce  :	  0.361 ms
[perf] hilite   reduce  :	  0.118 ms
[perf] hilite   reduce  :	  0.020 ms
[perf] hilite   reduce  :	  0.014 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.007 ms
[perf] hilite   reduce  :	  0.007 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.007 ms
[perf] hilite   assemble:	  0.002 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.010 ms
[perf] hilite   assemble:	  0.016 ms
[perf] hilite   assemble:	  0.060 ms
[perf] hilite   assemble:	  0.222 ms
[perf] hilite   doub    :	  0.100 ms
[perf] sum hilite:	  1.056 ms
[perf] demosaic down    :	  0.024 ms
[perf] demosaic gauss   :	  0.131 ms
[perf] demosaic splat   :	  0.348 ms
[perf] demosaic fix     :	  1.074 ms
[perf] sum demosaic:	  1.577 ms
[perf] crop     main    :	  0.228 ms
[perf] colour   main    :	  0.402 ms
[perf] filmcurv main    :	  0.405 ms
[perf] llap     curve   :	  1.228 ms
[perf] llap     reduce  :	  0.834 ms
[perf] llap     reduce  :	  0.165 ms
[perf] llap     reduce  :	  0.032 ms
[perf] llap     reduce  :	  0.009 ms
[perf] llap     reduce  :	  0.003 ms
[perf] llap     reduce  :	  0.002 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.008 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.009 ms
[perf] llap     assemble:	  0.022 ms
[perf] llap     assemble:	  0.069 ms
[perf] llap     assemble:	  0.260 ms
[perf] llap     assemble:	  1.049 ms
[perf] llap     colour  :	  0.283 ms
[perf] sum llap:	  4.014 ms
[perf] hist     collect :	  1.930 ms
[perf] hist     map     :	  0.006 ms
[perf] total time:	 11.285 ms
[perf] [rawloader] load IMG.NEF in  89ms
[perf] upload source total:	  5.648 ms
[perf] create raytrace accel:	  0.000 ms
[perf] record command buffer:	  0.105 ms
[mem] images : peak rss 230.923 MB vmsize 245.938 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 31.6333 MB vmsize 31.6333 MB
[perf] record cmd buffer:	 99.891 ms
[perf] i-raw    main    :	  1.243 ms
[perf] denoise  noop    :	  0.108 ms
[perf] hilite   half    :	  0.076 ms
[perf] hilite   reduce  :	  0.369 ms
[perf] hilite   reduce  :	  0.122 ms
[perf] hilite   reduce  :	  0.020 ms
[perf] hilite   reduce  :	  0.014 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.007 ms
[perf] hilite   reduce  :	  0.008 ms
[perf] hilite   reduce  :	  0.007 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.003 ms
[perf] hilite   assemble:	  0.010 ms
[perf] hilite   assemble:	  0.016 ms
[perf] hilite   assemble:	  0.062 ms
[perf] hilite   assemble:	  0.228 ms
[perf] hilite   doub    :	  0.102 ms
[perf] sum hilite:	  1.081 ms
[perf] demosaic halfsize:	  0.034 ms
[perf] shared   resample:	  0.030 ms
[perf] crop     main    :	  0.008 ms
[perf] sum crop:	  0.072 ms
[perf] colour   main    :	  0.006 ms
[perf] filmcurv main    :	  0.003 ms
[perf] llap     curve   :	  0.006 ms
[perf] llap     reduce  :	  0.004 ms
[perf] llap     reduce  :	  0.002 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     reduce  :	  0.001 ms
[perf] llap     assemble:	  0.006 ms
[perf] llap     assemble:	  0.008 ms
[perf] llap     assemble:	  0.008 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.007 ms
[perf] llap     assemble:	  0.008 ms
[perf] llap     assemble:	  0.013 ms
[perf] llap     colour  :	  0.002 ms
[perf] sum llap:	  0.086 ms
[perf] colenc   main    :	  0.007 ms
[perf] total time:	  2.857 ms
[perf] [thm] ran graph in 106ms
double free or corruption (!prev)
@paperdigits
Copy link

Hey Jo, I see this too, vkdt opens under wayland, but none of the controls in the window are clickable.

Additionally I noticed that we no longer get the binary vkdt-wayland though it isn't clear to me if that's on the nix side of things or here.

Sorry I skipped packaging 0.8 because I was too busy :(

@hanatos
Copy link
Owner

hanatos commented Oct 21, 2024

oh man, wayland makes me sad. not clickable might be related to #137

but in the log above (this is with wayland startup, not with x11 glfw, right?) it is unable to create the swapchain:

[qvk] error VK_ERROR_INITIALIZATION_FAILED executing vkCreateSwapchainKHR(qvk.device, &swpch_create_info, NULL, &win->swap_chain)!
[qvk] error VK_ERROR_INITIALIZATION_FAILED executing dt_gui_create_swapchain(win)!

which is what i regularly get from nvidia on wayland. @korrat this is a laptop right? with dedicated AMD GPU that is confused about access to the display..

@paperdigits : glfw now ships both for runtime switching. as korrat mentioned, you can steer it via environment variable, so there is no need for an explicit binary for wayland any more.

@korrat : which driver is this? amdgpu, amdgpu-pro, or radv? also, is this a debug build (make debug)? i.e. are the validation layers actually active or just some initial messages are printed in the beginning of the log?

will try to install wayland/something once again..

@korrat
Copy link
Author

korrat commented Oct 22, 2024

this is with wayland startup, not with x11 glfw, right?)

Right. The x11 startup does not produce that error.

@korrat this is a laptop right? with dedicated AMD GPU that is confused about access to the display.

No, this is a Desktop (with an Intel CPU & AMD GPU).

which driver is this? amdgpu, amdgpu-pro, or radv?

That should be amdgpu. Both amdvlk and radv are available for Vulkan.

also, is this a debug build (make debug)?

No. Building with make debug, the log gets very short:

$ ./vkdt -d all
[gui] vkdt 0.9.0 (c) 2020--2024 johannes hanika
[pipe] base directory /nix/store/k0hcnn9lybp9mb7izr092pzzr1w57k03-vkdt-0.9.0/lib/vkdt
[pipe] home directory /home/korrat/.config/vkdt
[pipe] loaded 84 modules
[gui] glfwGetVersionString() : 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
[gui] monitor [0] HDMI-A-6 at 0 0
[gui] monitor [1] DP-3 at 0 0
[gui] monitor [2] DP-4 at 0 0
[gui] vk extension required by GLFW:
[gui]   VK_KHR_surface
[gui]   VK_KHR_wayland_surface
[ERR] error VK_ERROR_LAYER_NOT_PRESENT executing vkCreateInstance!
[ERR] did you install the vulkan validation layer package?
[ERR] init vulkan failed
[ERR] failed to init gui/swapchain

@hanatos
Copy link
Owner

hanatos commented Oct 22, 2024

okay, great, thanks for confirming a few details there. if you could install the validation layers and re-run the debug build maybe it will tell us some more?

btw just pushed 0ee0cb3 which may or may not fix the mouse interaction for wayland. hard to tell for me since i'm currently on an nvidia machine and running wayland is.. interesting.

@korrat
Copy link
Author

korrat commented Oct 22, 2024

Sorry, took some fighting with the validation layers, but here's the log:

[gui] vkdt 0.9.0 (c) 2020--2024 johannes hanika
[pipe] base directory /nix/store/zh9x54rfz7b2nn5cg6xad38nhlvfsidb-vkdt-0.9.0/lib/vkdt
[pipe] home directory /home/korrat/.config/vkdt
[pipe] loaded 84 modules
[gui] glfwGetVersionString() : 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
[gui] monitor [0] HDMI-A-6 at 0 0
[gui] monitor [1] DP-3 at 0 0
[gui] monitor [2] DP-4 at 0 0
[gui] vk extension required by GLFW:
[gui]   VK_KHR_surface
[gui]   VK_KHR_wayland_surface
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] dev 0: vendorid 0x1002
[qvk] dev 0: AMD Radeon RX 7900 XT
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 4294967295
[qvk] dev 1: vendorid 0x8086
[qvk] dev 1: Intel(R) Graphics (RPL-S)
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 1073741824
[qvk] num queue families: 3
[qvk] picked device 0 with ray tracing and without float atomics and without coopmat support
[qvk] validation layer: vkCreateDevice extension VK_EXT_debug_marker not available for devices associated with ICD /nix/store/1rg9ykilhsgrlwb5vmmc9d0schgd9h30-amdvlk-2024.Q3.2/lib/amdvlk64.so
[qvk] queue 0 is idx 0 family 0
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[gui] no joysticks found
[gui] you have more than 2 monitors attached! only the first two will be colour managed!
[gui] no display profile file display.HDMI-A-6, using sRGB!
[gui] no display profile file display.DP-3, using sRGB!
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[qvk] validation layer: Validation Error: [ VUID-VkSwapchainCreateInfoKHR-preTransform-parameter ] | MessageID = 0xaf5f3828 | vkCreateSwapchainKHR(): pCreateInfo->preTransform contains multiple members of VkSurfaceTransformFlagBitsKHR when only a single value is allowed. The Vulkan spec states: preTransform must be a valid VkSurfaceTransformFlagBitsKHR value (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-preTransform-parameter)
vkdt: qvk/qvk.c:105: VkBool32 vk_debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *, void *): Assertion `0' failed.
an error occurred while trying to execute gdb.please check if gdb is installed on your system.
backtrace written to /tmp/vkdt-bt-3903305.txt
recovery data written to /tmp/vkdt-crash-recovery.*

@hanatos
Copy link
Owner

hanatos commented Oct 22, 2024

excellent, thank you. i am going to say this is a driver/vulkan bug, much like KhronosGroup/Vulkan-Docs#2440

but let me force fix this on our side too. are you using a rotated screen at all?

@hanatos
Copy link
Owner

hanatos commented Oct 22, 2024

@korrat if you have the chance to compile from git, can you confirm that the above mentioned commit fixes the issue?

@korrat
Copy link
Author

korrat commented Oct 23, 2024

but let me force fix this on our side too. are you using a rotated screen at all?

Yeah, HDMI-A-6 is rotated to portrait orientation.

Is there any way to force vkdt to use the displayport screens and ignore the HDMI one?

@korrat
Copy link
Author

korrat commented Oct 23, 2024

@korrat if you have the chance to compile from git, can you confirm that the above mentioned commit fixes the issue?

Still no dice, sadly. But the error is somewhere else, I think.

[gui] vkdt 0.9.99-13-g57076ee3 (c) 2020--2024 johannes hanika
[pipe] base directory /home/korrat/workspace/github.com/hanatos/vkdt/bin
[pipe] home directory /home/korrat/.config/vkdt
[pipe] loaded 85 modules
[gui] glfwGetVersionString() : 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
[gui] monitor [0] HDMI-A-6 at 0 0
[gui] monitor [1] DP-3 at 0 0
[gui] monitor [2] DP-4 at 0 0
[gui] vk extension required by GLFW:
[gui]   VK_KHR_surface
[gui]   VK_KHR_wayland_surface
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] dev 0: vendorid 0x1002
[qvk] dev 0: AMD Radeon RX 7900 XT
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 4294967295
[qvk] dev 1: vendorid 0x8086
[qvk] dev 1: Intel(R) Graphics (RPL-S)
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 1073741824
[qvk] num queue families: 3
[qvk] picked device 0 with ray tracing and without float atomics and without coopmat support
[qvk] validation layer: vkCreateDevice extension VK_EXT_debug_marker not available for devices associated with ICD /nix/store/1rg9ykilhsgrlwb5vmmc9d0schgd9h30-amdvlk-2024.Q3.2/lib/amdvlk64.so
[qvk] queue 0 is idx 0 family 0
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[gui] no joysticks found
[gui] you have more than 2 monitors attached! only the first two will be colour managed!
[gui] no display profile file display.HDMI-A-6, using sRGB!
[gui] no display profile file display.DP-3, using sRGB!
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[qvk] validation layer: Validation Error: [ VUID-VkSwapchainCreateInfoKHR-presentMode-02839 ] | MessageID = 0xfb70ccdb | vkCreateSwapchainKHR(): pCreateInfo->minImageCount 0, which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = 2, maxImageCount = 16). The Vulkan spec states: If presentMode is not VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR nor VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR, then minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-presentMode-02839)
vkdt: qvk/qvk.c:105: VkBool32 vk_debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *, void *): Assertion `0' failed.
an error occurred while trying to execute gdb.please check if gdb is installed on your system.
backtrace written to /tmp/vkdt-bt-4124620.txt
recovery data written to /tmp/vkdt-crash-recovery.*

@hanatos
Copy link
Owner

hanatos commented Oct 23, 2024

now i'm a bit at a loss. the code literally does exactly what the validation layer says, i.e. queries vkGetPhysicalDeviceSurfaceCapabilitiesKHR and sets the minimum. i'm going to say that amdvlk is buggy. in the slightly older phoronix tests the mesa radv driver was much faster, especially for your GPU device here, so maybe just use that driver instead? i don't know how to best do it. make sure it's installed and then

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json

or uninstall amdvlk or some such.

@korrat
Copy link
Author

korrat commented Oct 24, 2024

New tests: forcing radv through AMD_VULKAN_ICD="RADV" starts the GUI correctly and seems to work.

amdvlk seems buggy, but the issue is different now:

[gui] vkdt 0.9.99-13-g57076ee3 (c) 2020--2024 johannes hanika
[pipe] base directory /home/korrat/workspace/github.com/hanatos/vkdt/bin
[pipe] home directory /home/korrat/.config/vkdt
[pipe] loaded 85 modules
[gui] glfwGetVersionString() : 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
[gui] monitor [0] DP-3 at 0 0
[gui] monitor [1] DP-4 at 0 0
[gui] monitor [2] HDMI-A-6 at 0 0
[gui] vk extension required by GLFW:
[gui]   VK_KHR_surface
[gui]   VK_KHR_wayland_surface
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] validation layer: Copying old device 0 into new device 0
[qvk] validation layer: Copying old device 1 into new device 1
[qvk] validation layer: Copying old device 2 into new device 2
[qvk] validation layer: Copying old device 3 into new device 3
[qvk] dev 0: vendorid 0x1002
[qvk] dev 0: AMD Radeon RX 7900 XT
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 4294967295
[qvk] dev 1: vendorid 0x8086
[qvk] dev 1: Intel(R) Graphics (RPL-S)
[qvk] max number of allocations -1
[qvk] max image allocation size 16384 x 16384
[qvk] max uniform buffer range 1073741824
[qvk] num queue families: 3
[qvk] picked device 0 with ray tracing and without float atomics and without coopmat support
[qvk] validation layer: vkCreateDevice extension VK_EXT_debug_marker not available for devices associated with ICD /nix/store/6yzw0d8s4ks93dgisamgpv9dgmrg7ymh-amdvlk-2024.Q3.2/lib/amdvlk64.so
[qvk] queue 0 is idx 0 family 0
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[gui] no joysticks found
[gui] you have more than 2 monitors attached! only the first two will be colour managed!
[gui] no display profile file display.DP-3, using sRGB!
[gui] no display profile file display.DP-4, using sRGB!
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[db] allocating 1024.0 MB for thumbnails
[perf] upload source total:	  0.047 ms
[perf] create raytrace accel:	  0.000 ms
[perf] record command buffer:	  0.130 ms
[mem] images : peak rss 0.000244141 MB vmsize 0.000244141 MB
[mem] buffers: peak rss 0 MB vmsize 0 MB
[mem] staging: peak rss 0.000244141 MB vmsize 0.000244141 MB
[perf] record cmd buffer:	  1.148 ms
[perf] i-bc1    main    :	  0.004 ms
[perf] total time:	  0.004 ms
[perf] [thm] ran graph in   2ms
[perf] time to load images 0.000s
[perf] fps 1.1e+02
[qvk] available surface formats:
[qvk] B8G8R8A8_UNORM
[qvk] B8G8R8A8_SRGB
[qvk] using B8G8R8A8_UNORM and colour space 0
[perf] fps 28
[perf] fps 1.5e+02
[perf] fps 1.5e+02
[qvk] validation layer: Validation Error: [ VUID-vkQueueSubmit-pWaitSemaphores-03238 ] Object 0: handle = 0x70b10b0000000c25, type = VK_OBJECT_TYPE_SEMAPHORE; Object 1: handle = 0x55cbb2ad8ef0, type = VK_OBJECT_TYPE_QUEUE; | MessageID = 0xb50452b0 | vkQueueSubmit(): pSubmits[0].pWaitSemaphores[0] queue (VkQueue 0x55cbb2ad8ef0[]) is waiting on semaphore (VkSemaphore 0x70b10b0000000c25[]) that has no way to be signaled. The Vulkan spec states: All elements of the pWaitSemaphores member of all elements of pSubmits created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkQueueSubmit-pWaitSemaphores-03238)
vkdt: qvk/qvk.c:105: VkBool32 vk_debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *, void *): Assertion `0' failed.

@hanatos
Copy link
Owner

hanatos commented Oct 24, 2024

awesome. so i'll consider this fixed then. i don't trust any more errors coming out of amdvlk :) such semaphore problems are pretty severe and i did debug this with validation layers that seemed to actually know what they are saying. and this works on windows, macos/intel, debian/(nvidia,intel,amd), so i doubt there is an actual deadlock here. thanks for providing these detailed validation layer outputs though, they are really helpful.

to answer your other question about monitors: this is just for colour management. for wayland it's probably broken anyways. the only thing that could be a workable approach is to determine one main monitor you care about and put the icc profile into all the profiles vkdt loads. the detection code "where is my window" does not work on wayland. i will currently ignore VCGT/correction curves, so it's essential that during profile creation the white point of the monitor matches quite well (through hardware adjustments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants