Files
chromebox-fan-control-win/README.md
2026-03-21 05:47:29 +08:00

55 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Chromebox 风扇温控Windows
在刷了 coreboot 的 Chromebox 上,用 **LibreHardwareMonitor** 读取 **CPU 核心温度**,通过 Coolstar **crosec** 自带的 **`ectool`** 设置 **`fanduty`**,并从 **ectool** 读取 **风扇转速RPM**。主界面提供三条实时曲线:温度、目标占空比、转速。
## 依赖
1. 安装 [Coolstar CROS-EC 驱动](https://github.com/coolstar/crwindows)(或您当前使用的 crosec 安装包),确保存在默认可执行文件:
`C:\Program Files\crosec\ectool.exe`
若路径不同,在程序「高级」选项卡中修改。
2. **以管理员身份运行**本程序清单已要求提升权限LHM 与 EC 通信通常需要管理员)。
3. 本机安装 [.NET 8 运行时](https://dotnet.microsoft.com/download/dotnet/8.0)(若使用 `dotnet publish --self-contained false` 发布,目标机需运行时)。
## 编译
```powershell
.\build.ps1
```
发布到 `dist\`
```powershell
.\build.ps1 -publish
```
需已安装 [.NET 8 SDK](https://dotnet.microsoft.com/download)。
## 配置
- 安装目录旁的 **`appsettings.json`**:默认选项。
- **`%AppData%\ChromeboxFanControl\config.json`**:保存后会覆盖同名项(用户配置)。
重要字段:
| 项 | 说明 |
|----|------|
| `FanRpmArgs` | 读取转速时传给 ectool 的参数(默认 `pwmgetfanrpm` `0`),请用本机 `ectool help` 核对。 |
| `FanDutyArgs` | 读取占空比时传给 ectool 的参数(如 `pwmget` `0`);空则跳过,显示目标占空比。 |
| `AutoFanCtrlArgs` | 退出程序时恢复 EC 自动风扇(默认 `autofanctrl`),若命令名不同请修改。 |
| `TempSource` | `AverageCore``MaxCore`。 |
| `CurvePoints` | 13 个 0100 的占空比控制点(与 Chrultrabook-Tools 曲线逻辑一致)。 |
## 使用说明
- 启动后任务栏托盘有图标;可「暂停控制」(不再下发 `fanduty`EC 保持上次状态)。
- **退出**或关闭前会尝试执行 **自动风扇恢复**命令(见配置)。
- 若连续多次读不到 CPU 温度,将进入**安全模式**(固定占空比或 `autofanctrl`,见界面选项)。
## 免责声明
软件按「原样」提供。错误的风扇策略可能导致过热或硬件损坏;请自行承担使用风险。
## 许可
本项目为实现计划而编写的原创代码;风扇曲线算法行为参考 Chrultrabook-Tools 的公开逻辑描述,未复制其 GPL 源码。