Conversation
1. Root cause: wallpaper blur service migrated to dde-services as on-demand plugin, D-Bus cold-start delay exceeds greeter 2s timeout 2. Fix: add systemd preheat service to trigger blur generation before display manager starts on first boot, so cache is ready when greeter requests it 3. Impact: only runs on first boot when blur cache dir does not exist, subsequent boots skip via ConditionPathExists Log: Fix first-boot wallpaper blur missing on login screen Influence: 1. Test fresh install first boot shows blurred wallpaper on greeter 2. Test subsequent boots are not delayed by preheat service 3. Verify preheat service skips when blur cache already exists fix: 预生成模糊壁纸缓存修复首次启动壁纸无模糊效果 1. 根因:壁纸模糊服务迁移为 dde-services 按需激活插件后,D-Bus 冷启动延迟超过 greeter 客户端 2 秒超时 2. 方案:新增 systemd 预热服务在显示管理器启动前触发默认壁纸 模糊缓存生成,确保 greeter 请求时缓存已就绪 3. 影响:仅在首次启动(blur 缓存目录不存在)时执行,后续启动 通过 ConditionPathExists 跳过 Log: 修复首次启动登录界面壁纸无模糊效果 Influence: 1. 测试新装系统首次启动登录界面显示模糊壁纸 2. 测试后续启动不受预热服务影响 3. 验证缓存已存在时预热服务正确跳过 PMS: BUG-335593
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 GuideThe PR installs a boot-time systemd preheat service and helper script that invokes the on-demand wallpaper-cache D-Bus API for the default wallpaper before the display manager starts, avoiding the greeter’s first-boot timeout while remaining non-blocking and automatically skipping once the cache exists. Sequence diagram for boot-time wallpaper blur preheatingsequenceDiagram
participant Systemd
participant Preheat as wallpaper-cache-preheat.sh
participant ImageEffect as org.deepin.dde.ImageEffect1
participant Cache
participant Greeter
Systemd->>Systemd: ConditionPathExists[blur cache missing]
Systemd->>Preheat: Start before display manager
Preheat->>ImageEffect: dbus-send ImageEffect1.Get("", default wallpaper)
ImageEffect->>Cache: Generate and store blur cache
ImageEffect-->>Preheat: Get reply
Systemd->>Greeter: Start display manager and greeter
Greeter->>ImageEffect: Get("", default wallpaper)
ImageEffect-->>Greeter: Return cached blur image
alt Blur cache already exists
Systemd-->>Preheat: Skip preheat service
Systemd->>Greeter: Start display manager and greeter
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/plugin-qt/wallpapercache/CMakeLists.txt" line_range="70" />
<code_context>
)
+# Pre-generate blur cache for default wallpaper at boot (avoid first-boot cold-start delay)
+install(PROGRAMS ${MISC_DIR}/wallpaper-cache-preheat.sh DESTINATION ${CMAKE_INSTALL_LIBDIR}/deepin-service-manager/)
+install(FILES ${MISC_DIR}/dde-wallpaper-cache-preheat.service DESTINATION lib/systemd/system/)
</code_context>
<issue_to_address>
**issue (bug_risk):** The preheat unit is installed but never enabled or linked into a systemd target, so its `WantedBy=multi-user.target` install hint is not applied and the service does not run on boot. The first-boot blur cache therefore remains cold and the greeter still hits the original D-Bus timeout.
**Triggers:** On installations that do not provide a separate package preset enabling this unit.
**Suggested fix:** Install an explicit symlink into `multi-user.target.wants`, add a package preset, or otherwise enable the unit during installation.
```suggestion
install(FILES ${MISC_DIR}/dde-wallpaper-cache-preheat.service DESTINATION lib/systemd/system/)
install(CODE [[
file(MAKE_DIRECTORY "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/systemd/system/multi-user.target.wants")
execute_process(
COMMAND "${CMAKE_COMMAND}" -E create_symlink
../dde-wallpaper-cache-preheat.service
"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/systemd/system/multi-user.target.wants/dde-wallpaper-cache-preheat.service"
)
]])
```
</issue_to_address>| ) | ||
| # Pre-generate blur cache for default wallpaper at boot (avoid first-boot cold-start delay) | ||
| install(PROGRAMS ${MISC_DIR}/wallpaper-cache-preheat.sh DESTINATION ${CMAKE_INSTALL_LIBDIR}/deepin-service-manager/) | ||
| install(FILES ${MISC_DIR}/dde-wallpaper-cache-preheat.service DESTINATION lib/systemd/system/) |
There was a problem hiding this comment.
issue (bug_risk): The preheat unit is installed but never enabled or linked into a systemd target, so its WantedBy=multi-user.target install hint is not applied and the service does not run on boot. The first-boot blur cache therefore remains cold and the greeter still hits the original D-Bus timeout.
Triggers: On installations that do not provide a separate package preset enabling this unit.
Suggested fix: Install an explicit symlink into multi-user.target.wants, add a package preset, or otherwise enable the unit during installation.
| install(FILES ${MISC_DIR}/dde-wallpaper-cache-preheat.service DESTINATION lib/systemd/system/) | |
| install(FILES ${MISC_DIR}/dde-wallpaper-cache-preheat.service DESTINATION lib/systemd/system/) | |
| install(CODE [[ | |
| file(MAKE_DIRECTORY "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/systemd/system/multi-user.target.wants") | |
| execute_process( | |
| COMMAND "${CMAKE_COMMAND}" -E create_symlink | |
| ../dde-wallpaper-cache-preheat.service | |
| "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/systemd/system/multi-user.target.wants/dde-wallpaper-cache-preheat.service" | |
| ) | |
| ]]) |
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评分: 25/25 ✓ 通过 评价: 语法正确,逻辑清晰 潜在问题: 建议:
2. 代码质量 ✅评分: 21/25 ✓ 通过 评价: 代码结构清晰,注释完整 潜在问题:
建议:
3. 代码性能 ✅评分: 20/20 ✓ 通过 评价: 性能良好,资源使用合理 潜在问题: 建议:
4. 代码安全 🔒评分: 30/30 ✓ 通过
评价: 存在0个安全漏洞,安全合规 安全漏洞详情: 漏洞对比统计: 新增漏洞 0 个,减少漏洞 0 个,持平 0 个 安全分析:
💡 改进建议代码示例建议 1:使用 configure_file() 模板化 service 文件路径 在 CMakeLists.txt 中添加: # 使用 configure_file 生成 service 文件,确保路径一致
configure_file(
${MISC_DIR}/dde-wallpaper-cache-preheat.service.in
${CMAKE_CURRENT_BINARY_DIR}/dde-wallpaper-cache-preheat.service
@ONLY
)
install(PROGRAMS ${MISC_DIR}/wallpaper-cache-preheat.sh
DESTINATION ${CMAKE_INSTALL_LIBDIR}/deepin-service-manager/
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dde-wallpaper-cache-preheat.service
DESTINATION lib/systemd/system/
)对应的 service 模板文件 [Unit]
Description=Pre-generate wallpaper blur cache for default wallpaper
Documentation=https://pms.uniontech.com/bug-view-335593.html
After=dbus.service
Before=display-manager.service
ConditionPathExists=/usr/share/backgrounds/default_background.jpg
ConditionPathExists=!/var/cache/dde-wallpaper-cache/blur
[Service]
Type=oneshot
ExecStart=@CMAKE_INSTALL_FULL_LIBDIR@/deepin-service-manager/wallpaper-cache-preheat.sh
TimeoutStartSec=60
RemainAfterExit=no
NoNewPrivileges=true
ProtectSystem=strict
PrivateTmp=true
ReadWritePaths=/var/cache/dde-wallpaper-cache
[Install]
WantedBy=multi-user.target📋 修改文件清单
📈 评分汇总
本报告由 AI 代码审查工具自动生成 |
fix: pre-generate blur cache to fix first-boot wallpaper issue
on-demand plugin, D-Bus cold-start delay exceeds greeter 2s timeout
display manager starts on first boot, so cache is ready when greeter
requests it
subsequent boots skip via ConditionPathExists
Log: Fix first-boot wallpaper blur missing on login screen
Influence:
fix: 预生成模糊壁纸缓存修复首次启动壁纸无模糊效果
冷启动延迟超过 greeter 客户端 2 秒超时
模糊缓存生成,确保 greeter 请求时缓存已就绪
通过 ConditionPathExists 跳过
Log: 修复首次启动登录界面壁纸无模糊效果
Influence:
PMS: BUG-335593
Summary by Sourcery
Pre-generate the default wallpaper blur cache during first boot so the greeter can display the blurred wallpaper without a cold-start timeout.
Bug Fixes:
Enhancements:
Build: