{"record":{"id":"9f0462dd23f7edce","repo":"slint-ui/slint","slug":"seat-deactivation-is-not-implemented","errorCode":null,"errorMessage":"Seat deactivation is not implemented","messagePattern":"Seat deactivation is not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backends/linuxkms/calloop_backend.rs","lineNumber":134,"sourceCode":"                );\n                crate::renderer::try_skia_then_femtovg_then_software\n            }\n        };\n\n        #[cfg(feature = \"libseat\")]\n        let seat_active = Rc::new(RefCell::new(false));\n\n        //libseat::set_log_level(libseat::LogLevel::Debug);\n\n        #[cfg(feature = \"libseat\")]\n        let mut seat = {\n            let seat_active = seat_active.clone();\n            libseat::Seat::open(move |_seat, event| match event {\n                libseat::SeatEvent::Enable => {\n                    *seat_active.borrow_mut() = true;\n                }\n                libseat::SeatEvent::Disable => {\n                    unimplemented!(\"Seat deactivation is not implemented\");\n                }\n            })\n            .map_err(|e| format!(\"Error opening session with libseat: {e}\"))?\n        };\n\n        #[cfg(feature = \"libseat\")]\n        while !(*seat_active.borrow()) {\n            if seat.dispatch(5000).map_err(|e| format!(\"Error waiting for seat activation: {e}\"))?\n                == 0\n            {\n                return Err(\"Timeout while waiting to activate session\".to_string().into());\n            }\n        }\n\n        Ok(Backend {\n            context: Default::default(),\n            #[cfg(feature = \"libseat\")]\n            seat: Rc::new(RefCell::new(seat)),","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/internal/backends/linuxkms/calloop_backend.rs#L116-L152","documentation":"The linuxkms backend's libseat integration raises this unimplemented!() when the seat is deactivated (libseat SeatEvent::Disable). Slint's DRM backend does not yet support losing the seat, so it aborts rather than rendering to a device it no longer controls.","triggerScenarios":"While a Slint app runs on Linux KMS/DRM via libseat, the session/seat is deactivated — e.g. VT switch away, another session taking the seat, or a session manager pausing the seat.","commonSituations":"User presses Ctrl+Alt+F2 to switch VTs while a kiosk app runs; systemd-logind hands the seat to another session; fast user switching on an embedded Linux panel.","solutions":["Avoid VT/seat switching while the Slint KMS app is running (lock the kiosk session)","Run the app in a dedicated single-session environment (kiosk autologin without switching)","Patch the backend to handle SeatEvent::Disable (pause rendering and release DRM devices) or subscribe to pause/resume events"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// before starting the backend, ensure the session won't switch:\n// run under logind with the seat locked, or check current VT is the active one\nif !is_active_vt() { eprintln!(\"refusing to start: seat may be deactivated\"); exit(1); }","typeGuard":null,"tryCatchPattern":"// unimplemented! aborts the process; supervise and restart the UI service\n// systemd: Restart=on-failure so a VT-switch abort relaunches when the seat returns\n[Service]\nRestart=on-failure","preventionTips":["Deploy kiosk apps in single-session environments with VT switching disabled","Add systemd Restart=on-failure to recover from the abort after a seat switch","Contribute/patch handling of libseat SeatEvent::Disable (release DRM, pause rendering)"],"tags":["linuxkms","drm","libseat","unimplemented","panic"],"backgroundTag":"unsupported-operation","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}