{"record":{"id":"f00c631017c58b3d","repo":"zed-industries/zed","slug":"failed-to-initialize-xdp-event-source-err","errorCode":null,"errorMessage":"Failed to initialize XDP event source: {err:?}","messagePattern":"Failed to initialize XDP event source: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_linux/src/linux/x11/client.rs","lineNumber":526,"sourceCode":"                        for window in client.0.borrow_mut().windows.values_mut() {\n                            window.window.set_appearance(appearance);\n                        }\n                    }\n                    XDPEvent::ButtonLayout(layout_str) => {\n                        let layout = WindowButtonLayout::parse(&layout_str)\n                            .log_err()\n                            .unwrap_or_else(WindowButtonLayout::linux_default);\n                        client.with_common(|common| common.button_layout = layout);\n                        for window in client.0.borrow_mut().windows.values_mut() {\n                            window.window.set_button_layout();\n                        }\n                    }\n                    XDPEvent::CursorTheme(_) | XDPEvent::CursorSize(_) => {\n                        // noop, X11 manages this for us.\n                    }\n                }\n            })\n            .map_err(|err| anyhow!(\"Failed to initialize XDP event source: {err:?}\"))?;\n\n        xcb_flush(&xcb_connection);\n\n        Ok(X11Client(Rc::new(RefCell::new(X11ClientState {\n            modifiers: Modifiers::default(),\n            capslock: Capslock::default(),\n            last_modifiers_changed_event: Modifiers::default(),\n            last_capslock_changed_event: Capslock::default(),\n            event_loop: Some(event_loop),\n            loop_handle: handle,\n            common,\n            last_click: Instant::now(),\n            last_mouse_button: None,\n            last_location: Point::new(px(0.0), px(0.0)),\n            current_count: 0,\n            pinch_scale: 1.0,\n            gpu_context: Rc::new(RefCell::new(None)),\n            compositor_gpu,","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_linux/src/linux/x11/client.rs#L508-L544","documentation":"Raised in X11Client::new: calloop failed to register the xdg-desktop-portal event source (appearance changes, button layout) with the event loop. {err:?} is the calloop InsertError; the client would otherwise miss theme and decoration updates.","triggerScenarios":"Thrown at crates/gpui_linux/src/linux/x11/client.rs:511 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the InsertError from inserting the XDP channel source","Ensure the XDP event channel is created once and its receiver not moved or dropped before registration","Consider making XDP optional: log and continue without desktop-portal integration if registration fails"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}