Skip to content

Anvil aborts when window is maximized in WSL2 #1832

@flxzt

Description

@flxzt

I am trying to run niri inside WSL2, which first seemed to work really well, but using it on a certain monitor (1920x1200x60.000) it crashes occasionally when I try to fullscreen or resize the niri window.
Curiously, when I first maximize the window on a different monitor (1920x1080x60.000) and then on the problematic monitor, it works.
It seems to be a problem originating from smithay and can be reproduced with anvil.
If you need any other information let me know. :)

log
felixz@hostname anvil $ RUST_BACKTRACE=1 RUST_LOG=debug ../target/debug/anvil --winit
2025-09-22T09:14:41.144065Z  INFO anvil: Starting anvil with winit backend
2025-09-22T09:14:41.157219Z  INFO backend_winit: smithay::backend::winit: Initializing a winit backend
2025-09-22T09:14:41.167142Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: Bound new global [11] wl_output v3
2025-09-22T09:14:41.167234Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: Bound new global [21] wl_output v3
2025-09-22T09:14:41.168001Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: Bound new global [4] zxdg_output_manager_v1 v2
2025-09-22T09:14:41.169579Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: Bound new global [19] wl_seat v7
2025-09-22T09:14:41.175804Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: supported wl_shm format Argb8888
2025-09-22T09:14:41.175858Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: supported wl_shm format Xrgb8888
2025-09-22T09:14:41.175892Z DEBUG backend_winit:winit::EventLoopBuilder::build: sctk: supported wl_shm format Rgb565
2025-09-22T09:14:41.184733Z DEBUG backend_winit: smithay::backend::winit: Window created window=98200385074704
2025-09-22T09:14:41.225186Z DEBUG backend_winit: smithay::backend::egl::display: Supported EGL client extensions: ["EGL_EXT_device_base", "EGL_EXT_device_enumeration", "EGL_EXT_device_query", "EGL_EXT_platform_base", "EGL_KHR_client_get_all_proc_addresses", "EGL_EXT_client_extensions", "EGL_KHR_debug", "EGL_EXT_platform_device", "EGL_EXT_explicit_device", "EGL_EXT_platform_wayland", "EGL_KHR_platform_wayland", "EGL_EXT_platform_x11", "EGL_KHR_platform_x11", "EGL_EXT_platform_xcb", "EGL_MESA_platform_gbm", "EGL_KHR_platform_gbm", "EGL_MESA_platform_surfaceless"] window=98200385074704
2025-09-22T09:14:41.225526Z DEBUG backend_winit: smithay::backend::egl::display: Trying EGL platform: PLATFORM_WAYLAND_KHR window=98200385074704
2025-09-22T09:14:41.225644Z  INFO backend_winit: smithay::backend::egl::display: Successfully selected EGL platform: PLATFORM_WAYLAND_KHR window=98200385074704
2025-09-22T09:14:41.234549Z  INFO backend_winit: smithay::backend::egl::display: EGL Initialized window=98200385074704
2025-09-22T09:14:41.234633Z  INFO backend_winit: smithay::backend::egl::display: EGL Version: (1, 5) window=98200385074704
2025-09-22T09:14:41.234712Z  INFO backend_winit: smithay::backend::egl::display: Supported EGL display extensions: ["EGL_ANDROID_blob_cache", "EGL_EXT_buffer_age", "EGL_EXT_config_select_group", "EGL_EXT_create_context_robustness", "EGL_EXT_image_dma_buf_import", "EGL_EXT_image_dma_buf_import_modifiers", "EGL_EXT_present_opaque", "EGL_EXT_query_reset_notification_strategy", "EGL_EXT_surface_compression", "EGL_EXT_swap_buffers_with_damage", "EGL_KHR_cl_event2", "EGL_KHR_config_attribs", "EGL_KHR_context_flush_control", "EGL_KHR_create_context", "EGL_KHR_create_context_no_error", "EGL_KHR_fence_sync", "EGL_KHR_get_all_proc_addresses", "EGL_KHR_gl_colorspace", "EGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_cubemap_image", "EGL_KHR_image_base", "EGL_KHR_no_config_context", "EGL_KHR_reusable_sync", "EGL_KHR_surfaceless_context", "EGL_KHR_swap_buffers_with_damage", "EGL_EXT_pixel_format_float", "EGL_KHR_wait_sync", "EGL_MESA_configless_context", "EGL_MESA_gl_interop", "EGL_MESA_query_driver", "EGL_MESA_x11_native_visual_id", ""] window=98200385074704
2025-09-22T09:14:41.235639Z  INFO backend_winit:egl:egl_context: smithay::backend::egl::display: Selected color format: PixelFormat { hardware_accelerated: true, color_bits: 24, alpha_bits: 8, depth_bits: 24, stencil_bits: 8, stereoscopy: false, multisampling: None, srgb: false } window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5)
2025-09-22T09:14:41.264475Z  INFO backend_winit:egl:egl_context: smithay::backend::egl::context: EGL context created priority=None window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.264581Z DEBUG backend_winit: smithay::backend::winit: Winit backend: Wayland window=98200385074704
2025-09-22T09:14:41.267068Z DEBUG backend_winit: smithay::backend::renderer::gles: Instancing is supported window=98200385074704
2025-09-22T09:14:41.267118Z DEBUG backend_winit: smithay::backend::renderer::gles: Rgba8 Renderbuffers are supported window=98200385074704
2025-09-22T09:14:41.267135Z DEBUG backend_winit: smithay::backend::renderer::gles: Blitting is supported window=98200385074704
2025-09-22T09:14:41.267155Z DEBUG backend_winit: smithay::backend::renderer::gles: 10-bit formats are supported window=98200385074704
2025-09-22T09:14:41.267181Z DEBUG backend_winit: smithay::backend::renderer::gles: Fencing is supported window=98200385074704
2025-09-22T09:14:41.267210Z DEBUG backend_winit: smithay::backend::renderer::gles: EGL Fencing is supported window=98200385074704
2025-09-22T09:14:41.267238Z DEBUG backend_winit: smithay::backend::renderer::gles: GL Debug is supported window=98200385074704
2025-09-22T09:14:41.267422Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: Instancing is supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267455Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: Rgba8 Renderbuffers are supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267485Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: Blitting is supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267514Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: 10-bit formats are supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267546Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: Fencing is supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267568Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: EGL Fencing is supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267593Z DEBUG backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: GL Debug is supported window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267768Z  INFO backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: Initializing OpenGL ES Renderer window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267805Z  INFO backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: GL Version: "OpenGL ES 3.2 Mesa 25.1.9" window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267840Z  INFO backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: GL Vendor: "Mesa" window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267872Z  INFO backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: GL Renderer: "llvmpipe (LLVM 20.1.8, 256 bits)" window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.267934Z  INFO backend_winit:egl:egl_context:renderer_gles2: smithay::backend::renderer::gles: Supported GL Extensions: ["GL_EXT_blend_minmax", "GL_EXT_multi_draw_arrays", "GL_EXT_texture_filter_anisotropic", "GL_EXT_texture_compression_s3tc", "GL_EXT_texture_compression_dxt1", "GL_EXT_texture_compression_rgtc", "GL_EXT_texture_format_BGRA8888", "GL_OES_compressed_ETC1_RGB8_texture", "GL_OES_depth24", "GL_OES_element_index_uint", "GL_OES_fbo_render_mipmap", "GL_OES_mapbuffer", "GL_OES_rgb8_rgba8", "GL_OES_standard_derivatives", "GL_OES_stencil8", "GL_OES_texture_3D", "GL_OES_texture_float", "GL_OES_texture_float_linear", "GL_OES_texture_half_float", "GL_OES_texture_half_float_linear", "GL_OES_texture_npot", "GL_OES_vertex_half_float", "GL_EXT_draw_instanced", "GL_EXT_texture_sRGB_decode", "GL_OES_EGL_image", "GL_OES_depth_texture", "GL_OES_packed_depth_stencil", "GL_EXT_texture_type_2_10_10_10_REV", "GL_NV_conditional_render", "GL_OES_get_program_binary", "GL_APPLE_texture_max_level", "GL_EXT_discard_framebuffer", "GL_EXT_read_format_bgra", "GL_EXT_texture_storage", "GL_NV_pack_subimage", "GL_NV_texture_barrier", "GL_EXT_frag_depth", "GL_NV_fbo_color_attachments", "GL_OES_EGL_image_external", "GL_OES_EGL_sync", "GL_OES_vertex_array_object", "GL_OES_viewport_array", "GL_ANGLE_pack_reverse_row_order", "GL_ANGLE_texture_compression_dxt3", "GL_ANGLE_texture_compression_dxt5", "GL_EXT_occlusion_query_boolean", "GL_EXT_robustness", "GL_EXT_texture_rg", "GL_EXT_unpack_subimage", "GL_NV_draw_buffers", "GL_NV_read_buffer", "GL_NV_read_depth", "GL_NV_read_depth_stencil", "GL_NV_read_stencil", "GL_APPLE_sync", "GL_EXT_draw_buffers", "GL_EXT_instanced_arrays", "GL_EXT_map_buffer_range", "GL_EXT_shadow_samplers", "GL_KHR_debug", "GL_KHR_robustness", "GL_KHR_texture_compression_astc_ldr", "GL_NV_generate_mipmap_sRGB", "GL_NV_pixel_buffer_object", "GL_OES_depth_texture_cube_map", "GL_OES_required_internalformat", "GL_OES_surfaceless_context", "GL_EXT_color_buffer_float", "GL_EXT_debug_label", "GL_EXT_sRGB_write_control", "GL_EXT_separate_shader_objects", "GL_EXT_shader_framebuffer_fetch", "GL_EXT_shader_group_vote", "GL_EXT_shader_implicit_conversions", "GL_EXT_shader_integer_mix", "GL_EXT_tessellation_point_size", "GL_EXT_tessellation_shader", "GL_ANDROID_extension_pack_es31a", "GL_ARM_shader_framebuffer_fetch_depth_stencil", "GL_EXT_base_instance", "GL_EXT_compressed_ETC1_RGB8_sub_texture", "GL_EXT_copy_image", "GL_EXT_draw_buffers_indexed", "GL_EXT_draw_elements_base_vertex", "GL_EXT_gpu_shader5", "GL_EXT_multi_draw_indirect", "GL_EXT_polygon_offset_clamp", "GL_EXT_primitive_bounding_box", "GL_EXT_render_snorm", "GL_EXT_shader_io_blocks", "GL_EXT_texture_border_clamp", "GL_EXT_texture_buffer", "GL_EXT_texture_cube_map_array", "GL_EXT_texture_norm16", "GL_EXT_texture_view", "GL_KHR_blend_equation_advanced", "GL_KHR_blend_equation_advanced_coherent", "GL_KHR_context_flush_control", "GL_KHR_robust_buffer_access_behavior", "GL_NV_image_formats", "GL_NV_shader_noperspective_interpolation", "GL_OES_copy_image", "GL_OES_draw_buffers_indexed", "GL_OES_draw_elements_base_vertex", "GL_OES_gpu_shader5", "GL_OES_primitive_bounding_box", "GL_OES_sample_shading", "GL_OES_sample_variables", "GL_OES_shader_io_blocks", "GL_OES_shader_multisample_interpolation", "GL_OES_tessellation_point_size", "GL_OES_tessellation_shader", "GL_OES_texture_border_clamp", "GL_OES_texture_buffer", "GL_OES_texture_cube_map_array", "GL_OES_texture_stencil8", "GL_OES_texture_storage_multisample_2d_array", "GL_OES_texture_view", "GL_EXT_blend_func_extended", "GL_EXT_buffer_storage", "GL_EXT_float_blend", "GL_EXT_geometry_point_size", "GL_EXT_geometry_shader", "GL_EXT_texture_filter_minmax", "GL_EXT_texture_sRGB_R8", "GL_EXT_texture_sRGB_RG8", "GL_KHR_no_error", "GL_KHR_texture_compression_astc_sliced_3d", "GL_OES_EGL_image_external_essl3", "GL_OES_geometry_point_size", "GL_OES_geometry_shader", "GL_OES_shader_image_atomic", "GL_EXT_clear_texture", "GL_EXT_clip_cull_distance", "GL_EXT_conservative_depth", "GL_EXT_disjoint_timer_query", "GL_EXT_texture_compression_s3tc_srgb", "GL_MESA_shader_integer_functions", "GL_EXT_clip_control", "GL_EXT_color_buffer_half_float", "GL_EXT_memory_object", "GL_EXT_memory_object_fd", "GL_EXT_texture_compression_bptc", "GL_EXT_texture_mirror_clamp_to_edge", "GL_KHR_parallel_shader_compile", "GL_NV_alpha_to_coverage_dither_control", "GL_EXT_EGL_image_storage", "GL_EXT_shader_framebuffer_fetch_non_coherent", "GL_EXT_texture_shadow_lod", "GL_MESA_framebuffer_flip_y", "GL_OVR_multiview", "GL_OVR_multiview2", "GL_EXT_depth_clamp", "GL_EXT_texture_query_lod", "GL_MESA_sampler_objects", "GL_EXT_EGL_image_storage_compression", "GL_EXT_texture_storage_compression", "GL_MESA_bgra", ""] window=98200385074704 platform="PLATFORM_WAYLAND_KHR" version=(1, 5) ptr=98200385952352
2025-09-22T09:14:41.284883Z  INFO new: smithay::output: Creating new Output name="winit" name="winit" physical=PhysicalProperties { size: Size<smithay::utils::geometry::Raw> { w: 0, h: 0 }, subpixel: Unknown, make: "Smithay", model: "Winit", serial_number: "Unknown" }
2025-09-22T09:14:41.284966Z  INFO smithay::wayland::output: Creating new wl_output output="winit"
2025-09-22T09:14:41.286245Z  WARN smithay::backend::egl::error: Erroneous EGL call didn't set EGLError
2025-09-22T09:14:41.286290Z  WARN anvil::winit: failed to egl device for display, dmabuf will use v3 err=EglExtensionNotSupported(["EGL_EXT_device_drm"])
2025-09-22T09:14:41.290133Z  INFO smithay::wayland::socket: Created new socket name=Some("wayland-1")
2025-09-22T09:14:41.290480Z  INFO anvil::state: Listening on wayland socket name="wayland-1"
2025-09-22T09:14:41.292815Z  INFO input_seat:add_keyboard:input_keyboard: smithay::input::keyboard: Initializing a xkbcommon handler with keymap query name="winit" xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25
2025-09-22T09:14:41.301173Z  INFO input_seat:add_keyboard:input_keyboard: smithay::input::keyboard: Loaded Keymap name="English (US)" name="winit" xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25
2025-09-22T09:14:41.302702Z DEBUG desktop_space: smithay::desktop::space: Mapping output at Point<smithay::utils::geometry::Logical> { x: 0, y: 0 } output="winit" id=0
2025-09-22T09:14:41.303155Z DEBUG smithay::xwayland::x11_sockets: Attempting to aquire an X11 display lock display=0
2025-09-22T09:14:41.303213Z DEBUG smithay::xwayland::x11_sockets: Failed to acquire lock display=0
2025-09-22T09:14:41.303276Z DEBUG smithay::xwayland::x11_sockets: Lock was blocked by a defunct X11 server, trying again display=0
2025-09-22T09:14:41.303299Z DEBUG smithay::xwayland::x11_sockets: Attempting to aquire an X11 display lock display=0
2025-09-22T09:14:41.303348Z DEBUG smithay::xwayland::x11_sockets: X11 lock acquired display=0
2025-09-22T09:14:41.303520Z  INFO smithay::xwayland::xserver: spawning XWayland instance
2025-09-22T09:14:41.307264Z  INFO anvil::winit: Initialization completed, starting the main loop.
2025-09-22T09:14:41.309077Z ERROR smithay::backend::egl::ffi: [EGL] 0x300d (BAD_SURFACE) eglQuerySurface: eglQuerySurface
2025-09-22T09:14:41.309112Z DEBUG smithay::backend::egl::surface: Failed to query buffer age value for surface EGLSurface { display: EGLDisplayHandle { handle: 0x59500f1d9ee0, should_terminate: true, _native: Any { .. } }, surface: 0x595010dba550, config_id: 0x59500f1dfa00, pixel_format: PixelFormat { hardware_accelerated: true, color_bits: 24, alpha_bits: 8, depth_bits: 24, stencil_bits: 8, stereoscopy: false, multisampling: None, srgb: false } }: An EGLSurface argument does not name a valid surface (window, pixel buffer or pixmap) configured for GL rendering.
2025-09-22T09:14:41.399464Z DEBUG xwayland_wm: smithay::xwayland::xwm: Created WM Window window=2097154 id=0
2025-09-22T09:14:41.399537Z DEBUG xwayland_wm: smithay::xwayland::xwm::settings: Created XSettings window window=2097155 id=0
2025-09-22T09:14:41.399926Z DEBUG xwayland_wm: smithay::xwayland::xwm: Selection init selection_window=2097156 selection=Clipboard atom=283 id=0
2025-09-22T09:14:41.399992Z DEBUG xwayland_wm: smithay::xwayland::xwm: Selection init selection_window=2097157 selection=Primary atom=1 id=0
2025-09-22T09:14:41.405050Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=CreateNotify(CreateNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405139Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=PropertyNotify(PropertyNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405220Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=PropertyNotify(PropertyNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405311Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=PropertyNotify(PropertyNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405350Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=PropertyNotify(PropertyNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405390Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=PropertyNotify(PropertyNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405675Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=CreateNotify(CreateNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405718Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=CreateNotify(CreateNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.405752Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=CreateNotify(CreateNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.411469Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=MappingNotify(MappingNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:41.411540Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=MappingNotify(MappingNotifyEvent { .. }) should_ignore=false id=0
2025-09-22T09:14:43.084720Z DEBUG xwayland_wm: smithay::xwayland::xwm: Got X11 event event=RandrNotify(NotifyEvent { .. }) should_ignore=false id=0
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)
Io error: Connection reset by peer (os error 104)

System Information

  • smithay/anvil commit: 9ccbd35

  • Distro: Fedora 42 in WSL2

  • GPU: Intel Arc 8-Core iGPU

  • CPU: Intel(R) Core(TM) Ultra 7 165H (3.80 GHz)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions