NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
275 stars 43 forks source link

vkPhysicalDeviceSurfaceFormatsKHR reports VK_ERROR_SURFACE_LOST_KHR (dual gpu setup) #96

Open tim-rex opened 7 months ago

tim-rex commented 7 months ago

Running an arch linux setup with dual GPU's

Arch Linux Kernel 6.6.2-arch1-1 GNOME Version 45.1 nVidia Driver version 545.29.6

personal project When targeting the GTX 970.. vkCreateWaylandSurfaceKHR succeds

Using that surface, I can succesfully query the surface capabilities vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device, surface, &details.capabilities);

Though the returned capabilities show slightly excessive values for the currentExtent, all other values appear sane.

I then query for surface formats vkGetPhysicalDeviceSurfaceFormatsKHR(device, surface, &formatCount, nullptr);

which fails with VK_ERROR_SURFACE_LOST_KHR

vkcube-wayland

This behaviour seems to be mirrored by vkcube-wayland, glxgears, vkmark

Curiously, vulkaninfo only reports the following presentable surfaces:

       Surface types: count = 2
                VK_KHR_xcb_surface
                VK_KHR_xlib_surface

Seems odd that VK_KHR_wayland_surface does not make an appearance (though I don't see it for the amd card either).

Running vkcube-wayland for the GTX 970 seg faults

[~]$ vkcube-wayland --gpu_number 0
Selected GPU 0: NVIDIA GeForce GTX 970, type: DiscreteGpu
Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.
Segmentation fault (core dumped)

[~]$ vkcube-wayland --gpu_number 1
Selected GPU 1: AMD Radeon RX 580 Series (RADV POLARIS10), type: DiscreteGpu
<runs fine>

Running with --validate-checks-disabled

[timk@archon ~]$ vkcube-wayland --gpu_number 0 --validate-checks-disabled
Selected GPU 0: NVIDIA GeForce GTX 970, type: DiscreteGpu
Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.
ERROR : VALIDATION - Message Id Number: -1926448293 | Message Id Name: INTERNAL-ERROR-vkGetPhysicalDeviceSurfaceFormatsKHR
    Validation Error: [ INTERNAL-ERROR-vkGetPhysicalDeviceSurfaceFormatsKHR ] Object 0: handle = 0x55d0ac10cad0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; Object 1: handle = 0xfab64d0000000002, type = VK_OBJECT_TYPE_SURFACE_KHR; | MessageID = 0x8d2cbb5b | In /vulkan-sdk/1.3.268.0/source/Vulkan-ValidationLayers/layers/state_tracker/image_state.cpp:748: vkGetPhysicalDeviceSurfaceFormatsKHR() was called in the Validation Layer state tracking and failed with result = VK_ERROR_SURFACE_LOST_KHR.

    Objects - 2
        Object[0] - VK_OBJECT_TYPE_PHYSICAL_DEVICE, Handle 0x55d0ac10cad0
        Object[1] - VK_OBJECT_TYPE_SURFACE_KHR, Handle Oxfab64d0000000002

ERROR : VALIDATION - Message Id Number: -1661406165 | Message Id Name: VUID-VkSwapchainCreateInfoKHR-imageFormat-01273
    Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01273 ] | MessageID = 0x9cf8f42b | vkCreateSwapchainKHR(): pCreateInfo->imageFormat is VK_FORMAT_UNDEFINED. The Vulkan spec states: imageFormat and imageColorSpace must match the format and colorSpace members, respectively, of one of the VkSurfaceFormatKHR structures returned by vkGetPhysicalDeviceSurfaceFormatsKHR for the surface (https://vulkan.lunarg.com/doc/view/1.3.268.0/linux/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01273)

ERROR : VALIDATION - Message Id Number: -1661406165 | Message Id Name: VUID-VkSwapchainCreateInfoKHR-imageFormat-01273
    Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01273 ] | MessageID = 0x9cf8f42b | vkCreateSwapchainKHR(): pCreateInfo->imageColorSpace is VK_COLOR_SPACE_SRGB_NONLINEAR_KHR. The Vulkan spec states: imageFormat and imageColorSpace must match the format and colorSpace members, respectively, of one of the VkSurfaceFormatKHR structures returned by vkGetPhysicalDeviceSurfaceFormatsKHR for the surface (https://vulkan.lunarg.com/doc/view/1.3.268.0/linux/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01273)

ERROR : VALIDATION - Message Id Number: -1070202321 | Message Id Name: VUID-VkSwapchainCreateInfoKHR-imageFormat-01778
    Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkCreateSwapchainKHR(): pCreateInfo->imageFormat VK_FORMAT_UNDEFINED with tiling VK_IMAGE_TILING_OPTIMAL has no supported format features on this physical device. The Vulkan spec states: The implied image creation parameters of the swapchain must be supported as reported by vkGetPhysicalDeviceImageFormatProperties (https://vulkan.lunarg.com/doc/view/1.3.268.0/linux/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)

ERROR : VALIDATION - Message Id Number: -1070202321 | Message Id Name: VUID-VkSwapchainCreateInfoKHR-imageFormat-01778
    Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkCreateSwapchainKHR(): pCreateInfo vkGetPhysicalDeviceImageFormatProperties() unexpectedly failed, with following params: format: VK_FORMAT_UNDEFINED, imageType: VK_IMAGE_TYPE_2D, tiling: VK_IMAGE_TILING_OPTIMAL, usage: VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, flags: VkImageCreateFlags(0). The Vulkan spec states: The implied image creation parameters of the swapchain must be supported as reported by vkGetPhysicalDeviceImageFormatProperties (https://vulkan.lunarg.com/doc/view/1.3.268.0/linux/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)

ERROR : VALIDATION - Message Id Number: -1070202321 | Message Id Name: VUID-VkSwapchainCreateInfoKHR-imageFormat-01778
    Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkCreateSwapchainKHR(): pCreateInfo->imageArrayLayers 1, but Maximum value returned by vkGetPhysicalDeviceImageFormatProperties() is 0 for imageFormat VK_FORMAT_UNDEFINED with tiling VK_IMAGE_TILING_OPTIMAL. The Vulkan spec states: The implied image creation parameters of the swapchain must be supported as reported by vkGetPhysicalDeviceImageFormatProperties (https://vulkan.lunarg.com/doc/view/1.3.268.0/linux/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)

ERROR : VALIDATION - Message Id Number: -1070202321 | Message Id Name: VUID-VkSwapchainCreateInfoKHR-imageFormat-01778
    Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 ] | MessageID = 0xc036022f | vkCreateSwapchainKHR(): pCreateInfo->imageExtent (500,500), which is bigger than max extent (0,0)returned by vkGetPhysicalDeviceImageFormatProperties(): for imageFormat VK_FORMAT_UNDEFINED with tiling VK_IMAGE_TILING_OPTIMAL. The Vulkan spec states: The implied image creation parameters of the swapchain must be supported as reported by vkGetPhysicalDeviceImageFormatProperties (https://vulkan.lunarg.com/doc/view/1.3.268.0/linux/1.3-extensions/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageFormat-01778)

vkgears vkgears also seg faults, with no way to specifiy GPU.

vkmark vkmark seg faults when specifying the GTX 970.. Runs fine with the RX 580

vulkaninfo

vulkaninfo --summary

[~]$ vulkaninfo --summary
ERROR while creating surface for extension VK_KHR_wayland_surface : /vulkan-sdk/1.3.268.0/source/Vulkan-Tools/vulkaninfo/vulkaninfo.h:237:vkGetPhysicalDeviceSurfaceFormats2KHR failed with ERROR_SURFACE_LOST_KHR
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.268

Instance Extensions: count = 23
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 4
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1

Instance Layers: count = 9
--------------------------
VK_LAYER_KHRONOS_profiles         Khronos Profiles layer                     1.3.268  version 1
VK_LAYER_KHRONOS_shader_object    Khronos Shader object layer                1.3.268  version 1
VK_LAYER_KHRONOS_synchronization2 Khronos Synchronization2 layer             1.3.268  version 1
VK_LAYER_KHRONOS_validation       Khronos Validation Layer                   1.3.268  version 1
VK_LAYER_LUNARG_api_dump          LunarG API dump layer                      1.3.268  version 2
VK_LAYER_LUNARG_gfxreconstruct    GFXReconstruct Capture Layer Version 1.0.1 1.3.268  version 4194305
VK_LAYER_LUNARG_monitor           Execution Monitoring Layer                 1.3.268  version 1
VK_LAYER_LUNARG_screenshot        LunarG image capture layer                 1.3.268  version 1
VK_LAYER_NV_optimus               NVIDIA Optimus layer                       1.3.260  version 1

Devices:
========
GPU0:
    apiVersion         = 1.3.260
    driverVersion      = 545.29.6.0
    vendorID           = 0x10de
    deviceID           = 0x13c2
    deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
    deviceName         = NVIDIA GeForce GTX 970
    driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
    driverName         = NVIDIA
    driverInfo         = 545.29.06
    conformanceVersion = 1.3.6.0
    deviceUUID         = 0f820b91-4b52-39da-79f9-31a36d336ebb
    driverUUID         = 468717c2-5245-5d6d-9401-72b8a4ff98e5
GPU1:
    apiVersion         = 1.3.255
    driverVersion      = 23.2.1
    vendorID           = 0x1002
    deviceID           = 0x67df
    deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
    deviceName         = AMD Radeon RX 580 Series (RADV POLARIS10)
    driverID           = DRIVER_ID_MESA_RADV
    driverName         = radv
    driverInfo         = Mesa 23.2.1-arch1.2
    conformanceVersion = 1.2.7.1
    deviceUUID         = 00000000-0200-0000-0000-000000000000
    driverUUID         = 414d442d-4d45-5341-2d44-525600000000

eglinfo -B

[~]$ eglinfo -B
GBM platform:
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
amdgpu_device_initialize: amdgpu_query_info(ACCEL_WORKING) failed (-13)
amdgpu: amdgpu_device_initialize failed.
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL core profile version: 4.5 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version: 4.50
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL compatibility profile shading language version: 4.50
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Wayland platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

X11 platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Surfaceless platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
OpenGL core profile renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL core profile version: 4.6.0 NVIDIA 545.29.06
OpenGL core profile shading language version: 4.60 NVIDIA
OpenGL compatibility profile vendor: NVIDIA Corporation
OpenGL compatibility profile renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL compatibility profile version: 4.6.0 NVIDIA 545.29.06
OpenGL compatibility profile shading language version: 4.60 NVIDIA
OpenGL ES profile vendor: NVIDIA Corporation
OpenGL ES profile renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL ES profile version: OpenGL ES 3.2 NVIDIA 545.29.06
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device platform:
Device #0:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
OpenGL core profile renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL core profile version: 4.6.0 NVIDIA 545.29.06
OpenGL core profile shading language version: 4.60 NVIDIA
OpenGL compatibility profile vendor: NVIDIA Corporation
OpenGL compatibility profile renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL compatibility profile version: 4.6.0 NVIDIA 545.29.06
OpenGL compatibility profile shading language version: 4.60 NVIDIA
OpenGL ES profile vendor: NVIDIA Corporation
OpenGL ES profile renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL ES profile version: OpenGL ES 3.2 NVIDIA 545.29.06
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device #1:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon RX 580 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.6.2-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device #2:

Platform Device platform:
libEGL warning: egl: failed to create dri2 screen
libEGL warning: egl: failed to create dri2 screen
eglinfo: eglInitialize failed

Device #3:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES 
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL core profile version: 4.5 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version: 4.50
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL compatibility profile shading language version: 4.50
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

inxi

System:
  Kernel: 6.6.2-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    Desktop: GNOME v: 45.1 Distro: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: STRIX Z270G GAMING v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 1501
    date: 07/13/2021
Battery:
  Device-1: hidpp_battery_0 model: Logitech MX Master 3S charge: 55%
    status: discharging
CPU:
  Info: quad core model: Intel Core i7-7700K bits: 64 type: MT MCP
    arch: Kaby Lake rev: 9 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
  Speed (MHz): avg: 2750 high: 4400 min/max: 800/4500 cores: 1: 4400 2: 800
    3: 832 4: 1968 5: 4400 6: 4400 7: 800 8: 4400 bogomips: 67224
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: ASUSTeK driver: nvidia
    v: 545.29.06 arch: Maxwell bus-ID: 01:00.0
  Device-2: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
    vendor: Sapphire Nitro+ driver: amdgpu v: kernel arch: GCN-4 bus-ID: 02:00.0
    temp: 50.0 C
  Display: wayland server: X.org v: 1.21.1.9 with: Xwayland v: 23.2.2
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia dri: radeonsi
    gpu: amdgpu,nvidia,nvidia-nvswitch resolution: no compositor data
    resolution: 1: 3840x2160 2: 2560x1440 3: 2560x1440
  API: EGL v: 1.5 drivers: kms_swrast,nvidia,radeonsi,swrast platforms:
    active: gbm,wayland,x11,surfaceless,device inactive: device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: amd mesa v: 23.2.1-arch1.2
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 580 Series (polaris10
    LLVM 16.0.6 DRM 3.54 6.6.2-arch1-1)
  API: Vulkan v: 1.3.268 drivers: nvidia,radv surfaces: xcb,xlib,wayland
    devices: 2
erik-kz commented 7 months ago

Thanks for the report. Could you please run vkcube-wayland on the NVIDIA GPU with WAYLAND_DEBUG=1 set as an environment variable? The only time vkPhysicalDeviceSurfaceFormatsKHR should fail is if the compositor does not advertise support for any formats that we can use.

Another thing that might help is enabling the "kms-modifiers" experimental feature for mutter with a command like gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"]

tim-rex commented 7 months ago

With WAYLAND_DEBUG=1 Output follows

$ WAYLAND_DEBUG=1 vkcube-wayland --gpu_number 1
[1635527.597]  -> wl_display@1.get_registry(new id wl_registry@2)
[1635527.984] wl_registry@2.global(1, "wl_compositor", 5)
[1635527.993]  -> wl_registry@2.bind(1, "wl_compositor", 4, new id [unknown]@3)
[1635527.996] wl_registry@2.global(2, "wl_drm", 2)
[1635527.999] wl_registry@2.global(3, "wl_shm", 1)
[1635528.001] wl_registry@2.global(4, "wl_output", 4)
[1635528.003] wl_registry@2.global(5, "wl_output", 4)
[1635528.005] wl_registry@2.global(6, "wl_output", 4)
[1635528.006] wl_registry@2.global(7, "zxdg_output_manager_v1", 3)
[1635528.008] wl_registry@2.global(8, "wl_data_device_manager", 3)
[1635528.010] wl_registry@2.global(9, "zwp_primary_selection_device_manager_v1", 1)
[1635528.012] wl_registry@2.global(10, "wl_subcompositor", 1)
[1635528.014] wl_registry@2.global(11, "xdg_wm_base", 6)
[1635528.016]  -> wl_registry@2.bind(11, "xdg_wm_base", 1, new id [unknown]@4)
[1635528.019] wl_registry@2.global(12, "gtk_shell1", 5)
[1635528.021] wl_registry@2.global(13, "wp_viewporter", 1)
[1635528.023] wl_registry@2.global(14, "wp_fractional_scale_manager_v1", 1)
[1635528.026] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 3)
[1635528.028] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[1635528.030] wl_registry@2.global(17, "wl_seat", 8)
[1635528.032]  -> wl_registry@2.bind(17, "wl_seat", 1, new id [unknown]@5)
[1635528.035] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[1635528.039] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[1635528.041] wl_registry@2.global(20, "zxdg_exporter_v2", 1)
[1635528.043] wl_registry@2.global(21, "zxdg_importer_v2", 1)
[1635528.045] wl_registry@2.global(22, "zxdg_exporter_v1", 1)
[1635528.047] wl_registry@2.global(23, "zxdg_importer_v1", 1)
[1635528.050] wl_registry@2.global(24, "zwp_linux_dmabuf_v1", 4)
[1635528.052] wl_registry@2.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[1635528.054] wl_registry@2.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1635528.057] wl_registry@2.global(27, "zwp_text_input_manager_v3", 1)
[1635528.059] wl_registry@2.global(28, "wp_presentation", 1)
[1635528.061] wl_registry@2.global(29, "xdg_activation_v1", 1)
[1635528.064] wl_registry@2.global(30, "zwp_idle_inhibit_manager_v1", 1)
[1635562.981]  -> wl_display@1.get_registry(new id wl_registry@2)
[1635563.129] wl_registry@2.global(1, "wl_compositor", 5)
[1635563.134] wl_registry@2.global(2, "wl_drm", 2)
[1635563.137]  -> wl_registry@2.bind(2, "wl_drm", 2, new id [unknown]@3)
[1635563.139] wl_registry@2.global(3, "wl_shm", 1)
[1635563.141] wl_registry@2.global(4, "wl_output", 4)
[1635563.143] wl_registry@2.global(5, "wl_output", 4)
[1635563.145] wl_registry@2.global(6, "wl_output", 4)
[1635563.147] wl_registry@2.global(7, "zxdg_output_manager_v1", 3)
[1635563.149] wl_registry@2.global(8, "wl_data_device_manager", 3)
[1635563.151] wl_registry@2.global(9, "zwp_primary_selection_device_manager_v1", 1)
[1635563.153] wl_registry@2.global(10, "wl_subcompositor", 1)
[1635563.155] wl_registry@2.global(11, "xdg_wm_base", 6)
[1635563.157] wl_registry@2.global(12, "gtk_shell1", 5)
[1635563.159] wl_registry@2.global(13, "wp_viewporter", 1)
[1635563.161] wl_registry@2.global(14, "wp_fractional_scale_manager_v1", 1)
[1635563.165] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 3)
[1635563.167] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[1635563.169] wl_registry@2.global(17, "wl_seat", 8)
[1635563.172] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[1635563.174] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[1635563.176] wl_registry@2.global(20, "zxdg_exporter_v2", 1)
[1635563.179] wl_registry@2.global(21, "zxdg_importer_v2", 1)
[1635563.181] wl_registry@2.global(22, "zxdg_exporter_v1", 1)
[1635563.184] wl_registry@2.global(23, "zxdg_importer_v1", 1)
[1635563.186] wl_registry@2.global(24, "zwp_linux_dmabuf_v1", 4)
[1635563.188] wl_registry@2.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[1635563.190] wl_registry@2.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1635563.192] wl_registry@2.global(27, "zwp_text_input_manager_v3", 1)
[1635563.194] wl_registry@2.global(28, "wp_presentation", 1)
[1635563.197] wl_registry@2.global(29, "xdg_activation_v1", 1)
[1635563.199] wl_registry@2.global(30, "zwp_idle_inhibit_manager_v1", 1)
[1635563.202]  -> wl_display@1.sync(new id wl_callback@4)
[1635563.268] wl_display@1.delete_id(4)
[1635563.271] wl_drm@3.device("/dev/dri/renderD128")
[1635564.276] wl_drm@3.format(808669761)
[1635564.282] wl_drm@3.format(808669784)
[1635564.283] wl_drm@3.format(808665665)
[1635564.285] wl_drm@3.format(808665688)
[1635564.287] wl_drm@3.format(875713089)
[1635564.288] wl_drm@3.format(875713112)
[1635564.290] wl_drm@3.format(909199186)
[1635564.292] wl_drm@3.format(961959257)
[1635564.293] wl_drm@3.format(825316697)
[1635564.295] wl_drm@3.format(842093913)
[1635564.297] wl_drm@3.format(909202777)
[1635564.298] wl_drm@3.format(875713881)
[1635564.300] wl_drm@3.format(842094158)
[1635564.301] wl_drm@3.format(909203022)
[1635564.303] wl_drm@3.format(1448695129)
[1635564.305] wl_drm@3.capabilities(1)
[1635564.307] wl_callback@4.done(262)
[1635564.413]  -> wl_display@1.get_registry(new id wl_registry@2)
[1635564.517] wl_registry@2.global(1, "wl_compositor", 5)
[1635564.521] wl_registry@2.global(2, "wl_drm", 2)
[1635564.523]  -> wl_registry@2.bind(2, "wl_drm", 2, new id [unknown]@3)
[1635564.526] wl_registry@2.global(3, "wl_shm", 1)
[1635564.528] wl_registry@2.global(4, "wl_output", 4)
[1635564.530] wl_registry@2.global(5, "wl_output", 4)
[1635564.532] wl_registry@2.global(6, "wl_output", 4)
[1635564.534] wl_registry@2.global(7, "zxdg_output_manager_v1", 3)
[1635564.536] wl_registry@2.global(8, "wl_data_device_manager", 3)
[1635564.538] wl_registry@2.global(9, "zwp_primary_selection_device_manager_v1", 1)
[1635564.540] wl_registry@2.global(10, "wl_subcompositor", 1)
[1635564.542] wl_registry@2.global(11, "xdg_wm_base", 6)
[1635564.544] wl_registry@2.global(12, "gtk_shell1", 5)
[1635564.546] wl_registry@2.global(13, "wp_viewporter", 1)
[1635564.548] wl_registry@2.global(14, "wp_fractional_scale_manager_v1", 1)
[1635564.550] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 3)
[1635564.553] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[1635564.555] wl_registry@2.global(17, "wl_seat", 8)
[1635564.557] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[1635564.560] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[1635564.562] wl_registry@2.global(20, "zxdg_exporter_v2", 1)
[1635564.564] wl_registry@2.global(21, "zxdg_importer_v2", 1)
[1635564.567] wl_registry@2.global(22, "zxdg_exporter_v1", 1)
[1635564.569] wl_registry@2.global(23, "zxdg_importer_v1", 1)
[1635564.571] wl_registry@2.global(24, "zwp_linux_dmabuf_v1", 4)
[1635564.574] wl_registry@2.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[1635564.576] wl_registry@2.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1635564.579] wl_registry@2.global(27, "zwp_text_input_manager_v3", 1)
[1635564.581] wl_registry@2.global(28, "wp_presentation", 1)
[1635564.583] wl_registry@2.global(29, "xdg_activation_v1", 1)
[1635564.585] wl_registry@2.global(30, "zwp_idle_inhibit_manager_v1", 1)
[1635564.588]  -> wl_display@1.sync(new id wl_callback@4)
[1635564.650] wl_display@1.delete_id(4)
[1635564.653] wl_drm@3.device("/dev/dri/renderD128")
[1635565.572] wl_drm@3.format(808669761)
[1635565.576] wl_drm@3.format(808669784)
[1635565.579] wl_drm@3.format(808665665)
[1635565.581] wl_drm@3.format(808665688)
[1635565.583] wl_drm@3.format(875713089)
[1635565.585] wl_drm@3.format(875713112)
[1635565.588] wl_drm@3.format(909199186)
[1635565.590] wl_drm@3.format(961959257)
[1635565.592] wl_drm@3.format(825316697)
[1635565.594] wl_drm@3.format(842093913)
[1635565.596] wl_drm@3.format(909202777)
[1635565.598] wl_drm@3.format(875713881)
[1635565.600] wl_drm@3.format(842094158)
[1635565.602] wl_drm@3.format(909203022)
[1635565.604] wl_drm@3.format(1448695129)
[1635565.606] wl_drm@3.capabilities(1)
[1635565.608] wl_callback@4.done(262)
Selected GPU 1: NVIDIA GeForce GTX 970, type: DiscreteGpu
[1635565.641]  -> wl_compositor@3.create_surface(new id wl_surface@6)
[1635565.645]  -> xdg_wm_base@4.get_xdg_surface(new id xdg_surface@7, wl_surface@6)
[1635565.648]  -> xdg_surface@7.get_toplevel(new id xdg_toplevel@8)
[1635565.650]  -> xdg_toplevel@8.set_title("vkcube")
[1635565.652]  -> wl_surface@6.commit()
[1635565.671]  -> wl_display@1.get_registry(new id wl_registry@9)
[1635565.673]  -> wl_display@1.sync(new id wl_callback@10)
[1635566.428] wl_display@1.delete_id(10)
[1635566.432] wl_registry@9.global(1, "wl_compositor", 5)
[1635566.435] wl_registry@9.global(2, "wl_drm", 2)
[1635566.437]  -> wl_registry@9.bind(2, "wl_drm", 2, new id [unknown]@11)
[1635566.440] wl_registry@9.global(3, "wl_shm", 1)
[1635566.442] wl_registry@9.global(4, "wl_output", 4)
[1635566.444] wl_registry@9.global(5, "wl_output", 4)
[1635566.447] wl_registry@9.global(6, "wl_output", 4)
[1635566.449] wl_registry@9.global(7, "zxdg_output_manager_v1", 3)
[1635566.451] wl_registry@9.global(8, "wl_data_device_manager", 3)
[1635566.453] wl_registry@9.global(9, "zwp_primary_selection_device_manager_v1", 1)
[1635566.455] wl_registry@9.global(10, "wl_subcompositor", 1)
[1635566.457] wl_registry@9.global(11, "xdg_wm_base", 6)
[1635566.459] wl_registry@9.global(12, "gtk_shell1", 5)
[1635566.463] wl_registry@9.global(13, "wp_viewporter", 1)
[1635566.470] wl_registry@9.global(14, "wp_fractional_scale_manager_v1", 1)
[1635566.474] wl_registry@9.global(15, "zwp_pointer_gestures_v1", 3)
[1635566.477] wl_registry@9.global(16, "zwp_tablet_manager_v2", 1)
[1635566.480] wl_registry@9.global(17, "wl_seat", 8)
[1635566.483] wl_registry@9.global(18, "zwp_relative_pointer_manager_v1", 1)
[1635566.486] wl_registry@9.global(19, "zwp_pointer_constraints_v1", 1)
[1635566.490] wl_registry@9.global(20, "zxdg_exporter_v2", 1)
[1635566.493] wl_registry@9.global(21, "zxdg_importer_v2", 1)
[1635566.497] wl_registry@9.global(22, "zxdg_exporter_v1", 1)
[1635566.500] wl_registry@9.global(23, "zxdg_importer_v1", 1)
[1635566.503] wl_registry@9.global(24, "zwp_linux_dmabuf_v1", 4)
[1635566.508]  -> wl_registry@9.bind(24, "zwp_linux_dmabuf_v1", 4, new id [unknown]@12)
[1635566.514] wl_registry@9.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[1635566.519] wl_registry@9.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1635566.523] wl_registry@9.global(27, "zwp_text_input_manager_v3", 1)
[1635566.526] wl_registry@9.global(28, "wp_presentation", 1)
[1635566.531]  -> wl_registry@9.bind(28, "wp_presentation", 1, new id [unknown]@13)
[1635566.535] wl_registry@9.global(29, "xdg_activation_v1", 1)
[1635566.539] wl_registry@9.global(30, "zwp_idle_inhibit_manager_v1", 1)
[1635566.542] wl_callback@10.done(262)
[1635566.547]  -> zwp_linux_dmabuf_v1@12.get_surface_feedback(new id zwp_linux_dmabuf_feedback_v1@10, wl_surface@6)
[1635566.553]  -> wl_display@1.sync(new id wl_callback@14)
[1635582.664] wl_display@1.delete_id(14)
[1635582.675] zwp_linux_dmabuf_feedback_v1@10.format_table(fd 20, 240)
[1635582.691] zwp_linux_dmabuf_feedback_v1@10.main_device(array[8])
[1635582.695] zwp_linux_dmabuf_feedback_v1@10.tranche_target_device(array[8])
[1635582.698] zwp_linux_dmabuf_feedback_v1@10.tranche_flags(0)
[1635582.701] zwp_linux_dmabuf_feedback_v1@10.tranche_formats(array[30])
[1635582.709] zwp_linux_dmabuf_feedback_v1@10.tranche_done()
[1635582.712] zwp_linux_dmabuf_feedback_v1@10.done()
[1635582.715] wl_callback@14.done(263)
Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.
Segmentation fault (core dumped)

Enabling "kms-modifiers" does not appear to have any effect.

erik-kz commented 7 months ago

Whoops, sorry, it looks like it might now also be necessary to set MUTTER_DEBUG_USE_KMS_MODIFIERS=1 and MUTTER_DEBUG_SEND_KMS_MODIFIERS=1 when starting GNOME.

tim-rex commented 7 months ago

No change. Started gnome with

XDG_SESSION_TYPE=wayland MUTTER_DEBUG_SEND_KMS_MODIFIERS=1 MUTTER_DEBUG_USE_KMS_MODIFIERS=1 dbus-run-session gnome-session

gnome-terminal shows those environment variables as set

Output remains the same from vulkaninfo with WAYLAND_DEBUG enabled, both with and without the experimental features gnome flag.

Pasting the output here again in case I missed something obvious

[~]$ env | grep KMS
MUTTER_DEBUG_SEND_KMS_MODIFIERS=1
MUTTER_DEBUG_USE_KMS_MODIFIERS=1
[timk@archon ~]$ WAYLAND_DEBUG=1 vkcube-wayland --gpu_number 1
[ 525318.284]  -> wl_display@1.get_registry(new id wl_registry@2)
[ 525318.620] wl_registry@2.global(1, "wl_compositor", 5)
[ 525318.663]  -> wl_registry@2.bind(1, "wl_compositor", 4, new id [unknown]@3)
[ 525318.680] wl_registry@2.global(2, "wl_drm", 2)
[ 525318.692] wl_registry@2.global(3, "wl_shm", 1)
[ 525318.710] wl_registry@2.global(4, "wl_output", 4)
[ 525318.723] wl_registry@2.global(5, "wl_output", 4)
[ 525318.735] wl_registry@2.global(6, "wl_output", 4)
[ 525318.747] wl_registry@2.global(7, "zxdg_output_manager_v1", 3)
[ 525318.760] wl_registry@2.global(8, "wl_data_device_manager", 3)
[ 525318.785] wl_registry@2.global(9, "zwp_primary_selection_device_manager_v1", 1)
[ 525318.813] wl_registry@2.global(10, "wl_subcompositor", 1)
[ 525318.840] wl_registry@2.global(11, "xdg_wm_base", 6)
[ 525318.874]  -> wl_registry@2.bind(11, "xdg_wm_base", 1, new id [unknown]@4)
[ 525318.907] wl_registry@2.global(12, "gtk_shell1", 5)
[ 525318.936] wl_registry@2.global(13, "wp_viewporter", 1)
[ 525318.965] wl_registry@2.global(14, "wp_fractional_scale_manager_v1", 1)
[ 525318.994] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 3)
[ 525319.024] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[ 525319.052] wl_registry@2.global(17, "wl_seat", 8)
[ 525319.082]  -> wl_registry@2.bind(17, "wl_seat", 1, new id [unknown]@5)
[ 525319.107] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[ 525319.144] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[ 525319.169] wl_registry@2.global(20, "zxdg_exporter_v2", 1)
[ 525319.196] wl_registry@2.global(21, "zxdg_importer_v2", 1)
[ 525319.222] wl_registry@2.global(22, "zxdg_exporter_v1", 1)
[ 525319.249] wl_registry@2.global(23, "zxdg_importer_v1", 1)
[ 525319.275] wl_registry@2.global(24, "zwp_linux_dmabuf_v1", 4)
[ 525319.302] wl_registry@2.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[ 525319.328] wl_registry@2.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[ 525319.355] wl_registry@2.global(27, "zwp_text_input_manager_v3", 1)
[ 525319.381] wl_registry@2.global(28, "wp_presentation", 1)
[ 525319.408] wl_registry@2.global(29, "xdg_activation_v1", 1)
[ 525319.434] wl_registry@2.global(30, "zwp_idle_inhibit_manager_v1", 1)
[ 525357.795]  -> wl_display@1.get_registry(new id wl_registry@2)
[ 525357.921] wl_registry@2.global(1, "wl_compositor", 5)
[ 525357.929] wl_registry@2.global(2, "wl_drm", 2)
[ 525357.949]  -> wl_registry@2.bind(2, "wl_drm", 2, new id [unknown]@3)
[ 525357.955] wl_registry@2.global(3, "wl_shm", 1)
[ 525357.961] wl_registry@2.global(4, "wl_output", 4)
[ 525357.967] wl_registry@2.global(5, "wl_output", 4)
[ 525357.973] wl_registry@2.global(6, "wl_output", 4)
[ 525357.978] wl_registry@2.global(7, "zxdg_output_manager_v1", 3)
[ 525357.983] wl_registry@2.global(8, "wl_data_device_manager", 3)
[ 525357.989] wl_registry@2.global(9, "zwp_primary_selection_device_manager_v1", 1)
[ 525357.994] wl_registry@2.global(10, "wl_subcompositor", 1)
[ 525357.998] wl_registry@2.global(11, "xdg_wm_base", 6)
[ 525358.003] wl_registry@2.global(12, "gtk_shell1", 5)
[ 525358.008] wl_registry@2.global(13, "wp_viewporter", 1)
[ 525358.012] wl_registry@2.global(14, "wp_fractional_scale_manager_v1", 1)
[ 525358.017] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 3)
[ 525358.021] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[ 525358.026] wl_registry@2.global(17, "wl_seat", 8)
[ 525358.031] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[ 525358.035] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[ 525358.040] wl_registry@2.global(20, "zxdg_exporter_v2", 1)
[ 525358.044] wl_registry@2.global(21, "zxdg_importer_v2", 1)
[ 525358.049] wl_registry@2.global(22, "zxdg_exporter_v1", 1)
[ 525358.053] wl_registry@2.global(23, "zxdg_importer_v1", 1)
[ 525358.058] wl_registry@2.global(24, "zwp_linux_dmabuf_v1", 4)
[ 525358.062] wl_registry@2.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[ 525358.066] wl_registry@2.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[ 525358.071] wl_registry@2.global(27, "zwp_text_input_manager_v3", 1)
[ 525358.075] wl_registry@2.global(28, "wp_presentation", 1)
[ 525358.080] wl_registry@2.global(29, "xdg_activation_v1", 1)
[ 525358.084] wl_registry@2.global(30, "zwp_idle_inhibit_manager_v1", 1)
[ 525358.090]  -> wl_display@1.sync(new id wl_callback@4)
[ 525358.181] wl_display@1.delete_id(4)
[ 525358.186] wl_drm@3.device("/dev/dri/renderD128")
[ 525359.192] wl_drm@3.format(808669761)
[ 525359.197] wl_drm@3.format(808669784)
[ 525359.201] wl_drm@3.format(808665665)
[ 525359.219] wl_drm@3.format(808665688)
[ 525359.223] wl_drm@3.format(875713089)
[ 525359.229] wl_drm@3.format(875713112)
[ 525359.234] wl_drm@3.format(909199186)
[ 525359.238] wl_drm@3.format(961959257)
[ 525359.242] wl_drm@3.format(825316697)
[ 525359.245] wl_drm@3.format(842093913)
[ 525359.250] wl_drm@3.format(909202777)
[ 525359.254] wl_drm@3.format(875713881)
[ 525359.257] wl_drm@3.format(842094158)
[ 525359.261] wl_drm@3.format(909203022)
[ 525359.264] wl_drm@3.format(1448695129)
[ 525359.268] wl_drm@3.capabilities(1)
[ 525359.272] wl_callback@4.done(1183)
[ 525359.401]  -> wl_display@1.get_registry(new id wl_registry@2)
[ 525359.488] wl_registry@2.global(1, "wl_compositor", 5)
[ 525359.494] wl_registry@2.global(2, "wl_drm", 2)
[ 525359.500]  -> wl_registry@2.bind(2, "wl_drm", 2, new id [unknown]@3)
[ 525359.505] wl_registry@2.global(3, "wl_shm", 1)
[ 525359.522] wl_registry@2.global(4, "wl_output", 4)
[ 525359.527] wl_registry@2.global(5, "wl_output", 4)
[ 525359.546] wl_registry@2.global(6, "wl_output", 4)
[ 525359.551] wl_registry@2.global(7, "zxdg_output_manager_v1", 3)
[ 525359.556] wl_registry@2.global(8, "wl_data_device_manager", 3)
[ 525359.561] wl_registry@2.global(9, "zwp_primary_selection_device_manager_v1", 1)
[ 525359.566] wl_registry@2.global(10, "wl_subcompositor", 1)
[ 525359.571] wl_registry@2.global(11, "xdg_wm_base", 6)
[ 525359.576] wl_registry@2.global(12, "gtk_shell1", 5)
[ 525359.581] wl_registry@2.global(13, "wp_viewporter", 1)
[ 525359.586] wl_registry@2.global(14, "wp_fractional_scale_manager_v1", 1)
[ 525359.590] wl_registry@2.global(15, "zwp_pointer_gestures_v1", 3)
[ 525359.595] wl_registry@2.global(16, "zwp_tablet_manager_v2", 1)
[ 525359.599] wl_registry@2.global(17, "wl_seat", 8)
[ 525359.604] wl_registry@2.global(18, "zwp_relative_pointer_manager_v1", 1)
[ 525359.608] wl_registry@2.global(19, "zwp_pointer_constraints_v1", 1)
[ 525359.613] wl_registry@2.global(20, "zxdg_exporter_v2", 1)
[ 525359.617] wl_registry@2.global(21, "zxdg_importer_v2", 1)
[ 525359.621] wl_registry@2.global(22, "zxdg_exporter_v1", 1)
[ 525359.626] wl_registry@2.global(23, "zxdg_importer_v1", 1)
[ 525359.630] wl_registry@2.global(24, "zwp_linux_dmabuf_v1", 4)
[ 525359.634] wl_registry@2.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[ 525359.639] wl_registry@2.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[ 525359.643] wl_registry@2.global(27, "zwp_text_input_manager_v3", 1)
[ 525359.648] wl_registry@2.global(28, "wp_presentation", 1)
[ 525359.652] wl_registry@2.global(29, "xdg_activation_v1", 1)
[ 525359.657] wl_registry@2.global(30, "zwp_idle_inhibit_manager_v1", 1)
[ 525359.662]  -> wl_display@1.sync(new id wl_callback@4)
[ 525359.751] wl_display@1.delete_id(4)
[ 525359.755] wl_drm@3.device("/dev/dri/renderD128")
[ 525360.723] wl_drm@3.format(808669761)
[ 525360.728] wl_drm@3.format(808669784)
[ 525360.732] wl_drm@3.format(808665665)
[ 525360.753] wl_drm@3.format(808665688)
[ 525360.757] wl_drm@3.format(875713089)
[ 525360.761] wl_drm@3.format(875713112)
[ 525360.763] wl_drm@3.format(909199186)
[ 525360.765] wl_drm@3.format(961959257)
[ 525360.768] wl_drm@3.format(825316697)
[ 525360.772] wl_drm@3.format(842093913)
[ 525360.773] wl_drm@3.format(909202777)
[ 525360.775] wl_drm@3.format(875713881)
[ 525360.777] wl_drm@3.format(842094158)
[ 525360.779] wl_drm@3.format(909203022)
[ 525360.781] wl_drm@3.format(1448695129)
[ 525360.783] wl_drm@3.capabilities(1)
[ 525360.785] wl_callback@4.done(1183)
Selected GPU 1: NVIDIA GeForce GTX 970, type: DiscreteGpu
[ 525360.816]  -> wl_compositor@3.create_surface(new id wl_surface@6)
[ 525360.819]  -> xdg_wm_base@4.get_xdg_surface(new id xdg_surface@7, wl_surface@6)
[ 525360.822]  -> xdg_surface@7.get_toplevel(new id xdg_toplevel@8)
[ 525360.824]  -> xdg_toplevel@8.set_title("vkcube")
[ 525360.826]  -> wl_surface@6.commit()
[ 525360.843]  -> wl_display@1.get_registry(new id wl_registry@9)
[ 525360.846]  -> wl_display@1.sync(new id wl_callback@10)
[ 525361.447] wl_display@1.delete_id(10)
[ 525361.450] wl_registry@9.global(1, "wl_compositor", 5)
[ 525361.455] wl_registry@9.global(2, "wl_drm", 2)
[ 525361.460]  -> wl_registry@9.bind(2, "wl_drm", 2, new id [unknown]@11)
[ 525361.467] wl_registry@9.global(3, "wl_shm", 1)
[ 525361.471] wl_registry@9.global(4, "wl_output", 4)
[ 525361.475] wl_registry@9.global(5, "wl_output", 4)
[ 525361.479] wl_registry@9.global(6, "wl_output", 4)
[ 525361.482] wl_registry@9.global(7, "zxdg_output_manager_v1", 3)
[ 525361.484] wl_registry@9.global(8, "wl_data_device_manager", 3)
[ 525361.486] wl_registry@9.global(9, "zwp_primary_selection_device_manager_v1", 1)
[ 525361.488] wl_registry@9.global(10, "wl_subcompositor", 1)
[ 525361.490] wl_registry@9.global(11, "xdg_wm_base", 6)
[ 525361.492] wl_registry@9.global(12, "gtk_shell1", 5)
[ 525361.495] wl_registry@9.global(13, "wp_viewporter", 1)
[ 525361.499] wl_registry@9.global(14, "wp_fractional_scale_manager_v1", 1)
[ 525361.504] wl_registry@9.global(15, "zwp_pointer_gestures_v1", 3)
[ 525361.507] wl_registry@9.global(16, "zwp_tablet_manager_v2", 1)
[ 525361.511] wl_registry@9.global(17, "wl_seat", 8)
[ 525361.515] wl_registry@9.global(18, "zwp_relative_pointer_manager_v1", 1)
[ 525361.518] wl_registry@9.global(19, "zwp_pointer_constraints_v1", 1)
[ 525361.522] wl_registry@9.global(20, "zxdg_exporter_v2", 1)
[ 525361.525] wl_registry@9.global(21, "zxdg_importer_v2", 1)
[ 525361.528] wl_registry@9.global(22, "zxdg_exporter_v1", 1)
[ 525361.534] wl_registry@9.global(23, "zxdg_importer_v1", 1)
[ 525361.538] wl_registry@9.global(24, "zwp_linux_dmabuf_v1", 4)
[ 525361.543]  -> wl_registry@9.bind(24, "zwp_linux_dmabuf_v1", 4, new id [unknown]@12)
[ 525361.548] wl_registry@9.global(25, "wp_single_pixel_buffer_manager_v1", 1)
[ 525361.551] wl_registry@9.global(26, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[ 525361.554] wl_registry@9.global(27, "zwp_text_input_manager_v3", 1)
[ 525361.556] wl_registry@9.global(28, "wp_presentation", 1)
[ 525361.559]  -> wl_registry@9.bind(28, "wp_presentation", 1, new id [unknown]@13)
[ 525361.562] wl_registry@9.global(29, "xdg_activation_v1", 1)
[ 525361.564] wl_registry@9.global(30, "zwp_idle_inhibit_manager_v1", 1)
[ 525361.566] wl_callback@10.done(1183)
[ 525361.570]  -> zwp_linux_dmabuf_v1@12.get_surface_feedback(new id zwp_linux_dmabuf_feedback_v1@10, wl_surface@6)
[ 525361.573]  -> wl_display@1.sync(new id wl_callback@14)
[ 525376.936] wl_display@1.delete_id(14)
[ 525376.945] zwp_linux_dmabuf_feedback_v1@10.format_table(fd 20, 240)
[ 525376.958] zwp_linux_dmabuf_feedback_v1@10.main_device(array[8])
[ 525376.961] zwp_linux_dmabuf_feedback_v1@10.tranche_target_device(array[8])
[ 525376.963] zwp_linux_dmabuf_feedback_v1@10.tranche_flags(0)
[ 525376.965] zwp_linux_dmabuf_feedback_v1@10.tranche_formats(array[30])
[ 525376.971] zwp_linux_dmabuf_feedback_v1@10.tranche_done()
[ 525376.975] zwp_linux_dmabuf_feedback_v1@10.done()
[ 525376.979] wl_callback@14.done(1183)
Can't find our preferred formats... Falling back to first exposed format. Rendering may be incorrect.
Segmentation fault (core dumped)
erik-kz commented 7 months ago

Hmm, are you using an older AMD GPU by any chance? I wonder if their driver doesn't support DRM format modifiers for your chip. You could use Simon Ser's drm_info utility to check this. It generates a lot of output, but the relevant pieces for this issue would be Planes -> Plane X -> Properties -> "IN_FORMATS". This should be followed by a list of formats and format modifiers. If there is no such section then that's the problem.

The drm_info source code is here https://gitlab.freedesktop.org/emersion/drm_info and there's also an AUR package https://aur.archlinux.org/packages/drm_info

erik-kz commented 7 months ago

Oh wait, I see that the eglinfo / vulkaninfo output you provided shows you're using an RX 580. Looking online, it sounds like it does not support DRM format modifiers. So for the moment unfortunately render-offload from an NVIDIA GPU to this GPU will not work.

We're planning on adding support for implicit modifiers which should eventually offer a solution. This shortcoming has turned out to be the case of a few other issues recently, e.g. https://github.com/obsproject/obs-studio/issues/9895

tim-rex commented 7 months ago

Nice spot, thanks @eric-kz. Good to understand the issue at play here, very much appreciated.

Im also about to take a holiday, so wouldn't have been in a good position to diagnose further for a little while 😀

ioquatix commented 7 months ago

Just cross-referencing this as I think it's also related https://github.com/NVIDIA/open-gpu-kernel-modules/issues/440.

tim-rex commented 5 months ago

@erik-kz is it possible that recent drivers have introduced a regression here?

I'm certain I've been succesfully using DRI_PRIME with this configuration as recently as v535.129.03 (see issue #95) and I'm now having issues with DRI_PRIME for OpenGL applications (which also worked previously) silently falling back to mesa swrast/zink.. (see here

erik-kz commented 5 months ago

PRIME render-offload for Vulkan Wayland applications was not working at all before 545, so I do not think it's possible that this bug is a regression.

tim-rex commented 5 months ago

Okay, thanks. Please disregard (not sure how I managed to produce #95 ahead of 545)

erik-kz commented 5 months ago

not sure how I managed to produce https://github.com/NVIDIA/egl-wayland/issues/95 ahead of 545

It would still have been possible to create a Wayland swapchain on a PRIME system prior to 545, assuming you set __NV_PRIME_RENDER_OFFLOAD=1. Presentation would fail, though, which I believe matches your observations from the other bug.

tim-rex commented 5 months ago

Ahh, thank you for the clarification. I'm not going crazy :)

tim-rex commented 2 months ago

@erik-kz I believe this issue is still apparent on the currently available drivers (v550.67)

erik-kz commented 2 months ago

Ah, sorry. you're right. We still don't support implicit modifiers which is the root cause of this.