fix: stabilize Treeland VT session switching#94
Conversation
There was a problem hiding this comment.
Sorry @zccrs, your pull request is larger than the review limit of 150000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1dcc5df to
fec0370
Compare
Depend on dde-seatd.service from the dde-seatd package and point Treeland at /run/dde-seatd.sock. This keeps DDM from installing its own seatd service while preserving the product runtime wiring.
fec0370 to
235d3d6
Compare
Connect DDM to the dde-seatd control socket and register Treeland user VTs with the compositor owner pidfd. This keeps DDM focused on session policy while dde-seatd owns grouped VT switching and seat client lifetime.
235d3d6 to
64abec6
Compare
There was a problem hiding this comment.
Pull request overview
Stabilizes Treeland VT session switching by integrating an external dde-seatd control socket for grouped-VT allocation/events, running Treeland PAM sessions in a separate helper process to preserve the kernel keyring, and reworking VT management (managed/unmanaged switching, new activateVt helper) to remove the previous wl_callback-based render handshake.
Changes:
- Replace the in-process VT release/acquire handshake with a control protocol over
/run/dde-seatd-control.sock, including new request/event opcodes and async event handling inTreelandConnector. - Refactor
UserSession::childModifierto be side-effect-isolated (no Qt allocations after fork) and addUserSession::startDirectso the session leader can fork/exec the Treeland session directly from the PAM helper process. - Add a
--session-helpermode of the ddm binary plus serializable request/response plumbing inAuth, switch systemd units to requiredde-seatd.service, and bookkeeping changes inDisplay::loginfor the new grouped-VT lifecycle.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/daemon/VirtualTerminal.h | Declare new activateVt helper. |
| src/daemon/VirtualTerminal.cpp | Implement activateVt; guard signal connection against duplicates. |
| src/daemon/UserSession.h | Add startDirect, child context fields, prepareChildContext. |
| src/daemon/UserSession.cpp | Cache child context pre-fork; reimplement childModifier with async-signal-safe primitives; add startDirect. |
| src/daemon/TreelandDisplayServer.cpp | Check D-Bus reply when starting treeland.service. |
| src/daemon/TreelandConnector.h | New control-socket members and grouped-VT API. |
| src/daemon/TreelandConnector.cpp | Replace VT signal handshake with dde-seatd control protocol; add create/destroy grouped VT, event handling. |
| src/daemon/SocketServer.cpp | Fall back to serverName() when fullServerName() is empty. |
| src/daemon/Display.cpp | Allocate per-user VT, manage auth list early, destroy grouped VT on failure, tweak unlock VT switch. |
| src/daemon/DaemonApp.cpp | Dispatch --session-helper to runSessionHelper. |
| src/daemon/Auth.h | Declare runSessionHelper and helper-process entry. |
| src/daemon/Auth.cpp | Add session-helper subprocess with serialized request/response and lifecycle FD; route Treeland sessions through helper. |
| src/common/SignalHandler.cpp | Unblock added custom signals after installing the handler. |
| services/treeland-dde-seatd.conf.in | New drop-in pointing Treeland at the dde-seatd socket. |
| services/ddm.service.in | Require dde-seatd.service instead of seatd.service. |
| services/CMakeLists.txt | Install the new Treeland drop-in. |
| debian/control | Switch packaging dependency to dde-seatd. |
Route Treeland-owned VT events back to the greeter or user session. 将Treeland管理的VT事件路由回greeter或用户会话。 Log: 完善Treeland VT激活处理 Influence: DDM根据dde-seatd的VT激活事件恢复Treeland渲染和greeter状态,便于定位tty切换问题。
ab14efa to
b611e69
Compare
deepin pr auto review这是一次非常庞大且核心的改动,主要涉及将显示管理器 (ddm) 与 seatd 的集成方式从原生 以下是对该 diff 的详细代码审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面: 一、 语法与逻辑
二、 代码质量
三、 代码性能
四、 代码安全
总结这次重构整体质量很高,特别是引入 Helper 进程来隔离 PAM 和 Session 启动逻辑,以及使用 必须修改的关键点:
|
Summary
Validation
Related