Skip to content

fix(systemd): delay startup after XSettings1 service for xsettings#220

Open
Shining-N wants to merge 1 commit into
linuxdeepin:masterfrom
Shining-N:master
Open

fix(systemd): delay startup after XSettings1 service for xsettings#220
Shining-N wants to merge 1 commit into
linuxdeepin:masterfrom
Shining-N:master

Conversation

@Shining-N

@Shining-N Shining-N commented Jul 14, 2026

Copy link
Copy Markdown

Add After=org.deepin.dde.XSettings1.service to ensure the service starts after XSettings1 reads the latest xsettings values.

添加 After=org.deepin.dde.XSettings1.service,确保在 XSettings1 读取最新的 xsettings 数值后启动,以获取正确的配置值。

Log: 调整服务启动顺序,在 XSettings1 后启动
PMS: BUG-349621
Influence: 影响 dde-session 启动顺序

Summary by Sourcery

Deployment:

  • Ensure the dde-session@x11 systemd unit starts only after org.deepin.dde.XSettings1.service to pick up updated xsettings values.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@sourcery-ai

sourcery-ai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Ensure dde-session@x11 systemd service starts only after org.deepin.dde.XSettings1.service so it picks up the latest xsettings configuration values.

File-Level Changes

Change Details Files
Adjust dde-session@x11 systemd unit ordering so it starts after XSettings1.
  • Add After=org.deepin.dde.XSettings1.service directive to the dde-session@x11 systemd service unit
  • Document rationale in PR description for startup ordering change affecting dde-session startup sequence
systemd/dde-session-pre.target.wants/dde-session@x11.service

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread systemd/dde-session-pre.target.wants/dde-session@x11.service
Add After=org.deepin.dde.XSettings1.service to ensure kwin starts
after XSettings1.service in V25, so kwin reads the latest Xsettings
data from the source. Avoid parallel startup issues that could cause
reading stale values and incorrect scaling.

添加 After=org.deepin.dde.XSettings1.service,使 V25 中 kwin
在 XSettings1.service 后启动,确保 kwin 读取的 Xsettings 的
数据来源(XSettings1.service)提供的是最新的。避免并行可能
引起的旧值读取,引起错误缩放等问题。

Log: 调整服务启动顺序,在 XSettings1 后启动
PMS: BUG-366239
Influence: 影响 dde-session 启动顺序
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Shining-N, yixinshark

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:95分

■ 【总体评价】

代码通过添加systemd服务依赖修复了X11会话启动顺序问题,整体质量良好
逻辑正确且无安全风险,因代码质量维度有微小改进空间扣5分

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

systemd/dde-session-pre.target.wants/dde-session@x11.service 文件中新增 After=org.deepin.dde.XSettings1.service 指令,符合 systemd unit 配置文件语法规范,正确声明了服务启动顺序依赖。
潜在问题:无
建议:无

  • 2.代码质量(良好)✓

修改通过添加显式的 After 依赖,解决了 dde-session@x11.serviceorg.deepin.dde.XSettings1.service 之间潜在的启动竞态问题,提高了系统启动的稳定性和可靠性。配置项放置位置合理,位于 Before=dde-session-pre.target 之后。
潜在问题:缺少对该依赖原因的注释说明
建议:在新增配置项上方添加简短注释,说明为何需要在此服务之后启动,以便后续维护人员理解

  • 3.代码性能(无性能问题)✓

仅调整服务启动顺序,不涉及运行时性能开销,对系统资源占用无影响。
建议:无

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改为 systemd 服务配置项调整,不涉及代码执行、用户输入处理或权限变更,不存在安全攻击面。

  • 建议:无需安全相关修复

■ 【改进建议代码示例】

--- a/systemd/dde-session-pre.target.wants/dde-session@x11.service
+++ b/systemd/dde-session-pre.target.wants/dde-session@x11.service
@@ -7,6 +7,9 @@ ConditionEnvironment=XDG_SESSION_TYPE=%I
 PartOf=dde-session-pre.target
 Before=dde-session-pre.target
 
+# Ensure XSettings1 service is started before dde-session@x11
+After=org.deepin.dde.XSettings1.service
+
 # Limit startup frequency more than the default
 StartLimitIntervalSec=15s
 StartLimitBurst=3

@Shining-N

Copy link
Copy Markdown
Author

recheck

@deepin-bot

deepin-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 2.0.29
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants