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

panic in wgpu 0.18.0 when AMDVLK 2023.Q4.3 on Radeon RX 7900 XTX #30

Closed
jokeyrhyme opened this issue Jan 7, 2024 · 20 comments
Closed

Comments

@jokeyrhyme
Copy link

jokeyrhyme commented Jan 7, 2024

launching cosmic-term or AMD_VULKAN_ICD=AMDVLK cosmic-term results in the following error:

wl_drm@53: error 1: Format not advertised by wl_drm
warning: queue 0x563961aec090 destroyed while proxies still attached:
[2024-01-07T20:34:57Z ERROR wgpu_hal::vulkan::adapter] get_physical_device_surface_capabilities: An unknown error has occurred, due to an implementation or application bug
thread 'main' panicked at $HOME/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs:778:18:
Error in Surface::configure: Validation Error
Caused by:
Surface does not support the adapter's queue family
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

all of these do work, however:

  • launching AMD_VULKAN_ICD=RADV cosmic-term works just fine
  • ensuring this environment variable is set early enough to apply to cosmic-launcher, etc
  • completely uninstalling AMDVLK so that RADV is the only Vulkan implementation

I do not expect this to be addressed in wgpu nor cosmic-term (but awareness may be handy later)

@Drakulix
Copy link
Member

Drakulix commented Jan 8, 2024

Is there an open wgpu issue for this?

@jokeyrhyme
Copy link
Author

Not yet, I'll raise one when I'm back at a computer

@jokeyrhyme
Copy link
Author

Reported: gfx-rs/wgpu#5021

@jokeyrhyme
Copy link
Author

jokeyrhyme commented Jan 9, 2024

After being prompted over there, I tested in X11 and other compositors...

I could not reproduce this panic in sway, GNOME wayland, or GNOME x11, so it's likely specific to cosmic-comp ( this commit: https://github.com/pop-os/cosmic-comp/tree/9ce6a871c1ae48778aa10d61dbad7eab943195d3 )

I'd previously encountered an earlier bug in AMDVLK that was breaking wgpu so I incorrectly assumed it was another similar occurrence

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

So with AMDVLK, this wouldn't be using Mesa's EGL/Vulkan WSI code, and instead would use AMD's own implementation? Looking at https://github.com/GPUOpen-Drivers/pal/blob/dev/src/core/os/amdgpu/wayland/waylandWindowSystem.cpp, it seems to require wl_drm. (While other drivers have moved to the newer dmabuf protocol.)

So it may be a bug with cosmic-comp's wl_drm implementation.

Logs from running the client with WAYLAND_DEBUG=1 may provide some more information here.

@jokeyrhyme
Copy link
Author

Okay, I ran AMD_VULKAN_ICD=AMDVLK WAYLAND_DEBUG=1 RUST_BACKTRACE=1 cosmic-term and captured the stderr

logs
[  50093.262]  -> [email protected]_registry(new id wl_registry@2)
[  50093.276]  -> [email protected](new id wl_callback@3)
[  50093.346] [email protected]_id(3)
[  50093.349] [email protected](1, "wl_compositor", 5)
[  50093.360]  -> [email protected](1, "wl_compositor", 5, new id [unknown]@4)
[  50093.362] [email protected](2, "wl_subcompositor", 1)
[  50093.364]  -> [email protected](2, "wl_subcompositor", 1, new id [unknown]@5)
[  50093.366] [email protected](3, "wl_data_device_manager", 3)
[  50093.367] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50093.369]  -> [email protected](4, "wp_fractional_scale_manager_v1", 1, new id [unknown]@6)
[  50093.372] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50093.373] [email protected](6, "zxdg_output_manager_v1", 3)
[  50093.374] [email protected](7, "zwlr_output_manager_v1", 2)
[  50093.375] [email protected](8, "wp_presentation", 1)
[  50093.376] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50093.378] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50093.380] [email protected](11, "wl_shm", 1)
[  50093.390]  -> [email protected](11, "wl_shm", 1, new id [unknown]@7)
[  50093.392] [email protected](12, "wp_viewporter", 1)
[  50093.393]  -> [email protected](12, "wp_viewporter", 1, new id [unknown]@8)
[  50093.394] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50093.396] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50093.398]  -> [email protected](14, "zxdg_decoration_manager_v1", 1, new id [unknown]@9)
[  50093.399] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50093.402] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50093.403]  -> [email protected](17, "zwp_pointer_constraints_v1", 1, new id [unknown]@10)
[  50093.404] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50093.406] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50093.407] [email protected](20, "wp_security_context_manager_v1", 1)
[  50093.408] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50093.409] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50093.410]  -> [email protected](22, "zwp_text_input_manager_v3", 1, new id [unknown]@11)
[  50093.412] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50093.413] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50093.414] [email protected](25, "xdg_wm_base", 6)
[  50093.416] [email protected](26, "xdg_activation_v1", 1)
[  50093.417]  -> [email protected](26, "xdg_activation_v1", 1, new id [unknown]@12)
[  50093.418] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50093.419] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50093.420] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50093.421] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50093.423]  -> [email protected](30, "zwp_relative_pointer_manager_v1", 1, new id [unknown]@13)
[  50093.424] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50093.425] [email protected](32, "wl_drm", 2)
[  50093.427] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50093.428] [email protected](34, "wl_output", 4)
[  50093.430]  -> [email protected](34, "wl_output", 4, new id [unknown]@14)
[  50093.433] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50093.434] [email protected](38, "wl_seat", 9)
[  50093.436]  -> [email protected](38, "wl_seat", 6, new id [unknown]@15)
[  50093.438] [email protected](0)
[  50093.443]  -> [email protected](new id wl_callback@3)
[  50093.543] [email protected]_id(3)
[  50093.547] [email protected](875708993)
[  50093.551] [email protected](0)
[  50093.552] [email protected](1)
[  50093.553] [email protected](875709016)
[  50093.554] [email protected](0, 0, 710, 400, 0, "Unknown", "Unknown", 0)
[  50093.557] [email protected](3, 3840, 2160, 59997)
[  50093.559] [email protected](0, 3840, 2160, 119880)
[  50093.560] [email protected](0, 3840, 2160, 60000)
[  50093.561] [email protected](0, 3840, 2160, 59940)
[  50093.562] [email protected](0, 3840, 2160, 50000)
[  50093.564] [email protected](0, 3840, 2160, 30000)
[  50093.565] [email protected](0, 3840, 2160, 29970)
[  50093.566] [email protected](0, 3840, 2160, 25000)
[  50093.568] [email protected](0, 3840, 2160, 24000)
[  50093.569] [email protected](0, 3840, 2160, 23976)
[  50093.570] [email protected](0, 2560, 1440, 143969)
[  50093.572] [email protected](0, 2560, 1440, 119998)
[  50093.573] [email protected](0, 2560, 1440, 59951)
[  50093.574] [email protected](0, 1920, 1200, 59885)
[  50093.576] [email protected](0, 1920, 1080, 143981)
[  50093.577] [email protected](0, 1920, 1080, 120000)
[  50093.578] [email protected](0, 1920, 1080, 119880)
[  50093.580] [email protected](0, 1920, 1080, 119982)
[  50093.581] [email protected](0, 1920, 1080, 100000)
[  50093.582] [email protected](0, 1920, 1080, 60000)
[  50093.584] [email protected](0, 1920, 1080, 59940)
[  50093.585] [email protected](0, 1920, 1080, 50000)
[  50093.586] [email protected](0, 1920, 1080, 30000)
[  50093.587] [email protected](0, 1920, 1080, 29970)
[  50093.588] [email protected](0, 1920, 1080, 25000)
[  50093.589] [email protected](0, 1600, 1200, 60000)
[  50093.590] [email protected](0, 1680, 1050, 59954)
[  50093.591] [email protected](0, 1600, 900, 60000)
[  50093.593] [email protected](0, 1280, 1024, 75025)
[  50093.594] [email protected](0, 1280, 1024, 60020)
[  50093.595] [email protected](0, 1280, 800, 59810)
[  50093.597] [email protected](0, 1152, 864, 75000)
[  50093.598] [email protected](0, 1280, 720, 60000)
[  50093.599] [email protected](0, 1280, 720, 59940)
[  50093.601] [email protected](0, 1024, 768, 75029)
[  50093.602] [email protected](0, 1024, 768, 60004)
[  50093.603] [email protected](0, 800, 600, 75000)
[  50093.605] [email protected](0, 800, 600, 60317)
[  50093.606] [email protected](0, 720, 576, 50000)
[  50093.607] [email protected](0, 720, 480, 60000)
[  50093.609] [email protected](0, 720, 480, 59940)
[  50093.610] [email protected](0, 640, 480, 75000)
[  50093.611] [email protected](0, 640, 480, 60000)
[  50093.613] [email protected](0, 640, 480, 59940)
[  50093.614] [email protected](0, 720, 400, 70082)
[  50093.615] [email protected]("DP-4")
[  50093.617] [email protected]("Unknown - Unknown - DP-4")
[  50093.619] [email protected](1)
[  50093.620] [email protected]()
[  50093.623] [email protected]("seat-0")
[  50093.626] [email protected](7)
[  50093.627] [email protected](0)
[  50093.651]  -> [email protected]_surface(new id wl_surface@3)
[  50093.654]  -> [email protected]_pointer(new id wl_pointer@16)
[  50093.663]  -> [email protected]_relative_pointer(new id zwp_relative_pointer_v1@17, wl_pointer@16)
[  50093.667]  -> [email protected]_keyboard(new id wl_keyboard@18)
[  50095.017]  -> [email protected]_touch(new id wl_touch@19)
[  50095.021]  -> [email protected]_text_input(new id zwp_text_input_v3@20, wl_seat@15)
[  50135.453]  -> [email protected]_surface(new id wl_surface@21)
[  50135.460]  -> [email protected]_fractional_scale(new id wp_fractional_scale_v1@22, wl_surface@21)
[  50135.463]  -> [email protected]_viewport(new id wp_viewport@23, wl_surface@21)
[  50135.467]  -> [email protected](25, "xdg_wm_base", 2, new id [unknown]@24)
[  50135.478]  -> [email protected]_pool(new id wl_shm_pool@25, fd 9, 4096)
[2024-01-10T01:04:23Z ERROR sctk_adwaita::config] XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
[  50148.638]  -> [email protected]_xdg_surface(new id xdg_surface@26, wl_surface@21)
[  50148.648]  -> [email protected]_toplevel(new id xdg_toplevel@27)
[  50148.652]  -> [email protected]()
[  50148.655]  -> [email protected]_min_size(2, 1)
[  50148.658]  -> [email protected]_window_geometry(0, 0, 1024, 768)
[  50148.663]  -> [email protected]_surface(new id wl_surface@28)
[  50148.667]  -> [email protected]_pointer(new id wl_pointer@29)
[  50148.673]  -> [email protected]_toplevel_decoration(new id zxdg_toplevel_decoration_v1@30, xdg_toplevel@27)
[  50148.678]  -> [email protected]_mode(1)
[  50148.680]  -> [email protected]_min_size(2, 1)
[  50148.683]  -> [email protected]_max_size(0, 0)
[  50148.685]  -> [email protected]_app_id("com.system76.CosmicTerm")
[  50148.687]  -> [email protected]_min_size(2, 1)
[  50148.689]  -> [email protected]_max_size(0, 0)
[  50148.691]  -> [email protected]_title("")
[  50148.693]  -> [email protected]()
[  50148.696]  -> [email protected]_opaque_region(nil)
[  50148.701]  -> [email protected](new id wl_callback@31)
[  50148.952] [email protected]_id(31)
[  50148.959] [email protected](1, fd 9, 64788)
[  50150.122] [email protected]_info(25, 200)
[  50150.126] [email protected]_scale(120)
[  50150.129] [email protected](0, 0, array[0])
[  50150.132] [email protected](5897)
[  50150.135]  -> [email protected]_configure(5897)
[  50150.137] [email protected](0)
[  50196.304]  -> [email protected]_registry(new id wl_registry@2)
[  50196.309]  -> [email protected](new id wl_callback@3)
[  50196.454] [email protected]_id(3)
[  50196.456] [email protected](1, "wl_compositor", 5)
[  50196.458] [email protected](2, "wl_subcompositor", 1)
[  50196.459] [email protected](3, "wl_data_device_manager", 3)
[  50196.460] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50196.461] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50196.462] [email protected](6, "zxdg_output_manager_v1", 3)
[  50196.463] [email protected](7, "zwlr_output_manager_v1", 2)
[  50196.464] [email protected](8, "wp_presentation", 1)
[  50196.465] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50196.466] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50196.467] [email protected](11, "wl_shm", 1)
[  50196.468] [email protected](12, "wp_viewporter", 1)
[  50196.469] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50196.470] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50196.471] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50196.472] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50196.473] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50196.474] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50196.475] [email protected](20, "wp_security_context_manager_v1", 1)
[  50196.476] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50196.478] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50196.479] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50196.480] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50196.481] [email protected](25, "xdg_wm_base", 6)
[  50196.484] [email protected](26, "xdg_activation_v1", 1)
[  50196.485] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50196.486] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50196.487] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50196.488] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50196.490] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50196.492]  -> [email protected](31, "zwp_linux_dmabuf_v1", 4, new id [unknown]@4)
[  50196.493] [email protected](32, "wl_drm", 2)
[  50196.494] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50196.497] [email protected](34, "wl_output", 4)
[  50196.498] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50196.499] [email protected](38, "wl_seat", 9)
[  50196.500] [email protected](0)
[  50196.502]  -> [email protected]_default_feedback(new id zwp_linux_dmabuf_feedback_v1@3)
[  50196.503]  -> [email protected](new id wl_callback@5)
[  50196.554] [email protected]_id(5)
[  50196.555] [email protected]_device(array[8])
[  50196.869] [email protected]_table(fd 19, 5984)
[  50196.877] [email protected]_target_device(array[8])
[  50196.879] [email protected]_flags(0)
[  50196.880] [email protected]_formats(array[748])
[  50196.887] [email protected]_done()
[  50196.889] [email protected]()
[  50196.889] [email protected](0)
[  50196.891]  -> [email protected]()
[2024-01-10T01:04:23Z WARN  wgpu_hal::gles::egl] Re-initializing Gles context due to Wayland window
[  50207.683]  -> [email protected]_registry(new id wl_registry@31)
[  50207.686]  -> [email protected](new id wl_callback@32)
[  50207.770] [email protected]_id(32)
[  50207.772] [email protected](1, "wl_compositor", 5)
[  50207.774] [email protected](2, "wl_subcompositor", 1)
[  50207.775] [email protected](3, "wl_data_device_manager", 3)
[  50207.776] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50207.778] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50207.779] [email protected](6, "zxdg_output_manager_v1", 3)
[  50207.780] [email protected](7, "zwlr_output_manager_v1", 2)
[  50207.782] [email protected](8, "wp_presentation", 1)
[  50207.783] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50207.784] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50207.787] [email protected](11, "wl_shm", 1)
[  50207.788] [email protected](12, "wp_viewporter", 1)
[  50207.789] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50207.791] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50207.792] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50207.793] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50207.795] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50207.796] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50207.797] [email protected](20, "wp_security_context_manager_v1", 1)
[  50207.799] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50207.800] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50207.801] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50207.802] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50207.803] [email protected](25, "xdg_wm_base", 6)
[  50207.804] [email protected](26, "xdg_activation_v1", 1)
[  50207.805] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50207.806] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50207.808] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50207.809] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50207.810] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50207.811]  -> [email protected](31, "zwp_linux_dmabuf_v1", 4, new id [unknown]@33)
[  50207.813] [email protected](32, "wl_drm", 2)
[  50207.814] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50207.815] [email protected](34, "wl_output", 4)
[  50207.817] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50207.818] [email protected](38, "wl_seat", 9)
[  50207.819] [email protected](0)
[  50207.820]  -> [email protected]_default_feedback(new id zwp_linux_dmabuf_feedback_v1@32)
[  50207.822]  -> [email protected](new id wl_callback@34)
[  50207.865] [email protected]_id(34)
[  50207.867] [email protected]_device(array[8])
[  50208.166] [email protected]_table(fd 17, 5984)
[  50208.174] [email protected]_target_device(array[8])
[  50208.176] [email protected]_flags(0)
[  50208.177] [email protected]_formats(array[748])
[  50208.183] [email protected]_done()
[  50208.185] [email protected]()
[  50208.186] [email protected](0)
[  50208.187]  -> [email protected]()
[  50215.668]  -> [email protected]()
[  50218.844]  -> [email protected]_registry(new id wl_registry@34)
[  50218.848]  -> [email protected](new id wl_callback@35)
[  50218.956] [email protected]_id(32)
[  50218.958] [email protected]_id(35)
[  50218.959] [email protected](1, "wl_compositor", 5)
[  50218.961] [email protected](2, "wl_subcompositor", 1)
[  50218.962] [email protected](3, "wl_data_device_manager", 3)
[  50218.963] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50218.965] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50218.968] [email protected](6, "zxdg_output_manager_v1", 3)
[  50218.969] [email protected](7, "zwlr_output_manager_v1", 2)
[  50218.970] [email protected](8, "wp_presentation", 1)
[  50218.971] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50218.972] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50218.973] [email protected](11, "wl_shm", 1)
[  50218.975] [email protected](12, "wp_viewporter", 1)
[  50218.976] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50218.977] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50218.978] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50218.979] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50218.980] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50218.981] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50218.982] [email protected](20, "wp_security_context_manager_v1", 1)
[  50218.983] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50218.984] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50218.985] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50218.987] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50218.988] [email protected](25, "xdg_wm_base", 6)
[  50218.989] [email protected](26, "xdg_activation_v1", 1)
[  50218.990] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50218.991] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50218.992] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50218.993] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50218.996] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50218.997] [email protected](32, "wl_drm", 2)
[  50218.998]  -> [email protected](32, "wl_drm", 2, new id [unknown]@32)
[  50219.000] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50219.001] [email protected](34, "wl_output", 4)
[  50219.002] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50219.003] [email protected](38, "wl_seat", 9)
[  50219.005] [email protected](0)
[  50219.007]  -> [email protected](new id wl_callback@35)
[  50219.063] [email protected]_id(35)
[  50219.065] [email protected]("/dev/dri/renderD128")
[  50219.066] [email protected](1)
[  50219.067] [email protected](0)
[  50219.075]  -> [email protected]_registry(new id wl_registry@35)
[  50219.077]  -> [email protected](new id wl_callback@36)
[  50219.128] [email protected]_id(36)
[  50219.130] [email protected](1, "wl_compositor", 5)
[  50219.131] [email protected](2, "wl_subcompositor", 1)
[  50219.132] [email protected](3, "wl_data_device_manager", 3)
[  50219.133] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50219.135] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50219.136] [email protected](6, "zxdg_output_manager_v1", 3)
[  50219.137] [email protected](7, "zwlr_output_manager_v1", 2)
[  50219.138] [email protected](8, "wp_presentation", 1)
[  50219.139] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50219.140] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50219.141] [email protected](11, "wl_shm", 1)
[  50219.142] [email protected](12, "wp_viewporter", 1)
[  50219.144] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50219.146] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50219.147] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50219.149] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50219.150] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50219.152] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50219.154] [email protected](20, "wp_security_context_manager_v1", 1)
[  50219.155] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50219.156] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50219.157] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50219.158] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50219.159] [email protected](25, "xdg_wm_base", 6)
[  50219.160] [email protected](26, "xdg_activation_v1", 1)
[  50219.161] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50219.162] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50219.163] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50219.164] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50219.165] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50219.168] [email protected](32, "wl_drm", 2)
[  50219.169]  -> [email protected](32, "wl_drm", 2, new id [unknown]@37)
[  50219.171] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50219.172] [email protected](34, "wl_output", 4)
[  50219.175] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50219.176] [email protected](38, "wl_seat", 9)
[  50219.177] [email protected](0)
[  50219.178]  -> [email protected](new id wl_callback@36)
[  50219.222] [email protected]_id(36)
[  50219.223] [email protected]("/dev/dri/renderD128")
[  50219.224] [email protected](1)
[  50219.225] [email protected](0)
[  50219.769]  -> [email protected]_registry(new id wl_registry@36)
[  50219.772]  -> [email protected](new id wl_callback@38)
[  50219.814] [email protected]_id(38)
[  50219.816] [email protected](1, "wl_compositor", 5)
[  50219.817] [email protected](2, "wl_subcompositor", 1)
[  50219.818] [email protected](3, "wl_data_device_manager", 3)
[  50219.820] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50219.821] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50219.822] [email protected](6, "zxdg_output_manager_v1", 3)
[  50219.824] [email protected](7, "zwlr_output_manager_v1", 2)
[  50219.825] [email protected](8, "wp_presentation", 1)
[  50219.826] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50219.829] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50219.830] [email protected](11, "wl_shm", 1)
[  50219.831] [email protected](12, "wp_viewporter", 1)
[  50219.833] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50219.834] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50219.835] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50219.837] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50219.838] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50219.839] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50219.841] [email protected](20, "wp_security_context_manager_v1", 1)
[  50219.842] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50219.843] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50219.845] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50219.846] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50219.847] [email protected](25, "xdg_wm_base", 6)
[  50219.849] [email protected](26, "xdg_activation_v1", 1)
[  50219.850] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50219.851] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50219.853] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50219.854] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50219.855] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50219.857] [email protected](32, "wl_drm", 2)
[  50219.859]  -> [email protected](32, "wl_drm", 2, new id [unknown]@39)
[  50219.861] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50219.862] [email protected](34, "wl_output", 4)
[  50219.863] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50219.864] [email protected](38, "wl_seat", 9)
[  50219.865] [email protected](0)
[  50219.866]  -> [email protected](new id wl_callback@38)
[  50219.896] [email protected]_id(38)
[  50219.897] [email protected]("/dev/dri/renderD128")
[  50219.898] [email protected](1)
[  50219.899] [email protected](0)
[  50226.231]  -> [email protected]_registry(new id wl_registry@38)
[  50226.237]  -> [email protected](new id wl_callback@40)
[  50226.262]  -> [email protected]_registry(new id wl_registry@41)
[  50226.271]  -> [email protected](new id wl_callback@42)
[  50226.363] [email protected](1, "wl_compositor", 5)
[  50226.371] [email protected](2, "wl_subcompositor", 1)
[  50226.374] [email protected](3, "wl_data_device_manager", 3)
[  50226.376] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50226.378] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50226.365] [email protected]_id(40)
[  50226.380] [email protected](6, "zxdg_output_manager_v1", 3)
[  50226.396] [email protected](7, "zwlr_output_manager_v1", 2)
[  50226.400] [email protected](8, "wp_presentation", 1)
[  50226.396] [email protected]_id(42)
[  50226.403] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50226.404] [email protected](1, "wl_compositor", 5)
[  50226.405] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50226.413] [email protected](11, "wl_shm", 1)
[  50226.413] [email protected](2, "wl_subcompositor", 1)
[  50226.414] [email protected](12, "wp_viewporter", 1)
[  50226.416] [email protected](3, "wl_data_device_manager", 3)
[  50226.416] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50226.422]  -> [email protected](3, "wl_data_device_manager", 3, new id [unknown]@43)
[  50226.433] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50226.438] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50226.435] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50226.440] [email protected](6, "zxdg_output_manager_v1", 3)
[  50226.441] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50226.442] [email protected](7, "zwlr_output_manager_v1", 2)
[  50226.443] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50226.444] [email protected](8, "wp_presentation", 1)
[  50226.445] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50226.446] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50226.447] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50226.448] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50226.452] [email protected](11, "wl_shm", 1)
[  50226.449] [email protected](20, "wp_security_context_manager_v1", 1)
[  50226.454] [email protected](12, "wp_viewporter", 1)
[  50226.455] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50226.456] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50226.457] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50226.460] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50226.462] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50226.465] [email protected](25, "xdg_wm_base", 6)
[  50226.458] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50226.467] [email protected](26, "xdg_activation_v1", 1)
[  50226.469] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50226.472] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50226.469] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50226.475] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50226.476] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50226.480] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50226.477] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50226.482] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50226.484] [email protected](20, "wp_security_context_manager_v1", 1)
[  50226.488] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50226.484] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50226.489] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50226.494] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50226.498] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50226.491] [email protected](32, "wl_drm", 2)
[  50226.500] [email protected](25, "xdg_wm_base", 6)
[  50226.502]  -> [email protected](32, "wl_drm", 2, new id [unknown]@44)
[  50226.506] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50226.509] [email protected](34, "wl_output", 4)
[  50226.513] [email protected](26, "xdg_activation_v1", 1)
[  50226.515] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50226.518] [email protected](38, "wl_seat", 9)
[  50226.515] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50226.520] [email protected](0)
[  50226.522] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50226.524]  -> [email protected](new id wl_callback@40)
[  50226.533] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50226.536] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50226.537] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50226.539] [email protected](32, "wl_drm", 2)
[  50226.541] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50226.543] [email protected](34, "wl_output", 4)
[  50226.545] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50226.547] [email protected](38, "wl_seat", 9)
[  50226.549]  -> [email protected](38, "wl_seat", 6, new id [unknown]@45)
[  50226.553] [email protected](0)
[  50226.557]  -> [email protected](new id wl_callback@42)
[  50226.580] [email protected]_id(40)
[  50226.583] [email protected]("/dev/dri/renderD128")
[  50226.585] [email protected](1)
[  50226.587] [email protected](0)
[  50226.608] [email protected]_id(42)
[  50226.610] [email protected]("seat-0")
[  50226.614] [email protected](7)
[  50226.618]  -> [email protected]_data_device(new id wl_data_device@40, wl_seat@45)
[  50226.622] [email protected](0)
[  50226.626]  -> [email protected]_registry(new id wl_registry@42)
[  50226.630]  -> [email protected](new id wl_callback@46)
[  50226.632]  -> [email protected](9, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@47)
[  50226.637]  -> [email protected]_device(new id zwp_primary_selection_device_v1@48, wl_seat@45)
[  50226.643]  -> [email protected]_keyboard(new id wl_keyboard@49)
[  50226.647]  -> [email protected]_pointer(new id wl_pointer@50)
[  50226.795] [email protected]_id(46)
[  50226.797] [email protected](1, "wl_compositor", 5)
[  50226.799] [email protected](2, "wl_subcompositor", 1)
[  50226.801] [email protected](3, "wl_data_device_manager", 3)
[  50226.803] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50226.805] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50226.807] [email protected](6, "zxdg_output_manager_v1", 3)
[  50226.808] [email protected](7, "zwlr_output_manager_v1", 2)
[  50226.810] [email protected](8, "wp_presentation", 1)
[  50226.812] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50226.813] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50226.815] [email protected](11, "wl_shm", 1)
[  50226.816] [email protected](12, "wp_viewporter", 1)
[  50226.818] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50226.819] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50226.821] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50226.822] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50226.824] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50226.825] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50226.827] [email protected](20, "wp_security_context_manager_v1", 1)
[  50226.828] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50226.830] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50226.831] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50226.833] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50226.834] [email protected](25, "xdg_wm_base", 6)
[  50226.836] [email protected](26, "xdg_activation_v1", 1)
[  50226.837] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50226.839] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50226.841] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50226.842] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50226.844] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50226.845] [email protected](32, "wl_drm", 2)
[  50226.847]  -> [email protected](32, "wl_drm", 2, new id [unknown]@51)
[  50226.849] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50226.851] [email protected](34, "wl_output", 4)
[  50226.852] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50226.854] [email protected](38, "wl_seat", 9)
[  50226.855] [email protected](0)
[  50226.857]  -> [email protected](new id wl_callback@46)
[  50226.902] [email protected]_id(46)
[  50226.904] [email protected]("/dev/dri/renderD128")
[  50226.906] [email protected](1)
[  50226.907] [email protected](0)
[  50226.916]  -> [email protected]_registry(new id wl_registry@46)
[  50226.918]  -> [email protected](new id wl_callback@52)
[  50226.973] [email protected]_id(52)
[  50226.975] [email protected](1, "wl_compositor", 5)
[  50226.977] [email protected](2, "wl_subcompositor", 1)
[  50226.979] [email protected](3, "wl_data_device_manager", 3)
[  50226.981] [email protected](4, "wp_fractional_scale_manager_v1", 1)
[  50226.982] [email protected](5, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[  50226.984] [email protected](6, "zxdg_output_manager_v1", 3)
[  50226.985] [email protected](7, "zwlr_output_manager_v1", 2)
[  50226.987] [email protected](8, "wp_presentation", 1)
[  50226.988] [email protected](9, "zwp_primary_selection_device_manager_v1", 1)
[  50226.990] [email protected](10, "zcosmic_screencopy_manager_v1", 1)
[  50226.991] [email protected](11, "wl_shm", 1)
[  50226.994] [email protected](12, "wp_viewporter", 1)
[  50226.996] [email protected](13, "org_kde_kwin_server_decoration_manager", 1)
[  50226.997] [email protected](14, "zxdg_decoration_manager_v1", 1)
[  50226.999] [email protected](15, "ext_session_lock_manager_v1", 1)
[  50227.001] [email protected](17, "zwp_pointer_constraints_v1", 1)
[  50227.003] [email protected](18, "zwp_pointer_gestures_v1", 3)
[  50227.005] [email protected](19, "zwp_tablet_manager_v2", 1)
[  50227.007] [email protected](20, "wp_security_context_manager_v1", 1)
[  50227.009] [email protected](21, "zwp_input_method_manager_v2", 1)
[  50227.010] [email protected](22, "zwp_text_input_manager_v3", 1)
[  50227.012] [email protected](23, "zwp_virtual_keyboard_manager_v1", 1)
[  50227.014] [email protected](24, "zwlr_layer_shell_v1", 4)
[  50227.015] [email protected](25, "xdg_wm_base", 6)
[  50227.018] [email protected](26, "xdg_activation_v1", 1)
[  50227.020] [email protected](27, "zcosmic_toplevel_info_v1", 1)
[  50227.022] [email protected](28, "zcosmic_toplevel_manager_v1", 2)
[  50227.024] [email protected](29, "zcosmic_workspace_manager_v1", 1)
[  50227.027] [email protected](30, "zwp_relative_pointer_manager_v1", 1)
[  50227.028] [email protected](31, "zwp_linux_dmabuf_v1", 4)
[  50227.030] [email protected](32, "wl_drm", 2)
[  50227.032]  -> [email protected](32, "wl_drm", 2, new id [unknown]@53)
[  50227.034] [email protected](33, "wp_drm_lease_device_v1", 1)
[  50227.036] [email protected](34, "wl_output", 4)
[  50227.038] [email protected](37, "wp_drm_lease_device_v1", 1)
[  50227.040] [email protected](38, "wl_seat", 9)
[  50227.041] [email protected](0)
[  50227.043]  -> [email protected](new id wl_callback@52)
[  50227.083] [email protected]_id(52)
[  50227.085] [email protected]("/dev/dri/renderD128")
[  50227.087] [email protected](1)
[  50227.088] [email protected](0)
[  50227.193]  -> [email protected]_prime_buffer(new id wl_buffer@52, fd 24, 1024, 768, 875713112, 0, 4096, 0, 0, 0, 0)
[  50227.224]  -> [email protected]_prime_buffer(new id wl_buffer@54, fd 25, 1024, 768, 875713112, 0, 4096, 0, 0, 0, 0)
[  50227.249]  -> [email protected]_prime_buffer(new id wl_buffer@55, fd 26, 1024, 768, 875713112, 0, 4096, 0, 0, 0, 0)
[  50227.709] [email protected](1, fd 20, 64788)
[  50227.727] [email protected]_info(25, 200)
[  50233.963]  -> [email protected]_destination(1024, 768)
[  50233.969]  -> [email protected]_window_geometry(0, 0, 1024, 768)
[  50233.973]  -> [email protected]_opaque_region(nil)
[  50242.696]  -> [email protected]_registry(new id wl_registry@56)
[  50242.703]  -> [email protected](new id wl_callback@57)
[  50242.709] [email protected](wl_drm@53, 1, "Format not advertised by wl_drm")
wl_drm@53: error 1: Format not advertised by wl_drm
warning: queue 0x5650007362d0 destroyed while proxies still attached:
  wl_registry@56 still attached
[2024-01-10T01:04:23Z ERROR wgpu_hal::vulkan::adapter] get_physical_device_surface_capabilities: An unknown error has occurred, due to an implementation or application bug
thread 'main' panicked at HOME/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs:778:18:
Error in Surface::configure: Validation Error

Caused by:
    Surface does not support the adapter's queue family

stack backtrace:
warning: queue 0x7feb98000ca0 destroyed while proxies still attached:
  zwp_primary_selection_device_v1@48 still attached
  zwp_primary_selection_device_manager_v1@47 still attached
  wl_data_device@40 still attached
  wl_seat@45 still attached
  wl_data_device_manager@43 still attached
  wl_registry@41 still attached
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: wgpu::backend::direct::Context::handle_error_fatal
   3: <wgpu::backend::direct::Context as wgpu::context::Context>::surface_configure
   4: <T as wgpu::context::DynContext>::surface_configure
   5: wgpu::Surface::configure
   6: <iced_renderer::compositor::Compositor<Theme> as iced_graphics::compositor::Compositor>::configure_surface
   7: iced_winit::application::run::{{closure}}
   8: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_return
   9: iced_winit::application::run
  10: cosmic_term::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: queue 0x564fff32f610 destroyed while proxies still attached:
  xdg_wm_base@24 still attached
  wl_seat@15 still attached
  wl_output@14 still attached
  zwp_relative_pointer_manager_v1@13 still attached
  xdg_activation_v1@12 still attached
  zwp_text_input_manager_v3@11 still attached
  zwp_pointer_constraints_v1@10 still attached
  zxdg_decoration_manager_v1@9 still attached
  wp_viewporter@8 still attached
  wl_shm@7 still attached
  wp_fractional_scale_manager_v1@6 still attached
  wl_subcompositor@5 still attached
  wl_compositor@4 still attached
  wl_registry@2 still attached

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

So the client is trying to use 875713112. That's XRGB8888. Which I think should be supported fine?

But wl_drm::format isn't being sent here, so either the compositor isn't advertising any formats, or the client isn't waiting for the compositor before selecting the format.

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

Yeah, I think wl_drm::format should appear in the log right after wl_drm::capabilities. Is the format list empty, or did wl_drm::Format::try_from(*format as u32) fail to convert any formats, somehow?

@jokeyrhyme
Copy link
Author

I can add more instrumentation somewhere and recompile to find out?

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

I'd probably change https://github.com/pop-os/cosmic-comp/blob/f75d89b4240fb25f6e43443efd18f95c8484a620/src/wayland/protocols/drm.rs#L93-L98 to something like:

for format in global_data.formats.iter() {
    dbg!(format);
    if let Ok(converted) = dbg!(wl_drm::Format::try_from(*format as u32)) {
        drm_instance.format(converted as u32);
    }
}

I'm not really familiar with AMDVLK, but I should be able to test it, assuming it works with any modern integrated AMD GPU.

@jokeyrhyme
Copy link
Author

Hmmm, I've tried compiling cosmic-comp with cargo build --release and cargo build (debug) and neither results in dbg!(...) output ending up in journalctl -xb

I even put a trivial dbg!("cosmic-comp starting up"); in main.rs to confirm, and it doesn't appear in the logs

Do I need to run cosmic-comp or cosmic-session with an environment variable to get this log output?

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

Oh yeah. dbg! will just be written to stderr, not journald. Something like ./target/release/cosmic-comp 2>&1 | tee log-file is what I often use to test that sort of thing. Something like tracing::error! will instead write to both journald and stderr.

@jokeyrhyme
Copy link
Author

Okay, I instrumented the start of cosmic-comp::main() and cosmic-comp::wayland::protocols::drm::WlDrmState::bind() , as well as the body of the for loop in the latter

I can see that bind() is called multiple times when trying to run cosmic-term, but there is no output from inside the loop, so I assume this means global_data.formats is empty

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

Seems AMDVLK recently dropped support for older graphics, including the Renoir APU I have handy, but https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-2023.Q3.3 works.

I am able to reproduce the issue easily with that.

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

Ah, so .filter(|f| f.modifier == Modifier::Invalid) ends up filtering out all of the formats. ("Invalid" here means formats that work with an "implicit dmabuf modifier".)

Removing that gives me wl_drm@53: error 2: buffer import failed instead. Presumably Mesa's EGL failed to import the dmabuf.

I could make sense that Mesa is requiring explicit modifiers for import while AMDVLK needs wl_drm which doesn't support them, but then if other compositors work with the same drivers, I'm not sure what they're doing differently.

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

Smithay/smithay#1274 seems to fix this.

@i509VCB
Copy link

i509VCB commented Jan 10, 2024

Also an issue to see if amdvlk will implement zwp-linux-dmabuf-v1: GPUOpen-Drivers/pal#96

@ids1024
Copy link
Member

ids1024 commented Jan 10, 2024

Yeah, AMDVLK should move to the dmabuf protocol, and probably make use of explicit modifiers. wl_drm is basically a deprecated API at this point, and Mesa and compositors are interested in dropping support for it once it's no longer needed anywhere.

RADV likely offers overall better Wayland support, though there is still more to improve in Mesa's Vulkan and EGL Wayland WSI support.

@ids1024
Copy link
Member

ids1024 commented Jan 16, 2024

This should be fixed now that the Smithay PR is merged, and cosmic-comp has updated Smithay.

@jokeyrhyme
Copy link
Author

I can confirm that this is fixed for me: pop-os/cosmic-epoch#186

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

4 participants