feat(power): migrate power services - #153
Conversation
There was a problem hiding this comment.
Sorry @mhduiy, your pull request is larger than the review limit of 150000 diff characters
Reviewer's GuideUnifies session and system power services for X11 and Wayland under dde-services, adding a system Power1 plugin with richer battery/power-mode APIs, short-idle and ambient-brightness integration, hardened DPMS and sleep/shutdown handling, and updated DConfig/DBus/Polkit wiring. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
ebe043c to
8b1a80e
Compare
|
TAG Bot New tag: 1.0.40 |
|
TAG Bot New tag: 1.0.41 |
22fd43d to
e022cb4
Compare
|
/test sync-to-gitee |
|
@mhduiy: The specified target(s) for
Use
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 建议将 canEnterShortIdle 中的检查逻辑拆分,提升可读性
bool PowerManager::canEnterShortIdle() const
{
if (m_useWayland)
return true;
if (!checkNoBlacklistedAppRunning())
return false;
if (!checkNoThirdPartyAppRunning())
return false;
if (!checkNoThirdPartyServiceRunning())
return false;
return true;
}
bool PowerManager::checkNoBlacklistedAppRunning() const
{
// 原有应用黑名单检查逻辑
// ...
return true;
}
bool PowerManager::checkNoThirdPartyAppRunning() const
{
// 原有第三方应用检查逻辑
// ...
return true;
}
bool PowerManager::checkNoThirdPartyServiceRunning() const
{
// 原有第三方服务检查逻辑
// ...
return true;
} |
1. Unify session Power scheduling and short-idle guards across X11 and Wayland. 2. Add system Power1 battery, mode, TLP, CPU, idle, and screen APIs. 3. Move idle-state DConfig and LoongArch sysfs handling into system Power1. 4. Delegate X11 brightness scaling to Display1 and remove duplicate calculations. 5. Move Power assets to dde-services and hand off from dde-daemon 6.1.104.1. 6. Preserve caller validation with Polkit fallback for protected mutations. Log: Migrate Power1 ownership with compatible power and battery behavior. Influence: X11 and Wayland retain compatible Power behavior. feat(power): 迁移电源服务 1. 统一 X11、Wayland 的会话电源调度和短空闲保护检查。 2. 新增系统 Power1 电池、模式、TLP、CPU、空闲及屏幕接口。 3. 将空闲状态 DConfig 与龙芯 sysfs 处理迁入系统 Power1。 4. 将 X11 亮度缩放交给 Display1,并移除重复计算。 5. 将 Power 资源迁入 dde-services,并从 dde-daemon 6.1.104.1 完成交接。 6. 保留受保护操作的调用方校验和 Polkit 回退。 Log: 迁移 Power1 所有权并保持兼容的电源与电池行为。 PMS: TASK-394241 Influence: X11 与 Wayland 保持兼容的电源行为。 Change-Id: Ica6af9cae0f2f6c3f0b78ff81a4134cb14a2d852
1. Declare libudev-dev for the system Power plugin configuration. Log: Fix clean package builds that could not resolve libudev. Influence: dde-services builds in clean environments. build(power): 添加 libudev 构建依赖 1. 为系统 Power 插件配置声明 libudev-dev。 Log: 修复干净环境中无法解析 libudev 的打包问题。 PMS: TASK-394241 Influence: dde-services 可在干净环境完成构建。 Change-Id: Icedd7a8bdbc9e63de385199c7f75416ee42152b8
ca6af9c to
8afdd31
Compare
|
/retest |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, 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 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Log: Migrate Power1 ownership with compatible power and battery behavior.
PMS: TASK-394241
Influence: X11 and Wayland retain compatible Power behavior.
feat(power): 迁移电源服务
Log: 迁移 Power1 所有权并保持兼容的电源与电池行为。
Influence: X11 与 Wayland 保持兼容的电源行为。
配套 PR:linuxdeepin/dde-daemon#1202(移除 dde-daemon 侧 Power 实现与资源)。两者需一并合并,升级关系为
dde-services (>> 1.0.41)⇄dde-daemon (<< 6.1.104.1)。原 #157(fix(power): secure system power actions)已折叠进本 PR;#146 为同内容旧 PR,已关闭。
Validation:
dpkg-buildpackage -b -uc -us通过(rebase 到 master 后重新构建)。org.deepin.dde.Power1.{conf,service}、org.deepin.dde.power.policy、org.deepin.dde.daemon.power.json仅由 dde-services 提供。