kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.47k stars 979 forks source link

glfw error with explicit synchronization on sway #7767

Closed krakow10 closed 2 months ago

krakow10 commented 2 months ago

Describe the bug Kitty fails to launch when the sway compositor is using explicit synchronization.

[quat@quat-desktop ~]$ kitty --config NONE
wp_linux_drm_syncobj_surface_v1#40: error 4: Buffer attached but no acquire point set
[0.159] The output buffer does not support sRGB color encoding, colors will be incorrect.
[0.170] [glfw error 65544]: Wayland: fatal display error: Protocol error

To Reproduce Steps to reproduce the behavior:

  1. Use Arch Linux
  2. Install sway-git
  3. Install NVIDIA driver version 560.35.03
  4. Launch kitty
  5. See error

Screenshots image

ionenwks commented 2 months ago

Haven't tried it but note that issue may possibly be still in egl-wayland (need >=1.1.14 to use explicit sync), egl-wayland-1.1.14 is particularly broken, and 1.1.15 still has issues that crash applications (one major issue was fixed, but no new release yet). Alternatively, it could be wlroots' rather new explicit sync implementation that needs work (Edit: one could try with plasma6/kwin instead to see it happens on both).

Note that nvidia official drivers (current latest 560.35.03) still ship egl-wayland-1.1.13.1 and distros giving an higher version are essentially opting in an early experiment (In Gentoo we're currently leaving it as a opt-in, users don't get 1.1.15 by default). Arch seems to have downgraded back to 1.1.13.1 too, have you gotten that update yet or is it somehow failing even with 1.1.13.1? (if the latter, may indicate it's trying to use explicit sync when it can't).

Not to say bundled glfw may not have something that needs fixing too if it's misusing something and causing unexpected issues.

kovidgoyal commented 2 months ago

Explicit sync is something that happens in lower layers than application code. If its crashing then the bug is probably in either mesa or the NVIDIA driver or the compositor. An OpenGL application like kitty just calls eglSwapBuffers() there is no concept of implicit/explicit synchronization in this API. So I dont see that anything can be done in kitty about this. If anybody knows any different feel free to enlighten me.

krakow10 commented 2 months ago

Haven't tried it but note that issue may possibly be still in egl-wayland (need >=1.1.14 to use explicit sync), egl-wayland-1.1.14 is particularly broken, and 1.1.15 still has issues that crash applications (one major issue was fixed, but no new release yet).

egl-wayland is poignant, this was tested with egl-wayland 1.1.15. I found that screen capture doesn't work on any other version but I may have not tested correctly. I may try 1.1.13.1 when I have time.

Edit: The release notes for egl-wayland 1.1.13.1 state that it disables explicit sync, so it is not a valid explicit sync testing target. "...users may want to fall back to 1.1.13 to avoid using explicit sync, but cannot on 560. This release provides an option to fall back to."

mahkoh commented 2 months ago

You must not call wl_surface_attach on a surface that has an egl context.

kovidgoyal commented 2 months ago

On Mon, Aug 26, 2024 at 01:52:39AM -0700, mahkoh wrote:

You must not call wl_surface_attach on a surface that has an egl context.

Is this documented somewhere? Where in the Wayland spec does it say that's not allowed? All Wayland compositors have, to date, been fine with this. And I can find no mention of such a restriction in the docs of wl_surface_attach.

kovidgoyal commented 2 months ago

Note, I don't know if the fix actually works, but its the only instance in the codebase I can find of a buffer being attached to a surface that already has an OpenGL context. @krakow10 please test.

mahkoh commented 2 months ago

Is this documented somewhere? Where in the Wayland spec does it say×that's not allowed? All Wayland compositors have, to date, been fine with this.

Insofar that vulkan says

The native window referred to by pCreateInfo->surface must not become associated with a non-Vulkan graphics API surface before all associated Vulkan swapchains have been destroyed.

And similar for opengl. What exactly this means is not necessarily documented.

krakow10 commented 2 months ago

Assuming the AUR package installed correctly (installed as kitty-git-1:0.36.1.r16.g9843b5c21-1) I am getting the same error as before.

image

kovidgoyal commented 2 months ago

Run with --debug-rendering that will tell us the sequence of events. And you can use the kitty nightly build no need to rely on AUR. https://sw.kovidgoyal.net/kitty/build/

krakow10 commented 2 months ago

Here is the output I get. [quat@quat-desktop ~]$ kitty --config NONE --debug-rendering

[0.065] Compositor missing capabilities: blur
[0.080] Creating window 1 at size: 941x1056 and scale 1
[0.175] GL version string: '3.1.0 NVIDIA 560.35.03' Detected version: 3.1
[0.193] Compositor top-level capabilities: maximize=1 minimize=0 window_menu=1 fullscreen=0
[0.193] XDG top-level configure event for window 1: size: 0x0 states: 
[0.193] XDG decoration configure event received for window 1: has_server_side_decorations: 1
[0.193] XDG surface configure event received and acknowledged for window 1
[0.193] Waiting for swap to commit Wayland surface for window: 1
[0.193] Final window 1 content size: 941x1056 resized: 0
[0.193] Setting window 1 "visible area" geometry in configure event: x=0 y=0 941x1056 viewport: 941x1056
[0.193] Attached temp buffer during window 1 creation of size: 941x1056 and rgba(0, 0, 0, 255)
[0.193] Waiting for compositor to send fractional scale for window 1
wp_linux_drm_syncobj_surface_v1#40: error 4: Buffer attached but no acquire point set
[0.216] The output buffer does not support sRGB color encoding, colors will be incorrect.
[0.216] OS Window created
[0.237] Child launched
[0.238] [glfw error 65544]: Wayland: fatal display error: Protocol error
[0.245] Window 1 swapped committing surface
kovidgoyal commented 2 months ago

Looks fine to me. We can see that the compositor is complaining after the temp buffer is attached. With my change that occurs before any opengl context is created. So as far as I can see kitty is not doing anything wrong here. If I had to guess, sway now requires more drama while attaching a buffer to a surface. Maybe a call to some function in the syncobj protocol. If so, only they can tell us what that is. Report the issue there.

mahkoh commented 2 months ago

Run with WAYLAND_DEBUG=1 to get the relevant logs.

kovidgoyal commented 2 months ago

Or actually, there may be one more place I overlooked. Hang tight.

krakow10 commented 2 months ago

Here is the cool wayland log interlaced with --debug-rendering output wayland-debug.log

Embedded version ``` [3132969.309] {Default Queue} -> wl_display#1.get_registry(new id wl_registry#2) [3132969.472] {Default Queue} -> wl_display#1.sync(new id wl_callback#3) [3132969.768] {Display Queue} wl_display#1.delete_id(3) [3132969.775] {Default Queue} wl_registry#2.global(1, "wl_shm", 2) [3132969.803] {Default Queue} -> wl_registry#2.bind(1, "wl_shm", 1, new id [unknown]#4) [3132969.810] {Default Queue} wl_registry#2.global(2, "zwp_linux_dmabuf_v1", 4) [3132969.815] {Default Queue} wl_registry#2.global(3, "wp_linux_drm_syncobj_manager_v1", 1) [3132969.817] {Default Queue} wl_registry#2.global(4, "wl_compositor", 6) [3132969.820] {Default Queue} -> wl_registry#2.bind(4, "wl_compositor", 6, new id [unknown]#5) [3132969.823] {Default Queue} wl_registry#2.global(5, "wl_subcompositor", 1) [3132969.826] {Default Queue} -> wl_registry#2.bind(5, "wl_subcompositor", 1, new id [unknown]#6) [3132969.828] {Default Queue} wl_registry#2.global(6, "wl_data_device_manager", 3) [3132969.831] {Default Queue} -> wl_registry#2.bind(6, "wl_data_device_manager", 1, new id [unknown]#7) [3132969.834] {Default Queue} wl_registry#2.global(7, "zwlr_gamma_control_manager_v1", 1) [3132969.836] {Default Queue} wl_registry#2.global(8, "zxdg_output_manager_v1", 3) [3132969.839] {Default Queue} wl_registry#2.global(9, "ext_idle_notifier_v1", 1) [3132969.842] {Default Queue} wl_registry#2.global(10, "zwp_idle_inhibit_manager_v1", 1) [3132969.846] {Default Queue} wl_registry#2.global(11, "zwlr_layer_shell_v1", 4) [3132969.852] {Default Queue} -> wl_registry#2.bind(11, "zwlr_layer_shell_v1", 4, new id [unknown]#8) [3132969.855] {Default Queue} wl_registry#2.global(12, "xdg_wm_base", 5) [3132969.857] {Default Queue} -> wl_registry#2.bind(12, "xdg_wm_base", 5, new id [unknown]#9) [3132969.860] {Default Queue} wl_registry#2.global(13, "zwp_tablet_manager_v2", 1) [3132969.862] {Default Queue} wl_registry#2.global(14, "org_kde_kwin_server_decoration_manager", 1) [3132969.865] {Default Queue} wl_registry#2.global(15, "zxdg_decoration_manager_v1", 1) [3132969.867] {Default Queue} -> wl_registry#2.bind(15, "zxdg_decoration_manager_v1", 1, new id [unknown]#10) [3132969.870] {Default Queue} wl_registry#2.global(16, "zwp_relative_pointer_manager_v1", 1) [3132969.873] {Default Queue} -> wl_registry#2.bind(16, "zwp_relative_pointer_manager_v1", 1, new id [unknown]#11) [3132969.876] {Default Queue} wl_registry#2.global(17, "zwp_pointer_constraints_v1", 1) [3132969.880] {Default Queue} -> wl_registry#2.bind(17, "zwp_pointer_constraints_v1", 1, new id [unknown]#12) [3132969.886] {Default Queue} wl_registry#2.global(18, "wp_presentation", 1) [3132969.888] {Default Queue} wl_registry#2.global(19, "zwlr_output_manager_v1", 4) [3132969.890] {Default Queue} wl_registry#2.global(20, "zwlr_output_power_manager_v1", 1) [3132969.893] {Default Queue} wl_registry#2.global(21, "zwp_input_method_manager_v2", 1) [3132969.895] {Default Queue} wl_registry#2.global(22, "zwp_text_input_manager_v3", 1) [3132969.897] {Default Queue} -> wl_registry#2.bind(22, "zwp_text_input_manager_v3", 1, new id [unknown]#13) [3132969.900] {Default Queue} wl_registry#2.global(23, "ext_foreign_toplevel_list_v1", 1) [3132969.902] {Default Queue} wl_registry#2.global(24, "zwlr_foreign_toplevel_manager_v1", 3) [3132969.905] {Default Queue} wl_registry#2.global(25, "ext_session_lock_manager_v1", 1) [3132969.907] {Default Queue} wl_registry#2.global(26, "wp_drm_lease_device_v1", 1) [3132969.910] {Default Queue} wl_registry#2.global(27, "zwlr_export_dmabuf_manager_v1", 1) [3132969.913] {Default Queue} wl_registry#2.global(28, "zwlr_screencopy_manager_v1", 3) [3132969.916] {Default Queue} wl_registry#2.global(29, "zwlr_data_control_manager_v1", 2) [3132969.919] {Default Queue} wl_registry#2.global(30, "wp_security_context_manager_v1", 1) [3132969.921] {Default Queue} wl_registry#2.global(31, "wp_viewporter", 1) [3132969.924] {Default Queue} -> wl_registry#2.bind(31, "wp_viewporter", 1, new id [unknown]#14) [3132969.927] {Default Queue} wl_registry#2.global(32, "wp_single_pixel_buffer_manager_v1", 1) [3132969.929] {Default Queue} -> wl_registry#2.bind(32, "wp_single_pixel_buffer_manager_v1", 1, new id [unknown]#15) [3132969.944] {Default Queue} wl_registry#2.global(33, "wp_content_type_manager_v1", 1) [3132969.948] {Default Queue} wl_registry#2.global(34, "wp_fractional_scale_manager_v1", 1) [3132969.952] {Default Queue} -> wl_registry#2.bind(34, "wp_fractional_scale_manager_v1", 1, new id [unknown]#16) [3132969.955] {Default Queue} wl_registry#2.global(35, "wp_tearing_control_manager_v1", 1) [3132969.957] {Default Queue} wl_registry#2.global(36, "zxdg_exporter_v1", 1) [3132969.959] {Default Queue} wl_registry#2.global(37, "zxdg_importer_v1", 1) [3132969.962] {Default Queue} wl_registry#2.global(38, "zxdg_exporter_v2", 1) [3132969.964] {Default Queue} wl_registry#2.global(39, "zxdg_importer_v2", 1) [3132969.966] {Default Queue} wl_registry#2.global(40, "xdg_activation_v1", 1) [3132969.969] {Default Queue} -> wl_registry#2.bind(40, "xdg_activation_v1", 1, new id [unknown]#17) [3132969.972] {Default Queue} wl_registry#2.global(41, "wp_cursor_shape_manager_v1", 1) [3132969.974] {Default Queue} -> wl_registry#2.bind(41, "wp_cursor_shape_manager_v1", 1, new id [unknown]#18) [3132969.978] {Default Queue} wl_registry#2.global(42, "zwp_virtual_keyboard_manager_v1", 1) [3132969.981] {Default Queue} wl_registry#2.global(43, "zwlr_virtual_pointer_manager_v1", 2) [3132969.983] {Default Queue} wl_registry#2.global(44, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1) [3132969.985] {Default Queue} wl_registry#2.global(45, "zwp_pointer_gestures_v1", 3) [3132969.988] {Default Queue} wl_registry#2.global(46, "ext_transient_seat_manager_v1", 1) [3132969.990] {Default Queue} wl_registry#2.global(47, "wl_seat", 9) [3132969.993] {Default Queue} -> wl_registry#2.bind(47, "wl_seat", 9, new id [unknown]#19) [3132969.996] {Default Queue} -> wl_data_device_manager#7.get_data_device(new id wl_data_device#20, wl_seat#19) [3132970.001] {Default Queue} wl_registry#2.global(49, "zwp_primary_selection_device_manager_v1", 1) [3132970.003] {Default Queue} -> wl_registry#2.bind(49, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]#21) [3132970.009] {Default Queue} -> zwp_primary_selection_device_manager_v1#21.get_device(new id zwp_primary_selection_device_v1#22, wl_seat#19) [3132970.013] {Default Queue} wl_registry#2.global(50, "wl_output", 4) [3132970.016] {Default Queue} -> wl_registry#2.bind(50, "wl_output", 4, new id [unknown]#23) [3132970.019] {Default Queue} wl_registry#2.global(52, "wl_output", 4) [3132970.021] {Default Queue} -> wl_registry#2.bind(52, "wl_output", 4, new id [unknown]#24) [3132970.024] {Default Queue} wl_registry#2.global(53, "wl_output", 4) [3132970.026] {Default Queue} -> wl_registry#2.bind(53, "wl_output", 4, new id [unknown]#25) [3132970.029] {Default Queue} wl_callback#3.done(77808) [3132970.032] {Default Queue} -> zwp_text_input_manager_v3#13.get_text_input(new id zwp_text_input_v3#3, wl_seat#19) [3132970.035] {Default Queue} -> wl_display#1.sync(new id wl_callback#26) [3132970.173] {Display Queue} wl_display#1.delete_id(26) [3132970.177] {Default Queue} discarded wl_shm#4.format(0) [3132970.179] {Default Queue} discarded wl_shm#4.format(1) [3132970.180] {Default Queue} discarded wl_shm#4.format(875709016) [3132970.182] {Default Queue} discarded wl_shm#4.format(875708993) [3132970.184] {Default Queue} discarded wl_shm#4.format(875710274) [3132970.185] {Default Queue} discarded wl_shm#4.format(842094674) [3132970.187] {Default Queue} discarded wl_shm#4.format(842088786) [3132970.188] {Default Queue} discarded wl_shm#4.format(892426322) [3132970.190] {Default Queue} discarded wl_shm#4.format(892420434) [3132970.191] {Default Queue} discarded wl_shm#4.format(909199186) [3132970.193] {Default Queue} discarded wl_shm#4.format(1211384408) [3132970.194] {Default Queue} discarded wl_shm#4.format(1211384385) [3132970.196] {Default Queue} discarded wl_shm#4.format(942948952) [3132970.198] {Default Queue} discarded wl_shm#4.format(942948929) [3132970.201] {Default Queue} wl_seat#19.name("seat0") [3132970.204] {Default Queue} wl_seat#19.capabilities(3) [3132970.212] {Default Queue} -> wl_seat#19.get_pointer(new id wl_pointer#27) [3132970.215] {Default Queue} -> wp_cursor_shape_manager_v1#18.get_pointer(new id wp_cursor_shape_device_v1#28, wl_pointer#27) [3132970.218] {Default Queue} -> wl_seat#19.get_keyboard(new id wl_keyboard#29) [3132970.221] {Default Queue} wl_output#23.geometry(0, 0, 600, 340, 0, "LG Electronics", "LG Ultra HD", 0) [3132970.225] {Default Queue} wl_output#23.mode(1, 3840, 2160, 59997) [3132970.228] {Default Queue} wl_output#23.scale(2) [3132970.230] {Default Queue} wl_output#23.name("DP-3") [3132970.233] {Default Queue} wl_output#23.description("LG Electronics LG Ultra HD 0x00032318 (DP-3)") [3132970.236] {Default Queue} wl_output#23.done() [3132970.238] {Default Queue} wl_output#24.geometry(0, 0, 600, 340, 0, "LG Electronics", "LG Ultra HD", 0) [3132970.243] {Default Queue} wl_output#24.mode(1, 3840, 2160, 59997) [3132970.246] {Default Queue} wl_output#24.scale(2) [3132970.248] {Default Queue} wl_output#24.name("DP-1") [3132970.250] {Default Queue} wl_output#24.description("LG Electronics LG Ultra HD 0x00055FD0 (DP-1)") [3132970.252] {Default Queue} wl_output#24.done() [3132970.254] {Default Queue} wl_output#25.geometry(0, 0, 600, 340, 0, "Ancor Communications Inc", "ROG PG279Q", 0) [3132970.257] {Default Queue} wl_output#25.mode(1, 2560, 1440, 165000) [3132970.260] {Default Queue} wl_output#25.scale(2) [3132970.264] {Default Queue} wl_output#25.name("DP-2") [3132970.265] {Default Queue} wl_output#25.description("Ancor Communications Inc ROG PG279Q #ASNXpqFioRXd (DP-2)") [3132970.267] {Default Queue} wl_output#25.done() [3132970.269] {Default Queue} wl_callback#26.done(77808) [3132970.272] {Default Queue} -> wl_compositor#5.create_surface(new id wl_surface#26) [0.081] Compositor missing capabilities: blur [3132995.376] {Default Queue} -> wl_compositor#5.create_surface(new id wl_surface#30) [3132995.413] {Default Queue} -> wp_fractional_scale_manager_v1#16.get_fractional_scale(new id wp_fractional_scale_v1#31, wl_surface#30) [3132995.420] {Default Queue} -> wp_viewporter#14.get_viewport(new id wp_viewport#32, wl_surface#30) [0.107] Creating window 1 at size: 941x1056 and scale 1 [3132995.434] {Default Queue} -> wl_compositor#5.create_region(new id wl_region#33) [3132995.436] {Default Queue} -> wl_region#33.add(0, 0, 941, 1056) [3132995.439] {Default Queue} -> wl_surface#30.set_opaque_region(wl_region#33) [3132995.441] {Default Queue} -> wl_region#33.destroy() [3132995.443] {Default Queue} -> wl_surface#30.set_buffer_scale(1) [3133014.645] -> wl_display#1.get_registry(new id wl_registry#34) [3133014.685] -> wl_display#1.sync(new id wl_callback#35) [3133014.888] {Display Queue} wl_display#1.delete_id(33) [3133014.897] {Display Queue} wl_display#1.delete_id(35) [3133014.900] wl_registry#34.global(1, "wl_shm", 2) [3133014.903] wl_registry#34.global(2, "zwp_linux_dmabuf_v1", 4) [3133014.907] -> wl_registry#34.bind(2, "zwp_linux_dmabuf_v1", 4, new id [unknown]#33) [3133014.911] wl_registry#34.global(3, "wp_linux_drm_syncobj_manager_v1", 1) [3133014.914] wl_registry#34.global(4, "wl_compositor", 6) [3133014.918] wl_registry#34.global(5, "wl_subcompositor", 1) [3133014.921] wl_registry#34.global(6, "wl_data_device_manager", 3) [3133014.924] wl_registry#34.global(7, "zwlr_gamma_control_manager_v1", 1) [3133014.927] wl_registry#34.global(8, "zxdg_output_manager_v1", 3) [3133014.930] wl_registry#34.global(9, "ext_idle_notifier_v1", 1) [3133014.933] wl_registry#34.global(10, "zwp_idle_inhibit_manager_v1", 1) [3133014.935] wl_registry#34.global(11, "zwlr_layer_shell_v1", 4) [3133014.938] wl_registry#34.global(12, "xdg_wm_base", 5) [3133014.941] wl_registry#34.global(13, "zwp_tablet_manager_v2", 1) [3133014.945] wl_registry#34.global(14, "org_kde_kwin_server_decoration_manager", 1) [3133014.948] wl_registry#34.global(15, "zxdg_decoration_manager_v1", 1) [3133014.951] wl_registry#34.global(16, "zwp_relative_pointer_manager_v1", 1) [3133014.953] wl_registry#34.global(17, "zwp_pointer_constraints_v1", 1) [3133014.956] wl_registry#34.global(18, "wp_presentation", 1) [3133014.974] wl_registry#34.global(19, "zwlr_output_manager_v1", 4) [3133014.977] wl_registry#34.global(20, "zwlr_output_power_manager_v1", 1) [3133014.979] wl_registry#34.global(21, "zwp_input_method_manager_v2", 1) [3133014.982] wl_registry#34.global(22, "zwp_text_input_manager_v3", 1) [3133014.985] wl_registry#34.global(23, "ext_foreign_toplevel_list_v1", 1) [3133014.987] wl_registry#34.global(24, "zwlr_foreign_toplevel_manager_v1", 3) [3133014.990] wl_registry#34.global(25, "ext_session_lock_manager_v1", 1) [3133014.992] wl_registry#34.global(26, "wp_drm_lease_device_v1", 1) [3133014.995] wl_registry#34.global(27, "zwlr_export_dmabuf_manager_v1", 1) [3133014.998] wl_registry#34.global(28, "zwlr_screencopy_manager_v1", 3) [3133015.000] wl_registry#34.global(29, "zwlr_data_control_manager_v1", 2) [3133015.004] wl_registry#34.global(30, "wp_security_context_manager_v1", 1) [3133015.007] wl_registry#34.global(31, "wp_viewporter", 1) [3133015.010] wl_registry#34.global(32, "wp_single_pixel_buffer_manager_v1", 1) [3133015.013] wl_registry#34.global(33, "wp_content_type_manager_v1", 1) [3133015.016] wl_registry#34.global(34, "wp_fractional_scale_manager_v1", 1) [3133015.019] wl_registry#34.global(35, "wp_tearing_control_manager_v1", 1) [3133015.022] wl_registry#34.global(36, "zxdg_exporter_v1", 1) [3133015.025] wl_registry#34.global(37, "zxdg_importer_v1", 1) [3133015.027] wl_registry#34.global(38, "zxdg_exporter_v2", 1) [3133015.030] wl_registry#34.global(39, "zxdg_importer_v2", 1) [3133015.033] wl_registry#34.global(40, "xdg_activation_v1", 1) [3133015.035] wl_registry#34.global(41, "wp_cursor_shape_manager_v1", 1) [3133015.038] wl_registry#34.global(42, "zwp_virtual_keyboard_manager_v1", 1) [3133015.041] wl_registry#34.global(43, "zwlr_virtual_pointer_manager_v1", 2) [3133015.044] wl_registry#34.global(44, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1) [3133015.047] wl_registry#34.global(45, "zwp_pointer_gestures_v1", 3) [3133015.050] wl_registry#34.global(46, "ext_transient_seat_manager_v1", 1) [3133015.052] wl_registry#34.global(47, "wl_seat", 9) [3133015.055] wl_registry#34.global(49, "zwp_primary_selection_device_manager_v1", 1) [3133015.057] wl_registry#34.global(50, "wl_output", 4) [3133015.059] wl_registry#34.global(52, "wl_output", 4) [3133015.062] wl_registry#34.global(53, "wl_output", 4) [3133015.065] wl_callback#35.done(77808) [3133015.071] -> zwp_linux_dmabuf_v1#33.get_default_feedback(new id zwp_linux_dmabuf_feedback_v1#35) [3133015.076] -> wl_display#1.sync(new id wl_callback#36) [3133015.542] {Display Queue} wl_display#1.delete_id(36) [3133015.562] zwp_linux_dmabuf_feedback_v1#35.main_device(array[8]) [3133015.567] zwp_linux_dmabuf_feedback_v1#35.format_table(fd 7, 12096) [3133015.571] zwp_linux_dmabuf_feedback_v1#35.tranche_target_device(array[8]) [3133015.574] zwp_linux_dmabuf_feedback_v1#35.tranche_flags(0) [3133015.577] zwp_linux_dmabuf_feedback_v1#35.tranche_formats(array[1512]) [3133015.580] zwp_linux_dmabuf_feedback_v1#35.tranche_done() [3133015.583] zwp_linux_dmabuf_feedback_v1#35.done() [3133016.007] wl_callback#36.done(77808) [3133016.027] -> zwp_linux_dmabuf_feedback_v1#35.destroy() [3133016.032] -> zwp_linux_dmabuf_v1#33.destroy() [3133028.175] -> wl_display#1.get_registry(new id wl_registry#36) [3133028.231] -> wl_display#1.sync(new id wl_callback#37) [3133028.423] {Display Queue} wl_display#1.delete_id(35) [3133028.446] {Display Queue} wl_display#1.delete_id(33) [3133028.449] {Display Queue} wl_display#1.delete_id(37) [3133028.451] wl_registry#36.global(1, "wl_shm", 2) [3133028.455] wl_registry#36.global(2, "zwp_linux_dmabuf_v1", 4) [3133028.458] -> wl_registry#36.bind(2, "zwp_linux_dmabuf_v1", 4, new id [unknown]#33) [3133028.462] wl_registry#36.global(3, "wp_linux_drm_syncobj_manager_v1", 1) [3133028.465] -> wl_registry#36.bind(3, "wp_linux_drm_syncobj_manager_v1", 1, new id [unknown]#35) [3133028.467] wl_registry#36.global(4, "wl_compositor", 6) [3133028.469] wl_registry#36.global(5, "wl_subcompositor", 1) [3133028.471] wl_registry#36.global(6, "wl_data_device_manager", 3) [3133028.495] wl_registry#36.global(7, "zwlr_gamma_control_manager_v1", 1) [3133028.497] wl_registry#36.global(8, "zxdg_output_manager_v1", 3) [3133028.499] wl_registry#36.global(9, "ext_idle_notifier_v1", 1) [3133028.501] wl_registry#36.global(10, "zwp_idle_inhibit_manager_v1", 1) [3133028.503] wl_registry#36.global(11, "zwlr_layer_shell_v1", 4) [3133028.505] wl_registry#36.global(12, "xdg_wm_base", 5) [3133028.507] wl_registry#36.global(13, "zwp_tablet_manager_v2", 1) [3133028.509] wl_registry#36.global(14, "org_kde_kwin_server_decoration_manager", 1) [3133028.511] wl_registry#36.global(15, "zxdg_decoration_manager_v1", 1) [3133028.514] wl_registry#36.global(16, "zwp_relative_pointer_manager_v1", 1) [3133028.515] wl_registry#36.global(17, "zwp_pointer_constraints_v1", 1) [3133028.517] wl_registry#36.global(18, "wp_presentation", 1) [3133028.520] -> wl_registry#36.bind(18, "wp_presentation", 1, new id [unknown]#38) [3133028.523] wl_registry#36.global(19, "zwlr_output_manager_v1", 4) [3133028.525] wl_registry#36.global(20, "zwlr_output_power_manager_v1", 1) [3133028.527] wl_registry#36.global(21, "zwp_input_method_manager_v2", 1) [3133028.529] wl_registry#36.global(22, "zwp_text_input_manager_v3", 1) [3133028.531] wl_registry#36.global(23, "ext_foreign_toplevel_list_v1", 1) [3133028.533] wl_registry#36.global(24, "zwlr_foreign_toplevel_manager_v1", 3) [3133028.535] wl_registry#36.global(25, "ext_session_lock_manager_v1", 1) [3133028.537] wl_registry#36.global(26, "wp_drm_lease_device_v1", 1) [3133028.539] wl_registry#36.global(27, "zwlr_export_dmabuf_manager_v1", 1) [3133028.541] wl_registry#36.global(28, "zwlr_screencopy_manager_v1", 3) [3133028.543] wl_registry#36.global(29, "zwlr_data_control_manager_v1", 2) [3133028.545] wl_registry#36.global(30, "wp_security_context_manager_v1", 1) [3133028.547] wl_registry#36.global(31, "wp_viewporter", 1) [3133028.549] wl_registry#36.global(32, "wp_single_pixel_buffer_manager_v1", 1) [3133028.550] wl_registry#36.global(33, "wp_content_type_manager_v1", 1) [3133028.552] wl_registry#36.global(34, "wp_fractional_scale_manager_v1", 1) [3133028.554] wl_registry#36.global(35, "wp_tearing_control_manager_v1", 1) [3133028.556] wl_registry#36.global(36, "zxdg_exporter_v1", 1) [3133028.558] wl_registry#36.global(37, "zxdg_importer_v1", 1) [3133028.560] wl_registry#36.global(38, "zxdg_exporter_v2", 1) [3133028.562] wl_registry#36.global(39, "zxdg_importer_v2", 1) [3133028.564] wl_registry#36.global(40, "xdg_activation_v1", 1) [3133028.566] wl_registry#36.global(41, "wp_cursor_shape_manager_v1", 1) [3133028.568] wl_registry#36.global(42, "zwp_virtual_keyboard_manager_v1", 1) [3133028.570] wl_registry#36.global(43, "zwlr_virtual_pointer_manager_v1", 2) [3133028.571] wl_registry#36.global(44, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1) [3133028.573] wl_registry#36.global(45, "zwp_pointer_gestures_v1", 3) [3133028.575] wl_registry#36.global(46, "ext_transient_seat_manager_v1", 1) [3133028.577] wl_registry#36.global(47, "wl_seat", 9) [3133028.579] wl_registry#36.global(49, "zwp_primary_selection_device_manager_v1", 1) [3133028.581] wl_registry#36.global(50, "wl_output", 4) [3133028.583] wl_registry#36.global(52, "wl_output", 4) [3133028.585] wl_registry#36.global(53, "wl_output", 4) [3133028.587] wl_callback#37.done(77808) [3133028.591] -> zwp_linux_dmabuf_v1#33.get_default_feedback(new id zwp_linux_dmabuf_feedback_v1#37) [3133028.595] -> wl_display#1.sync(new id wl_callback#39) [3133028.663] {Display Queue} wl_display#1.delete_id(39) [3133028.666] discarded wp_presentation#38.clock_id(1) [3133028.668] zwp_linux_dmabuf_feedback_v1#37.main_device(array[8]) [3133028.671] zwp_linux_dmabuf_feedback_v1#37.format_table(fd 15, 12096) [3133028.710] zwp_linux_dmabuf_feedback_v1#37.tranche_target_device(array[8]) [3133028.712] zwp_linux_dmabuf_feedback_v1#37.tranche_flags(0) [3133028.714] zwp_linux_dmabuf_feedback_v1#37.tranche_formats(array[1512]) [3133028.768] zwp_linux_dmabuf_feedback_v1#37.tranche_done() [3133028.770] zwp_linux_dmabuf_feedback_v1#37.done() [3133028.788] wl_callback#39.done(77808) [3133041.284] -> zwp_linux_dmabuf_v1#33.get_surface_feedback(new id zwp_linux_dmabuf_feedback_v1#39, wl_surface#30) [3133041.314] -> wl_display#1.sync(new id wl_callback#40) [3133041.432] {Display Queue} wl_display#1.delete_id(40) [3133041.438] zwp_linux_dmabuf_feedback_v1#39.main_device(array[8]) [3133041.442] zwp_linux_dmabuf_feedback_v1#39.format_table(fd 20, 12096) [3133041.458] zwp_linux_dmabuf_feedback_v1#39.tranche_target_device(array[8]) [3133041.462] zwp_linux_dmabuf_feedback_v1#39.tranche_flags(0) [3133041.465] zwp_linux_dmabuf_feedback_v1#39.tranche_formats(array[1512]) [3133041.532] zwp_linux_dmabuf_feedback_v1#39.tranche_done() [3133041.535] zwp_linux_dmabuf_feedback_v1#39.done() [3133041.538] wl_callback#40.done(77808) [3133041.552] -> wp_linux_drm_syncobj_manager_v1#35.get_surface(new id wp_linux_drm_syncobj_surface_v1#40, wl_surface#30) [3133041.557] -> wp_linux_drm_syncobj_manager_v1#35.import_timeline(new id wp_linux_drm_syncobj_timeline_v1#41, fd 22) [3133107.162] {Default Queue} -> xdg_wm_base#9.get_xdg_surface(new id xdg_surface#42, wl_surface#30) [3133107.183] {Default Queue} -> xdg_surface#42.get_toplevel(new id xdg_toplevel#43) [3133107.187] {Default Queue} -> zxdg_decoration_manager_v1#10.get_toplevel_decoration(new id zxdg_toplevel_decoration_v1#44, xdg_toplevel#43) [3133107.192] {Default Queue} -> xdg_toplevel#43.set_app_id("kitty") [3133107.195] {Default Queue} -> xdg_toplevel#43.set_title("kitty") [3133107.198] {Default Queue} -> zxdg_toplevel_decoration_v1#44.set_mode(2) [3133107.201] {Default Queue} -> wl_surface#30.commit() [3133107.205] {Default Queue} -> wl_display#1.sync(new id wl_callback#45) [3133107.208] {Default Queue} wl_keyboard#29.keymap(1, fd 6, 64754) [3133114.367] {Default Queue} wl_keyboard#29.repeat_info(25, 600) [3133114.545] {Display Queue} wl_display#1.delete_id(45) [3133114.555] {Default Queue} xdg_wm_base#9.ping(77809) [3133114.560] {Default Queue} -> xdg_wm_base#9.pong(77809) [3133114.564] {Default Queue} wl_callback#45.done(77810) [3133114.567] {Default Queue} xdg_toplevel#43.wm_capabilities(array[8]) [0.226] Compositor top-level capabilities: maximize=1 minimize=0 window_menu=1 fullscreen=0 [3133114.577] {Default Queue} xdg_toplevel#43.configure(0, 0, array[0]) [0.226] XDG top-level configure event for window 1: size: 0x0 states: [3133114.587] {Default Queue} zxdg_toplevel_decoration_v1#44.configure(2) [0.226] XDG decoration configure event received for window 1: has_server_side_decorations: 1 [3133114.593] {Default Queue} xdg_surface#42.configure(77810) [3133114.596] {Default Queue} -> xdg_surface#42.ack_configure(77810) [0.226] XDG surface configure event received and acknowledged for window 1 [0.226] Waiting for swap to commit Wayland surface for window: 1 [0.226] Final window 1 content size: 941x1056 resized: 0 [0.226] Setting window 1 "visible area" geometry in configure event: x=0 y=0 941x1056 viewport: 941x1056 [3133114.613] {Default Queue} -> xdg_surface#42.set_window_geometry(0, 0, 941, 1056) [3133114.617] {Default Queue} -> wp_viewport#32.set_destination(941, 1056) [3133114.621] {Default Queue} -> wp_single_pixel_buffer_manager_v1#15.create_u32_rgba_buffer(new id wl_buffer#45, 0, 0, 0, 4294967041) [3133114.627] {Default Queue} -> wl_surface#30.set_buffer_scale(1) [3133114.630] {Default Queue} -> wp_viewport#32.set_destination(941, 1056) [3133114.634] {Default Queue} -> wl_surface#30.attach(wl_buffer#45, 0, 0) [0.226] Attached temp buffer during window 1 creation of size: 941x1056 and rgba(0, 0, 0, 255) [3133114.641] {Default Queue} -> wl_surface#30.commit() [0.226] Waiting for compositor to send fractional scale for window 1 [3133114.650] {Default Queue} -> wl_display#1.sync(new id wl_callback#46) [3133114.703] {Display Queue} wl_display#1.error(wp_linux_drm_syncobj_surface_v1#40, 4, "Buffer attached but no acquire point set") wp_linux_drm_syncobj_surface_v1#40: error 4: Buffer attached but no acquire point set [0.252] The output buffer does not support sRGB color encoding, colors will be incorrect. [0.252] OS Window created [0.286] Child launched [0.287] [glfw error 65544]: Wayland: fatal display error: Protocol error [0.292] Window 1 swapped committing surface [0.210] GL version string: '3.1.0 NVIDIA 560.35.03' Detected version: 3.1 ```
mahkoh commented 2 months ago

The logs show the syncobj_surface being created before attaching a single pixel buffer.

kovidgoyal commented 2 months ago

Yes, as I said, I missed one place where it can happen. Namely when the OS window is created hidden and then later shown.

kovidgoyal commented 2 months ago

And this should take care of it: https://github.com/kovidgoyal/kitty/commit/68401eddbab98f95b15ba54a817ad7f723e0d7d0

krakow10 commented 2 months ago

It launches now, thanks for the fix!

sydfouzan commented 2 months ago

Has this been pushed to arch depository? I just updated my system and I am seeing the same issue at my side.