Repository navigation
Conversation
1. The session D-Bus file declared SystemdService=org.deepin.dde.Power1.service, but dde-services never shipped that unit, so journald showed "Unit ... not found" and "read SleepLock property failed" from dde-lock. 2. After making the unit available, dde-lock's synchronous SleepLock call started a dedicated dsm instance whose power plugin synchronously introspected LockFront1/ShutdownFront1 exported by dde-lock, causing a 25s mutual wait: the desktop appeared first and the lock screen came back about 20s later. 3. Activate Power1 through deepin-service-manager's shared plugin template and drop the unused dedicated unit, matching the system-level service. 4. Replace the three front DDBusInterface proxies with raw QDBusMessage calls (async commands, 1s bounded ShowAuth) so power plugin startup no longer resolves or introspects dde-lock services. 5. Add a private-bus regression test whose fixture exports the front services without dispatching, asserting power proxy calls do not block. Log: Fix Power1 activation and dde-lock power startup deadlock. Influence: 1. Reboot and check `journalctl -fp err`: no "Unit org.deepin.dde.Power1.service not found" or "read SleepLock property failed". 2. Verify auto-login shows the lock screen immediately, not the desktop for about 20 seconds and then the login UI. 3. Verify lock/unlock, suspend/resume, hibernate and shutdown still work; run ctest power-lockfront-proxy and power-screensaver-proxy. 4. Check `systemctl --user list-units | grep Power1` shows deepin-service-plugin@org.deepin.dde.Power1.service. fix: 修正 Power1 激活方式并修复启动死锁 1. session 的 D-Bus 文件声明 SystemdService=org.deepin.dde.Power1.service,但 dde-services 从未 安装该 unit,导致 journal 出现 "Unit ... not found" 以及 dde-lock 的 "read SleepLock property failed"。 2. 补上 unit 后,dde-lock 同步读取 SleepLock 会拉起独立 dsm 实例;其 power 插件在初始化时同步 introspect dde-lock 导出的 LockFront1/ShutdownFront1,双方互等 25s,桌面先显示、锁屏约 20s 后才出现,表现为"自动回到登录界面"。 3. 改用 deepin-service-manager 的共享插件模板激活 Power1,删除未使用 的专用 unit,与系统级服务保持一致。 4. 把三个前端 DDBusInterface 改为原生 QDBusMessage 调用(命令异步、 ShowAuth 最多等 1s),使 power 插件启动时不再解析/introspect dde-lock 的服务。 5. 新增私有总线回归测试:fixture 导出前端服务但不处理消息,断言 power 代理调用不再阻塞。 Log: 修复 Power1 激活方式以及 dde-lock 与电源服务的启动死锁。 Influence: 1. 重启后检查 `journalctl -fp err`,不再出现 "Unit org.deepin.dde.Power1.service not found" 和 "read SleepLock property failed"。 2. 验证自动登录后锁屏立即出现,不再先显示桌面约 20s 再回到登录界面。 3. 验证锁屏/解锁、待机/唤醒、休眠、关机均正常;运行 power-lockfront-proxy 和 power-screensaver-proxy 两个 ctest。 4. 检查 `systemctl --user list-units | grep Power1` 显示 deepin-service-plugin@org.deepin.dde.Power1.service。 PMS: BUG-351573
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR fixes Power1 activation by using the shared service-manager plugin template and removes the startup deadlock by replacing front-end D-Bus interface proxies—which synchronously introspect dde-lock services—with raw message calls, asynchronous commands, and a one-second ShowAuth timeout. Sequence diagram for non-blocking Power1 front-end callssequenceDiagram
participant Power as PowerPlugin
participant Proxy as SessionDBusProxy
participant Bus as SessionBus
participant Front as dde-lock FrontServices
Power->>Proxy: requestSuspendByFront()
Proxy->>Bus: asyncCall(Suspend)
Bus-->>Proxy: queued
Power->>Proxy: showLockAuth(autoStart)
Proxy->>Bus: call(ShowAuth, Block, 1000)
Bus-->>Proxy: reply or timeout
Power->>Proxy: setBlackScreenActive(active)
Proxy->>Bus: asyncCall(setActive)
Bus-->>Proxy: queued
Note over Proxy,Front: Raw QDBusMessage calls avoid blocking introspection
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: ['无需修改,语法逻辑正确'] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: ['建议将 requestSuspendByFront/requestHibernateByFront/requestShutdownByFront 提取为带方法名参数的辅助函数,例如:void SessionDBusProxy::callShutdownFrontMethod(const QString &method) { QDBusConnection::sessionBus().asyncCall(QDBusMessage::createMethodCall(kShutdownFront, kShutdownPath, kShutdownFront, method)); }'] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: ['无需修改,性能表现良好'] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: ['无需修改,无安全风险'] 💡 改进建议代码示例// 建议提取公共辅助函数,减少三个方法中的代码重复:
void SessionDBusProxy::callShutdownFrontMethod(const QString &method)
{
QDBusConnection::sessionBus().asyncCall(QDBusMessage::createMethodCall(
kShutdownFront, kShutdownPath, kShutdownFront, method));
}
void SessionDBusProxy::requestSuspendByFront()
{
callShutdownFrontMethod(QStringLiteral("Suspend"));
}
void SessionDBusProxy::requestHibernateByFront()
{
callShutdownFrontMethod(QStringLiteral("Hibernate"));
}
void SessionDBusProxy::requestShutdownByFront()
{
callShutdownFrontMethod(QStringLiteral("Shutdown"));
}本报告由 AI 代码审查工具自动生成 |
Log: Fix Power1 activation and dde-lock power startup deadlock.
Influence:
journalctl -fp err: no "Unit org.deepin.dde.Power1.service not found" or "read SleepLock property failed".systemctl --user list-units | grep Power1shows deepin-service-plugin@org.deepin.dde.Power1.service.fix: 修正 Power1 激活方式并修复启动死锁
Log: 修复 Power1 激活方式以及 dde-lock 与电源服务的启动死锁。
Influence:
journalctl -fp err,不再出现 "Unit org.deepin.dde.Power1.service not found" 和 "read SleepLock property failed"。systemctl --user list-units | grep Power1显示 deepin-service-plugin@org.deepin.dde.Power1.service。PMS: BUG-351573
Summary by Sourcery
Activate the session Power1 service consistently and eliminate the startup deadlock between the power plugin and dde-lock front ends.
Bug Fixes:
Enhancements:
Tests:
Chores: