Invalid time-stamps from zwp_text_input_v3 IME keyboard events
With GNOME Shell 45.2:
- Set a keyboard layout that uses text-input, "Korean (Hangul)" with
Hangul Mode
enabled. - Use a recent build of Blender, can be accessed from: https://builder.blender.org/download/daily/
- Run Blender from a terminal with the command:
env WAYLAND_DEBUG=1 ./blender --factory-startup -w > out.txt 2>&
- Enter any text editing field (the top "Scene") field for example.
- Type in some text (the "a" key on the keyboard is enough).
- Press enter.
- Exit Blender.
Check out.txt
and notice the time-stamps after the IME text is in seconds, not milliseconds.
Here is the output from a debug build of Blender which shows additional text: GHOST: suspicious time-stamp from far in the past
.
Notice wl_keyboard@26.key(11756, 70454, 28, 1)
uses a time-stamp which looks to be in seconds, compared with non IME keyboard events which are for e.g. wl_keyboard@26.key(11755, 70453827, 32, 0)
.
This is a bug as the time-stamp is expected to be monotonic, where negative values represent exceeding the maximum uint32_t value, wrapping back to zero.
--- snip ---
[2161240.385] zwp_text_input_v3@29.preedit_string("ㄴ", 3, 1)
[2161240.389] zwp_text_input_v3@29.done(5)
[2161241.432] wl_display@1.delete_id(55)
[2161241.437] wl_display@1.delete_id(74)
[2161241.439] wl_buffer@73.release()
[2161241.440] wl_callback@74.done(11752)
[2161241.442] -> zwp_linux_dmabuf_v1@48.create_params(new id zwp_linux_buffer_params_v1@74)
[2161241.455] -> zwp_linux_buffer_params_v1@74.add(fd 19, 0, 0, 6656, 33554432, 8395522)
[2161241.458] -> zwp_linux_buffer_params_v1@74.create_immed(new id wl_buffer@55, 1620, 2849, 808669784, 0)
[2161241.460] -> zwp_linux_buffer_params_v1@74.destroy()
[2161241.461] -> wl_surface@36.attach(wl_buffer@55, 0, 0)
[2161241.463] -> wl_surface@36.damage(0, 0, 2147483647, 2147483647)
[2161241.465] -> wl_surface@36.commit()
[2161241.466] -> wl_display@1.sync(new id wl_callback@67)
[2161246.535] wl_display@1.delete_id(74)
[2161246.540] wl_display@1.delete_id(67)
[2161246.541] wl_keyboard@26.key(11753, 70453579, 32, 0)
[2161381.600] zwp_text_input_v3@29.preedit_string(nil, 0, 0)
[2161381.616] zwp_text_input_v3@29.commit_string("ㄴ")
[2161381.621] zwp_text_input_v3@29.preedit_string("ㅇ", 3, 1)
[2161381.625] zwp_text_input_v3@29.done(5)
[2161383.411] -> zwp_text_input_v3@29.set_cursor_rectangle(760, 22, 1, 1)
[2161383.424] -> zwp_text_input_v3@29.commit()
[2161383.554] wl_buffer@75.release()
[2161383.561] wl_callback@67.done(11752)
[2161383.564] wl_buffer@70.release()
[2161383.823] -> wl_surface@36.attach(wl_buffer@70, 0, 0)
[2161383.830] -> wl_surface@36.damage(0, 0, 2147483647, 2147483647)
[2161383.846] -> wl_surface@36.commit()
[2161383.849] -> wl_display@1.sync(new id wl_callback@67)
[2161385.061] wl_display@1.delete_id(67)
[2161385.071] zwp_text_input_v3@29.preedit_string("ㅇ", 3, 1)
[2161385.076] zwp_text_input_v3@29.done(6)
[2161389.240] wl_callback@67.done(11753)
[2161394.834] wl_buffer@55.release()
[2161395.087] -> wl_surface@36.attach(wl_buffer@55, 0, 0)
[2161395.095] -> wl_surface@36.damage(0, 0, 2147483647, 2147483647)
[2161395.098] -> wl_surface@36.commit()
[2161395.101] -> wl_display@1.sync(new id wl_callback@67)
[2161415.370] wl_display@1.delete_id(67)
[2161415.383] wl_keyboard@26.key(11754, 70453747, 31, 0)
[2161494.174] wl_keyboard@26.key(11755, 70453827, 32, 0)
[2161921.478] zwp_text_input_v3@29.preedit_string(nil, 0, 0)
[2161921.491] zwp_text_input_v3@29.commit_string("ㅇ")
[2161921.495] wl_keyboard@26.key(11756, 70454, 28, 1)
[2161921.516] zwp_text_input_v3@29.preedit_string(nil, 0, 0)
[2161921.519] zwp_text_input_v3@29.done(6)
GHOST: suspicious time-stamp from far in the past: 19.55 hours, absolute value is 70454, current time is 70454255, for type 6
[2161921.554] -> wl_surface@22.set_buffer_scale(2)
[2161921.557] -> wl_surface@22.attach(wl_buffer@66, 0, 0)
[2161921.561] -> wl_surface@22.damage(0, 0, 48, 48)
[2161921.564] -> wl_surface@22.commit()
[2161921.566] -> wl_pointer@21.set_cursor(11748, wl_surface@22, 3, 0)
[2161921.578] -> zwp_text_input_v3@29.disable()
[2161921.581] -> zwp_text_input_v3@29.commit()
[2161922.210] -> xdg_toplevel@44.set_title("* (Unsaved) - Blender 4.1 Alpha")
[2161922.225] -> wl_compositor@33.create_region(new id wl_region@74)
[2161922.228] -> wl_region@74.add(0, 0, 1128, 1968)
[2161922.231] -> wl_region@74.subtract(24, 45, 1080, 1899)
[2161922.235] -> wl_surface@50.set_input_region(wl_region@74)
[2161922.237] -> wl_region@74.destroy()
[2161933.672] -> wl_surface@50.attach(wl_buffer@72, 0, 0)
[2161933.700] -> wl_surface@50.set_buffer_scale(2)
[2161933.703] -> wl_surface@50.commit()
[2161933.705] -> wl_surface@50.damage_buffer(0, 0, 2256, 3936)
[2161933.709] -> wl_subsurface@53.set_position(-24, -45)
[2161936.048] -> wl_surface@52.attach(wl_buffer@59, 0, 0)
[2161936.063] -> wl_surface@52.set_buffer_scale(2)
[2161936.066] -> wl_surface@52.commit()
[2161936.069] -> wl_surface@52.damage_buffer(0, 0, 2160, 42)
[2161936.073] -> wl_subsurface@47.set_position(0, -21)
Edited by Campbell Barton