VulkanSDK cube example stutter & black window with drivers 375.39 and 381.09

I have successfully compiled LunarG’s VulkanSDK’s cube example. When running the cube application, I noticed the following issues:

  1. When I try to move cube's window, there appears a lot of lag (refreshing was delayed).
  2. While resizing the cube's window, the cube's window turns black and only shows the rotating cube when the resizing stops.
  3. When I click on a background GUI, the screen freezes for a moment. Example, rotating cube will stop rotating, and all GUI becomes unresponsive. Then the clicked GUI moves forward and cube resume rotation. When I move this GUI around the screen with mouse, the cube's rotation is affected. It stutters.

LunarG rep thinks these issues are caused by display manager or IHV drivers. He observed the same issues with unity desktop manager but much less in gnome desktop. In my case, I noticed this error in dmesg after running vulkan application:

[ 7427.461365] [drm:nvidia_drm_gem_prime_fence_init [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for fencing init: 0x00000004
[ 8536.059214] [drm:nvidia_drm_gem_prime_fence_init [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for fencing init: 0x00000004
[ 8798.572087] [drm:nvidia_drm_gem_prime_fence_init [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for fencing init: 0x00000004

I executed vulkansdk’s cube application three times, got the same error thrice.

Using VulkanSDK version 1.0.46.0, Ubuntu 16.04.2, Kernel 4.8.0-46-generic, and Nvidia drivers 375.39 and 381.09.

Questions:

  1. What does the Nvidia error means and how can it be fixed?
  2. Is the error causing the 3 issues I had mentioned earlier?
  3. If not, is nvidia’s driver causing them?

Hi,

Thanks for reporting this issue.

I found a problem in cube and upstreamed a fix. With the next VulkanSDK, dragging the cube window on the desktop shouldn’t be stuttery. However it is still expected to be a little bit slow, same goes with resizing the window.

The other errors you reported do not seem to be related to this issue.

vulkaninfo failed, the error message showed up in dmesg.
graphics Gefore GTX-960
kernel 4.10.0-27-generic
driver nvidia-381.22 nvidia-384.47
Vulkan API Version: 1.0.51

[ 26.394673] [drm:nvidia_drm_gem_prime_fence_force_signal [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for fence attach: 0x00000004
[ 66.097138] [drm:nvidia_drm_gem_prime_fence_force_signal [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to lookup gem object for fence attach: 0x00000004

/build/vulkan-TJrxMb/vulkan-1.0.51.0+dfsg1/demos/vulkaninfo.c:1464: failed with VK_ERROR_INITIALIZATION_FAILED

Hi,

Those messages seem unrelated to Vulkan.

However I’m seeing this:

driver nvidia-381.22 nvidia-384.47

Do you have components from different versions of the driver installed on the same system? That seems like it would cause issues.

It’s a freshly installed Ubuntu 16.04. the first thing after installation was changing driver to nvidia-375.66. after it failed to run vulkaninfo, I changed driver from nvidia-375.66 to nvidia-381.22 nvidia-384.47.

The issue, slow window moving/resizing of Vulkan applications, is still not fixed ( :( ).
I am using Driver Version: 450.57.