Repository navigation
fix(daemon): support single-threshold charging and reject invalid psys - #3
Open
Lightmarey wants to merge 3 commits into
Open
Lightmarey wants to merge 3 commits into
Lightmarey wants to merge 3 commits into
Conversation
- charge_control: on ASUS and other laptops that expose only charge_control_end_threshold without start_threshold, writing to p_start raised FileNotFoundError, causing set_limit to roll back to 100% and startup initialization to fail. Check path existence before writing. - rapl: on machines where intel-rapl:1 (psys) is disabled in hardware (enabled == 0), the counter drifts with negligible idle noise (~0.3 W). Filter out disabled psys zones and validate psys against package power to prevent crushing real CPU wattage into fractions of a watt.
- hwmon: detect dual fans on ASUS laptops via asus-nb-wmi hwmon. - sources.nvidia: add NvidiaGpu reading power usage (W) and temperature (C) via ctypes binding to libnvidia-ml.so.1 (NVML). Check PCI sysfs runtime_status so NVML is not queried when the card is suspended in D3cold/D3hot, preserving hardware runtime suspend. - sampler: incorporate dGPU power into smoothed telemetry, whole-system power breakdown (gpu_w = igpu_w + dgpu_w), and fallback estimates. - display_cal: validate that calibration points have non-zero slope before reporting calibrated status.
Author
摘要增加了对华硕(ASUS)双风扇遥测数据的支持,以及通过 NVML 监控 NVIDIA 独立显卡的功能,并针对混合显卡笔记本电脑加入了明确的运行时挂起(runtime suspend)保护机制。 主要变更
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
本 PR 修复了华硕笔记本电脑(以及其他采用类似 EC 固件的设备)上的两个硬件兼容性问题:
charge_control.py):asus-wmi) 仅公开了charge_control_end_threshold,而不存在start_threshold对应的 sysfs 节点。p_start写入数据时会引发FileNotFoundError,进而触发异常处理程序,导致充电限制回退至 100%。os.path.exists(path))。psys过滤 (rapl.py和sampler.py):intel-rapl:1(psys)(即enabled == 0),计数器会产生漂移,表现为微不足道的空闲噪声(约 0.3 W)。rapl.py中跳过enabled == 0的区域;在sampler.py中,仅当psys读数至少达到封装功耗 (package power) 的 70% 时,才将其视为可信数据。测试环境