{"record":{"id":"c60e000952eac299","repo":"zed-industries/zed","slug":"failed-to-initialize-event-loop-handling-of-wake-e","errorCode":null,"errorMessage":"Failed to initialize event loop handling of wake events: {err:?}","messagePattern":"Failed to initialize event loop handling of wake events: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_linux/src/linux/x11/client.rs","lineNumber":348,"sourceCode":"\n                            let xcb_connection = client.0.borrow().xcb_connection.clone();\n                            client.process_x11_events(&xcb_connection).log_err();\n                        });\n                    }\n                }\n            })\n            .map_err(|err| {\n                anyhow!(\"Failed to initialize event loop handling of foreground tasks: {err:?}\")\n            })?;\n\n        handle\n            .insert_source(wake_receiver, |event, _, client: &mut X11Client| {\n                if let calloop::channel::Event::Msg(()) = event {\n                    client.0.borrow_mut().common.handle_system_wake();\n                }\n            })\n            .map_err(|err| {\n                anyhow!(\"Failed to initialize event loop handling of wake events: {err:?}\")\n            })?;\n\n        let (xcb_connection, x_root_index) = XCBConnection::connect(None)?;\n        xcb_connection.prefetch_extension_information(xkb::X11_EXTENSION_NAME)?;\n        xcb_connection.prefetch_extension_information(randr::X11_EXTENSION_NAME)?;\n        xcb_connection.prefetch_extension_information(render::X11_EXTENSION_NAME)?;\n        xcb_connection.prefetch_extension_information(xinput::X11_EXTENSION_NAME)?;\n\n        // Announce to X server that XInput up to 2.4 is supported.\n        // Version 2.4 is needed for gesture events (GesturePinchBegin/Update/End).\n        // The server responds with the highest version it supports; if < 2.4,\n        // we must not request gesture event masks in XISelectEvents.\n        let xinput_version = get_reply(\n            || \"XInput XiQueryVersion failed\",\n            xcb_connection.xinput_xi_query_version(2, 4),\n        )?;\n        assert!(\n            xinput_version.major_version >= 2,","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui_linux/src/linux/x11/client.rs#L330-L366","documentation":"Raised in X11Client::new: calloop failed to register the wake channel that the async executor uses to wake the X11 event loop when new work is signalled. Without this source the loop can sleep indefinitely and never dispatch foreground tasks; the {err:?} is calloop's InsertError.","triggerScenarios":"Thrown at crates/gpui_linux/src/linux/x11/client.rs:348 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the calloop InsertError detail (registration/token allocation failure)","Verify the wake_receiver channel is not already consumed or registered elsewhere","Treat as fatal at startup and surface the error before entering the event loop"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}