[暂不合并]chore(xsettings): add ExecStartPre to disable THP before service startup#69
[暂不合并]chore(xsettings): add ExecStartPre to disable THP before service startup#69mhduiy wants to merge 1 commit into
Conversation
|
[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 guide (collapsed on small PRs)Reviewer's GuideAdds a pre-start step to the XSettings1 D-Bus service to run a helper that disables touchpad palm rejection (THP) before the service starts. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Added ExecStartPre=-/usr/libexec/dde-thp-disable to XSettings1 D-Bus service 2. Ensures touchpad palm rejection (THP) is disabled before the XSettings service starts Log: Run dde-thp-disable as ExecStartPre in XSettings1 D-Bus service chore(xsettings): 在 XSettings 服务启动前添加 ExecStartPre 禁用 THP 1. 在 XSettings1 D-Bus service 中添加了 ExecStartPre=-/usr/libexec/dde-thp-disable 2. 确保在 XSettings 服务启动前禁用触摸板手掌防误触(THP) Log: 在 XSettings1 D-Bus 服务中添加 dde-thp-disable 作为 ExecStartPre PMS: TASK-390043
deepin pr auto review你好!我是CodeGeeX。我已仔细审查了你提供的 Git diff 内容。 本次修改在 systemd 的 service 单元文件中添加了一行 以下是我从语法逻辑、代码质量、代码性能和代码安全四个维度提出的详细审查意见和改进建议: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
综合改进建议示例如果你确认必须使用外部脚本来禁用 THP,且允许它失败,建议改进如下: [Service]
Type=dbus
BusName=org.deepin.dde.XSettings1
# 禁用透明大页(THP),以避免深色模式/渲染场景下的内存性能问题 (根据实际原因修改注释)
# 忽略执行失败(-),即使禁用未成功也允许服务继续启动
ExecStartPre=-/usr/libexec/dde-thp-disable
ExecStart=/usr/bin/deepin-service-manager -n org.deepin.dde.XSettings1
Restart=on-failure
RestartSec=3如果你确认可以直接写内核参数,且系统路径规范,建议改进如下(更安全、无外部依赖): [Service]
Type=dbus
BusName=org.deepin.dde.XSettings1
# 直接禁用透明大页(THP),避免引入外部脚本依赖,提升安全性和可维护性
ExecStartPre=-/bin/sh -c '/usr/bin/test -f /sys/kernel/mm/transparent_hugepage/enabled && /usr/bin/echo never > /sys/kernel/mm/transparent_hugepage/enabled'
ExecStart=/usr/bin/deepin-service-manager -n org.deepin.dde.XSettings1
Restart=on-failure
RestartSec=3希望这些审查意见对你有所帮助!如果有关于该脚本具体实现细节的代码,也可以发给我进一步审查。 |
Log: Run dde-thp-disable as ExecStartPre in XSettings1 D-Bus service
chore(xsettings): 在 XSettings 服务启动前添加 ExecStartPre 禁用 THP
Log: 在 XSettings1 D-Bus 服务中添加 dde-thp-disable 作为 ExecStartPre
PMS: TASK-390043
Summary by Sourcery
Enhancements: