summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authori-shm <[email protected]>2026-08-29 05:57:15 +0000
committeri-shm <[email protected]>2026-08-29 05:57:15 +0000
commitaa43b41aa9ea292e8b818f63c6238a63fb7890c1 (patch)
treea0716e66abb91b4a570e9e463fd82db27927dd77
parent06895bb6352efffd3a09f9f50039d84bdfa4269f (diff)
downloadblog-aa43b41aa9ea292e8b818f63c6238a63fb7890c1.tar.gz
deploy: 76309b0a559c3cffe9d7b9db74c8c2e217eaf822
-rw-r--r--2026/08/25/非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界/index.html5
-rw-r--r--2026/08/29/给一台Linux笔记本做服务器化改造:休眠、充电上限与EC寄存器考古/index.html335
-rw-r--r--archives/2026/08/index.html18
-rw-r--r--archives/2026/index.html36
-rw-r--r--archives/2026/page/2/index.html18
-rw-r--r--archives/index.html36
-rw-r--r--archives/page/10/index.html36
-rw-r--r--archives/page/11/index.html36
-rw-r--r--archives/page/12/index.html36
-rw-r--r--archives/page/13/index.html36
-rw-r--r--archives/page/14/index.html36
-rw-r--r--archives/page/15/index.html36
-rw-r--r--archives/page/16/index.html36
-rw-r--r--archives/page/17/index.html38
-rw-r--r--archives/page/18/index.html18
-rw-r--r--archives/page/2/index.html36
-rw-r--r--archives/page/3/index.html36
-rw-r--r--archives/page/4/index.html36
-rw-r--r--archives/page/5/index.html36
-rw-r--r--archives/page/6/index.html36
-rw-r--r--archives/page/7/index.html36
-rw-r--r--archives/page/8/index.html38
-rw-r--r--archives/page/9/index.html36
-rw-r--r--page/2/index.html114
-rw-r--r--page/3/index.html114
-rw-r--r--search.xml120
-rw-r--r--tag/index.html6
-rw-r--r--tags/Linux/index.html217
-rw-r--r--tags/Technique/index.html36
-rw-r--r--tags/Technique/page/2/index.html36
-rw-r--r--tags/Technique/page/3/index.html36
-rw-r--r--tags/Technique/page/4/index.html38
-rw-r--r--tags/Technique/page/5/index.html38
-rw-r--r--tags/Technique/page/6/index.html36
-rw-r--r--tags/Technique/page/7/index.html18
35 files changed, 1290 insertions, 565 deletions
diff --git a/2026/08/25/非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界/index.html b/2026/08/25/非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界/index.html
index 941c3734..b3af985b 100644
--- a/2026/08/25/非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界/index.html
+++ b/2026/08/25/非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界/index.html
@@ -317,6 +317,11 @@
<nav class="post-nav">
<div class="prev-item">
+ <div class="icon arrow-left"></div>
+ <div class="post-link">
+ <a href="/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/">Prev</a>
+ </div>
+
</div>
<div class="next-item">
diff --git a/2026/08/29/给一台Linux笔记本做服务器化改造:休眠、充电上限与EC寄存器考古/index.html b/2026/08/29/给一台Linux笔记本做服务器化改造:休眠、充电上限与EC寄存器考古/index.html
new file mode 100644
index 00000000..71334111
--- /dev/null
+++ b/2026/08/29/给一台Linux笔记本做服务器化改造:休眠、充电上限与EC寄存器考古/index.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+<meta http-equiv="X-UA-Compatible" content="ie=edge">
+
+ <meta name="author" content="韩暮秋">
+
+
+ <meta name="subtitle" content="暮秋小屋">
+
+
+ <meta name="description" content="这里是暮秋小屋,思念和灵感的寄存处">
+
+
+ <meta name="keywords" content="韩暮秋,MuqiuHan,'Muqiu Han', 'muqiu han', muqiuhan">
+
+
+
+
+ <title>
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古 |
+ 暮秋小屋
+ </title>
+
+
+
+ <link rel="icon" href="/favicon.ico">
+
+
+
+
+ <!-- stylesheets list from _config.yml -->
+
+ <link rel="stylesheet" href="/css/style.css">
+
+
+
+
+ <link rel="preload" href="/fonts/FZYouSongS-509R.woff2" as="font" type="font/woff2" crossorigin>
+
+
+
+ <!-- scripts list from _config.yml -->
+
+ <script
+ src="/js/menu.js"></script>
+
+
+
+
+
+ <script
+ src="https://polyfill.alicdn.com/polyfill.js?features=es6"></script>
+ <script
+ id="MathJax-script"
+ async
+ src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/mathjax/3.2.0/es5/tex-mml-chtml.js"></script>
+
+
+
+
+ <meta name="generator" content="Hexo 6.3.0"></head>
+ <body>
+ <div class="wrapper">
+
+ <div class="header">
+ <div class="flex-container">
+ <div class="header-inner">
+ <div class="site-brand-container">
+ <a href="/">
+
+ 暮秋小屋
+
+ </a>
+ </div>
+ <div id="menu-btn" class="menu-btn" onclick="toggleMenu()">
+ 菜单
+ </div>
+ <nav class="site-nav">
+ <ul class="menu-list">
+
+
+ <li class="menu-item">
+ <a href="/">
+ 主页
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/categories/gallery/">
+ 日记本
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/tags/Medicine/">
+ 泛医学
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/tags/Technique/">
+ 计算机
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/tags/Life/">
+ 生活
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/archives">
+ 全部
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/about">
+ 关于
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/search">搜索</a>
+ </li>
+
+ </ul>
+ </nav>
+ </div>
+ </div>
+</div>
+
+
+ <div class="main">
+ <div class="flex-container">
+ <article id="post">
+
+
+ <div class="post-head">
+ <div class="post-info">
+ <div class="tag-list">
+
+
+ <span class="post-tag">
+ <a href="/tags/Technique/">
+ Technique
+ </a>
+ </span>
+
+ <span class="post-tag">
+ <a href="/tags/Linux/">
+ Linux
+ </a>
+ </span>
+
+
+ </div>
+ <div class="post-title">
+
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古
+
+
+ </div>
+ <span class="post-date">
+ Aug 29, 2026
+ </span>
+ </div>
+ <div class="post-img">
+
+ <div class="h-line-primary"></div>
+
+ </div>
+</div>
+ <div class="post-content">
+ <p>一台旧笔记本装上 Hermes Agent 之后,就成了 7×24 挂在家庭网络里的常驻服务机。机器继续服役,但&quot;笔记本&quot;这个出厂身份留下的问题需要逐个拆除:拔电半小时自动休眠、合盖掉线、电池永远充到顶。这篇文章记录一次完整的改造过程——大部分是常规配置,最后一段是真正的硬骨头:Linux 下没有现成驱动的 Redmi EC,如何从固件代码里考古出充电上限的寄存器地址,并把 80% 上限真正写进硬件。</p>
+<p>改造对象是 Redmi Book Pro 15 2022,系统 Pop!_OS 24.04,内核 6.18.7。文中所有验证步骤都给出了可复核的证据,文末附完整的脚本清单。</p>
+<h2 id="休眠问题的两个来源:一个在用户会话,一个在系统层"><a class="header-anchor" href="#休眠问题的两个来源:一个在用户会话,一个在系统层">¶</a>休眠问题的两个来源:一个在用户会话,一个在系统层</h2>
+<p>先说结论:这台机器的自动休眠由两套机制叠加控制,只改任何一处都会被另一处重新睡掉。</p>
+<p>第一处在 GNOME。<code>org.gnome.settings-daemon.plugins.power</code> 这组键值把插电和用电池分成两个策略:这台机器出厂默认插电模式 <code>nothing</code>(永不睡),电池模式 <code>suspend</code>(30 分钟无操作就睡)。服务器场景下,这个&quot;电池模式&quot;就是拔电失联的直接原因。禁用只需两条命令:</p>
+<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">gsettings <span class="built_in">set</span> org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type <span class="string">&#x27;nothing&#x27;</span></span><br><span class="line">gsettings <span class="built_in">set</span> org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type <span class="string">&#x27;nothing&#x27;</span></span><br></pre></td></tr></table></figure>
+<p>第二处在 systemd-logind。不处理它,合盖依然会触发 suspend。做法是往 <code>/etc/systemd/logind.conf.d/</code> 放一个drop-in 配置:</p>
+<figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="section">[Login]</span></span><br><span class="line"><span class="attr">HandleLidSwitch</span>=ignore</span><br><span class="line"><span class="attr">HandleLidSwitchExternalPower</span>=ignore</span><br><span class="line"><span class="attr">HandleLidSwitchDocked</span>=ignore</span><br><span class="line"><span class="attr">AllowSuspend</span>=<span class="literal">no</span></span><br><span class="line"><span class="attr">AllowHibernation</span>=<span class="literal">no</span></span><br></pre></td></tr></table></figure>
+<p><code>AllowSuspend=no</code> 这几行比合盖策略更进一步——它让 suspend/hibernate 这两个电源目标在系统层面不可达。从此无论哪个组件想休眠这台机器,systemd 都会拒绝执行。对服务器而言这是最保险的一层。</p>
+<h2 id="充电上限:配置了两年,从来没生效过"><a class="header-anchor" href="#充电上限:配置了两年,从来没生效过">¶</a>充电上限:配置了两年,从来没生效过</h2>
+<p>机器上一直装着 TLP,配置文件里写得明明白白:</p>
+<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">START_CHARGE_THRESH_BAT0=20</span><br><span class="line">STOP_CHARGE_THRESH_BAT0=80</span><br></pre></td></tr></table></figure>
+<p>但电量依然冲到了 94%(对应衰减后的满充点)。原因在 TLP 的工作方式:它自己不碰硬件,只调用内核提供的接口。Linux 内核标准接口是 <code>/sys/class/power_supply/BAT0/charge_control_end_threshold</code>,TLP 依次尝试三种后端——<code>natacpi</code>(内核 ACPI 驱动直写)、<code>acpi_call</code>(通过第三方模块调用任意 ACPI 方法)、<code>sysfs</code>(上述标准接口)。三种在这台机器上全部缺席:Redmi 没有为自家 EC 提交过任何内核驱动,<code>charge_control_end_threshold</code> 文件不存在,<code>acpi_call</code> 也没有安装。</p>
+<p>TLP 的处理方式是静默降级——配置留着,什么都不做。这解释了&quot;设置了却充到顶&quot;的全部现象。</p>
+<h2 id="从-DSDT-考古:找到-EC-里的充电上限字段"><a class="header-anchor" href="#从-DSDT-考古:找到-EC-里的充电上限字段">¶</a>从 DSDT 考古:找到 EC 里的充电上限字段</h2>
+<p>内核不提供接口,就要自己读固件。ACPI 的 DSDT 表是主板固件的执行代码,用 <code>iasl</code> 反汇编后就是一份可检索的&quot;硬件说明书&quot;:</p>
+<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cp</span> /sys/firmware/acpi/tables/DSDT /tmp/probe/</span><br><span class="line">iasl -d /tmp/probe/DSDT.bin</span><br></pre></td></tr></table></figure>
+<p>在反汇编产物里,<code>Device (EC0)</code> 是嵌入式控制器(Embedded Controller,主板上负责电池、键盘、风扇等底层事务的 8 位单片机)。EC 暴露给 ACPI 的字段表以 <code>Field (ERAM…)</code> 开头,逐项列出每个字段的名称和位宽。搜索电池相关的命名,一段关键结构浮现出来:</p>
+<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">Offset (0x80),</span><br><span class="line">ACIN, 1, // AC 已插电</span><br><span class="line">BTIN, 1, // 电池在位</span><br><span class="line">BTST, 4, // 电池状态</span><br><span class="line">ADPW, 8,</span><br><span class="line">BTSN, 16, // 序列号</span><br><span class="line">BTDC, 16, // Design Capacity 设计容量</span><br><span class="line">BTDV, 16, // Design Voltage 设计电压</span><br><span class="line">BTFC, 16, // Full Charge Capacity 满充容量</span><br><span class="line">BTTP, 16,</span><br><span class="line">BTCT, 16, // Cycle Count 循环次数</span><br><span class="line">BTPR, 16, // Present Capacity 当前容量</span><br><span class="line">BTVT, 16, // Voltage 电压</span><br><span class="line">RSOC, 8, // Relative State of Charge 电量百分比</span><br><span class="line">… // 8 个状态位占满一个字节</span><br><span class="line">BTCC, 16, // Charge Cap 充电上限</span><br><span class="line">BATM, 16,</span><br></pre></td></tr></table></figure>
+<p>按 ACPI Field 的位累积规则手工推算,每个字段落在 EC RAM 的具体字节位置:电量百分比 RSOC 在偏移 0x92,充电上限 BTCC 在 0x95-0x96(16 位小端)。这台机器的 EC RAM 通过内存映射窗口 <code>0xFE0B0400</code> 可直接访问。</p>
+<p>推断需要验证。验证方法是交叉比对:把 32 个字节一次性读出来,看各项读数能否和系统已知的数值对上。实际读取结果:</p>
+<table>
+<thead>
+<tr>
+<th>EC 字段</th>
+<th>读数</th>
+<th>系统对照值</th>
+<th>结果</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>RSOC</td>
+<td>89%</td>
+<td>upower 实时 89%(自放电后的实时值)</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTDC</td>
+<td>4664 mAh × 15440 mV = 72.0 Wh</td>
+<td>energy_full_design 72.012 Wh</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTFC</td>
+<td>3939 mAh → 60.8 Wh</td>
+<td>energy_full 60.818 Wh</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTFC/BTDC</td>
+<td>84.5%</td>
+<td>电池健康度 84.455%</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTPR/BTFC</td>
+<td>88.9%</td>
+<td>≈ RSOC 89%,内部自洽</td>
+<td>命中</td>
+</tr>
+</tbody>
+</table>
+<p>六项全部命中,偏移表确认无误。这次读取还带来一个意外收获:<strong>循环次数 1196 次</strong>——内核 sysfs 一直报 0,真实数字一直躺在 EC 里。84.5% 的健康度对一千二百次循环来说衰减曲线相当正常,而 80% 上限从现在开始会显著放缓后续衰减。</p>
+<p>验证时 BTCC 读数为 0,即从未有系统写入过它——TLP 静默失效、小米自己的管理软件从未在 Linux 侧运行,这个字段空了两年。</p>
+<h2 id="写入与固化:从一次性验证到开机自启"><a class="header-anchor" href="#写入与固化:从一次性验证到开机自启">¶</a>写入与固化:从一次性验证到开机自启</h2>
+<p>写入本身是对内存映射窗口的 2 字节操作。用 <code>dd</code> 定位到 <code>0xFE0B0495</code>,写入小端编码的 80,读回确认 EC 接受。行为验证更直接:写入时电量 87%,高于上限,状态立即表现为 Discharging(拒绝充电);电量自然回落到 83% 后,状态转为 Charging——EC 正在按&quot;低于 80 才充、充到 80 停&quot;的逻辑工作。</p>
+<p>EC 的值在冷启动后可能复位,所以最后一步是固化:一个 20 行的 shell 脚本(写入 + 最多 5 次读回重试 + 写 syslog),注册成 oneshot 的 systemd 服务,<code>WantedBy=multi-user.target</code>。每次开机自动重写。日志验证一行即可:<code>journalctl -t ec-charge-limit</code>。</p>
+<h2 id="为什么绕了这么多路"><a class="header-anchor" href="#为什么绕了这么多路">¶</a>为什么绕了这么多路</h2>
+<p>这套探索的完整链条值得复盘,因为它演示了一个通用模式:<strong>当厂商不为 Linux 提供驱动时,固件代码是最后的、也是完全可靠的文档</strong>。</p>
+<p>TLP 配置存在但从未生效,说明用户态工具依赖于内核 ABI 的覆盖面。内核接口缺失时,<code>acpi_call</code> 这类&quot;万能调用器&quot;是第一层补救——但它的前提仍是 ACPI 层存在可调用的方法。DSDT 反汇编显示这台机器的 EC 确实声明了 BTCC 字段,但没有任何 AML 代码(ACPI 层的解释执行代码)读写它——小米把充电控制做成了纯 EC 寄存器协议,只有 Windows 侧的私有驱动知道怎么写。这一层是 acpi_call 也救不了的,于是只剩最后一条路:直接读写 EC RAM。</p>
+<p>这已经触及了此类探索的边界。直接写 EC 是有真实风险的操作——这段内存窗口同时被固件本身使用,写错偏移可能影响风扇、键盘背光乃至供电策略。整个过程中风险控制靠三件事:所有写入前先完成只读交叉验证(六个字段全命中才敢写);写入目标收窄到 2 字节;写入后立即读回并观察行为。至于回滚,同样的通道写 100 就能恢复原状。</p>
+<h2 id="交付清单"><a class="header-anchor" href="#交付清单">¶</a>交付清单</h2>
+<p>改造后的最终状态:</p>
+<ul>
+<li>拔电、合盖均不休眠,suspend 目标在 systemd 层全局禁用</li>
+<li>充电到 80% 由 EC 强制执行,不依赖任何用户态进程存活</li>
+<li>开机自动重写上限,冷启动不丢配置</li>
+<li>电池档案:设计 72 Wh,满充 60.8 Wh(健康度 84.5%),循环 1196 次</li>
+</ul>
+<p>完整脚本已归档:<code>setup-server-power.sh</code>(休眠部分)、<code>acpi-probe-battery.sh</code>(DSDT 反汇编 + 只读探测)、<code>ec-verify-readonly.sh</code>(字段交叉验证)、<code>ec-set-charge-limit.sh</code>(写入与行为观察)、<code>power-rollback.sh</code>(一键回滚)。如果你有一台同样&quot;EC 沉默&quot;的笔记本,这套只读验证优先的流程可以直接复用——先证明地址表是对的,再谈写入。</p>
+
+</div>
+
+<script>
+ window.onload = detectors();
+</script>
+ <div class="post-footer">
+ <div class="h-line-primary"></div>
+ <nav class="post-nav">
+ <div class="prev-item">
+
+ </div>
+ <div class="next-item">
+
+ <div class="icon arrow-right"></div>
+ <div class="post-link">
+ <a href="/2026/08/25/%E9%9D%9E%E5%B0%8F%E7%BB%86%E8%83%9E%E8%82%BA%E7%99%8C%E9%B3%9E%E7%8A%B6%E5%88%86%E5%8C%96%E7%9A%84%E5%85%8D%E7%96%AB%E7%BB%84%E5%8C%96%E5%88%A4%E8%AF%BB%E5%8F%8A%E5%85%B6%E6%B2%BB%E7%96%97%E8%BE%B9%E7%95%8C/">Next</a>
+ </div>
+
+ </div>
+ </nav>
+</div>
+
+
+ <div class="post-comment">
+
+
+
+
+
+
+
+</div>
+
+
+</article>
+ </div>
+ </div>
+
+ <div class="footer">
+ <div class="flex-container">
+ <div class="footer-text">
+
+
+ 韩暮秋 |
+
+
+ 希望路过的人可以添点柴火让这里暖和点
+
+ </div>
+ </div>
+</div>
+
+
+ </div>
+
+ <script src="/js/mermaid-zoom.js"></script>
+
+ </body>
+</html>
diff --git a/archives/2026/08/index.html b/archives/2026/08/index.html
index b7a37cd8..02062fb3 100644
--- a/archives/2026/08/index.html
+++ b/archives/2026/08/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/">
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 29, 2026</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2026/08/25/%E9%9D%9E%E5%B0%8F%E7%BB%86%E8%83%9E%E8%82%BA%E7%99%8C%E9%B3%9E%E7%8A%B6%E5%88%86%E5%8C%96%E7%9A%84%E5%85%8D%E7%96%AB%E7%BB%84%E5%8C%96%E5%88%A4%E8%AF%BB%E5%8F%8A%E5%85%B6%E6%B2%BB%E7%96%97%E8%BE%B9%E7%95%8C/">
非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界
diff --git a/archives/2026/index.html b/archives/2026/index.html
index 49d89000..45d5a12b 100644
--- a/archives/2026/index.html
+++ b/archives/2026/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/">
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 29, 2026</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2026/08/25/%E9%9D%9E%E5%B0%8F%E7%BB%86%E8%83%9E%E8%82%BA%E7%99%8C%E9%B3%9E%E7%8A%B6%E5%88%86%E5%8C%96%E7%9A%84%E5%85%8D%E7%96%AB%E7%BB%84%E5%8C%96%E5%88%A4%E8%AF%BB%E5%8F%8A%E5%85%B6%E6%B2%BB%E7%96%97%E8%BE%B9%E7%95%8C/">
非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2026/03/21/%E5%B0%8F%E8%B0%88-NestJS-Zod/">
-
- 小谈 NestJS Zod
-
- </a>
- </div>
-
- <span class="post-date">Mar 21, 2026</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/2026/page/2/index.html b/archives/2026/page/2/index.html
index 2aca60cf..d31deb4d 100644
--- a/archives/2026/page/2/index.html
+++ b/archives/2026/page/2/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2026/03/21/%E5%B0%8F%E8%B0%88-NestJS-Zod/">
+
+ 小谈 NestJS Zod
+
+ </a>
+ </div>
+
+ <span class="post-date">Mar 21, 2026</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2026/03/16/Nginx-%E5%89%8D%E5%90%8E%E7%AB%AF%E5%90%8C%E5%9F%9F%E5%88%86%E6%B5%81/">
Nginx 前后端同域分流
diff --git a/archives/index.html b/archives/index.html
index 7943b493..0ad70d45 100644
--- a/archives/index.html
+++ b/archives/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/">
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 29, 2026</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2026/08/25/%E9%9D%9E%E5%B0%8F%E7%BB%86%E8%83%9E%E8%82%BA%E7%99%8C%E9%B3%9E%E7%8A%B6%E5%88%86%E5%8C%96%E7%9A%84%E5%85%8D%E7%96%AB%E7%BB%84%E5%8C%96%E5%88%A4%E8%AF%BB%E5%8F%8A%E5%85%B6%E6%B2%BB%E7%96%97%E8%BE%B9%E7%95%8C/">
非小细胞肺癌鳞状分化的免疫组化判读及其治疗边界
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2026/03/21/%E5%B0%8F%E8%B0%88-NestJS-Zod/">
-
- 小谈 NestJS Zod
-
- </a>
- </div>
-
- <span class="post-date">Mar 21, 2026</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/10/index.html b/archives/page/10/index.html
index 33d0bcaf..f9475f9b 100644
--- a/archives/page/10/index.html
+++ b/archives/page/10/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2024/08/02/%E4%BA%8C%E3%80%87%E4%BA%8C%E5%9B%9B%E5%B9%B4%E5%85%AB%E6%9C%88%E4%B8%80%E6%97%A5/">
+
+ 二〇二四年八月一日
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 2, 2024</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2024/07/23/OCaml-News-2024-6/">
OCaml News 2024-6
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2024/05/07/%E4%BA%8C%E3%80%87%E4%BA%8C%E5%9B%9B%E5%B9%B4%E4%BA%94%E6%9C%88%E4%B8%83%E6%97%A5/">
-
- 二〇二四年五月七日
-
- </a>
- </div>
-
- <span class="post-date">May 7, 2024</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/11/index.html b/archives/page/11/index.html
index 81e70d8e..fd001aea 100644
--- a/archives/page/11/index.html
+++ b/archives/page/11/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2024/05/07/%E4%BA%8C%E3%80%87%E4%BA%8C%E5%9B%9B%E5%B9%B4%E4%BA%94%E6%9C%88%E4%B8%83%E6%97%A5/">
+
+ 二〇二四年五月七日
+
+ </a>
+ </div>
+
+ <span class="post-date">May 7, 2024</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2024/04/08/%E4%BA%8C%E3%80%87%E4%BA%8C%E5%9B%9B%E5%B9%B4%E5%9B%9B%E6%9C%88%E5%85%AB%E6%97%A5/">
二〇二四年四月八日
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2024/01/22/Rescript-React-Native/">
-
- Rescript and React Native
-
- </a>
- </div>
-
- <span class="post-date">Jan 22, 2024</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/12/index.html b/archives/page/12/index.html
index 3f808371..835caee7 100644
--- a/archives/page/12/index.html
+++ b/archives/page/12/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2024/01/22/Rescript-React-Native/">
+
+ Rescript and React Native
+
+ </a>
+ </div>
+
+ <span class="post-date">Jan 22, 2024</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2024/01/18/OCaml-News-2024-2/">
OCaml News 2024-2
@@ -321,24 +339,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/10/25/Radiographic-Absence-of-the-Left-Humeral-Head/">
-
- Radiographic Absence of the Left Humeral Head
-
- </a>
- </div>
-
- <span class="post-date">Oct 25, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/13/index.html b/archives/page/13/index.html
index 444a8959..7114dafd 100644
--- a/archives/page/13/index.html
+++ b/archives/page/13/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/10/25/Radiographic-Absence-of-the-Left-Humeral-Head/">
+
+ Radiographic Absence of the Left Humeral Head
+
+ </a>
+ </div>
+
+ <span class="post-date">Oct 25, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/10/25/%E8%82%BA%E7%82%8E%E6%94%AF%E5%8E%9F%E4%BD%93%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/">
肺炎支原体注意事项
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/08/27/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E5%85%AB%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%83%E6%97%A5/">
-
- 二零二三年八月二十七日
-
- </a>
- </div>
-
- <span class="post-date">Aug 27, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/14/index.html b/archives/page/14/index.html
index c767b1d3..b1564f91 100644
--- a/archives/page/14/index.html
+++ b/archives/page/14/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/08/27/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E5%85%AB%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%83%E6%97%A5/">
+
+ 二零二三年八月二十七日
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 27, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/08/21/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E5%85%AB%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%80%E6%97%A5/">
二零二三年八月二十一日
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/06/22/%E7%81%AF%E7%AC%BC%E8%8D%89/">
-
- 灯笼草
-
- </a>
- </div>
-
- <span class="post-date">Jun 22, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/15/index.html b/archives/page/15/index.html
index 69fbae4b..489bb308 100644
--- a/archives/page/15/index.html
+++ b/archives/page/15/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/06/22/%E7%81%AF%E7%AC%BC%E8%8D%89/">
+
+ 灯笼草
+
+ </a>
+ </div>
+
+ <span class="post-date">Jun 22, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/06/17/%E5%8F%91%E7%83%AD%E5%8F%8A%E8%B6%85%E9%AB%98%E7%83%AD%E5%8D%B1%E8%B1%A1/">
发热及超高热危象
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/03/14/%E5%91%8B%E5%A1%9E%E7%B1%B3/">
-
- 呋塞米
-
- </a>
- </div>
-
- <span class="post-date">Mar 14, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/16/index.html b/archives/page/16/index.html
index dcc6cb1f..9f4f0521 100644
--- a/archives/page/16/index.html
+++ b/archives/page/16/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/03/14/%E5%91%8B%E5%A1%9E%E7%B1%B3/">
+
+ 呋塞米
+
+ </a>
+ </div>
+
+ <span class="post-date">Mar 14, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/03/13/%E6%9B%BF%E7%B1%B3%E6%B2%99%E5%9D%A6/">
替米沙坦
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/02/02/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E4%BA%8C%E6%9C%88%E4%BA%8C%E6%97%A5/">
-
- 二零二三年二月二日
-
- </a>
- </div>
-
- <span class="post-date">Feb 2, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/17/index.html b/archives/page/17/index.html
index 26adaea2..aca44e6b 100644
--- a/archives/page/17/index.html
+++ b/archives/page/17/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/02/02/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E4%BA%8C%E6%9C%88%E4%BA%8C%E6%97%A5/">
+
+ 二零二三年二月二日
+
+ </a>
+ </div>
+
+ <span class="post-date">Feb 2, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/02/01/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%89%E5%B9%B4%E4%BA%8C%E6%9C%88%E4%B8%80%E6%97%A5/">
二零二三年二月一日
@@ -321,26 +339,6 @@
</div>
-
-
-
-
- <div class="year-title">2021</div>
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2021/03/27/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%80%E5%B9%B4%E4%B8%89%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%83%E6%97%A5/">
-
- 二零二一年三月二十七日
-
- </a>
- </div>
-
- <span class="post-date">Mar 27, 2021</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/18/index.html b/archives/page/18/index.html
index 3a0557fc..2a85a63e 100644
--- a/archives/page/18/index.html
+++ b/archives/page/18/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2021/03/27/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%80%E5%B9%B4%E4%B8%89%E6%9C%88%E4%BA%8C%E5%8D%81%E4%B8%83%E6%97%A5/">
+
+ 二零二一年三月二十七日
+
+ </a>
+ </div>
+
+ <span class="post-date">Mar 27, 2021</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2021/03/15/%E4%BA%8C%E9%9B%B6%E4%BA%8C%E4%B8%80%E5%B9%B4%E4%B8%89%E6%9C%88%E5%8D%81%E4%BA%94%E6%97%A5/">
二零二一年三月十五日
diff --git a/archives/page/2/index.html b/archives/page/2/index.html
index b288c999..19ccb75e 100644
--- a/archives/page/2/index.html
+++ b/archives/page/2/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2026/03/21/%E5%B0%8F%E8%B0%88-NestJS-Zod/">
+
+ 小谈 NestJS Zod
+
+ </a>
+ </div>
+
+ <span class="post-date">Mar 21, 2026</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2026/03/16/Nginx-%E5%89%8D%E5%90%8E%E7%AB%AF%E5%90%8C%E5%9F%9F%E5%88%86%E6%B5%81/">
Nginx 前后端同域分流
@@ -321,24 +339,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/12/20/%E8%B0%88%E8%B0%88%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B/">
-
- 谈谈软件工程
-
- </a>
- </div>
-
- <span class="post-date">Dec 20, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/3/index.html b/archives/page/3/index.html
index ed7b6bc4..35962459 100644
--- a/archives/page/3/index.html
+++ b/archives/page/3/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/12/20/%E8%B0%88%E8%B0%88%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B/">
+
+ 谈谈软件工程
+
+ </a>
+ </div>
+
+ <span class="post-date">Dec 20, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/12/19/%E4%B8%B4%E5%BA%8A%E7%A0%94%E7%A9%B6%E4%B8%AD%E7%9B%B2%E6%80%81%E8%A7%84%E5%88%99%E5%AD%98%E5%9C%A8%E7%9A%84%E5%8E%9F%E5%9B%A0/">
临床研究中盲态规则存在的原因
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/10/29/%E5%BA%93%E6%AC%A3%E7%BB%BC%E5%90%88%E5%BE%81/">
-
- 库欣综合征
-
- </a>
- </div>
-
- <span class="post-date">Oct 29, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/4/index.html b/archives/page/4/index.html
index d9379731..8af525dc 100644
--- a/archives/page/4/index.html
+++ b/archives/page/4/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/10/29/%E5%BA%93%E6%AC%A3%E7%BB%BC%E5%90%88%E5%BE%81/">
+
+ 库欣综合征
+
+ </a>
+ </div>
+
+ <span class="post-date">Oct 29, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/10/28/sufactants/">
表面活性剂
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/07/29/nestjs-nested-object-dto/">
-
- NestJS 嵌套查询参数解析错误分析与解决方案
-
- </a>
- </div>
-
- <span class="post-date">Jul 29, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/5/index.html b/archives/page/5/index.html
index abd66927..23c7ed80 100644
--- a/archives/page/5/index.html
+++ b/archives/page/5/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/07/29/nestjs-nested-object-dto/">
+
+ NestJS 嵌套查询参数解析错误分析与解决方案
+
+ </a>
+ </div>
+
+ <span class="post-date">Jul 29, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/07/11/fuck-hcho/">
由甲醛开始的碎碎念
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/05/07/nestjs-bullmq-mail-business/">
-
- NestJS bullmq 邮件发送业务中的小 tips
-
- </a>
- </div>
-
- <span class="post-date">May 7, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/6/index.html b/archives/page/6/index.html
index c082ade9..da409607 100644
--- a/archives/page/6/index.html
+++ b/archives/page/6/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/05/07/nestjs-bullmq-mail-business/">
+
+ NestJS bullmq 邮件发送业务中的小 tips
+
+ </a>
+ </div>
+
+ <span class="post-date">May 7, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/04/20/linux-amd-screen-boom/">
Linux 下 AMD 显卡屏幕画面闪烁问题修复方案
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/03/20/%E8%82%BA%E5%8A%9F%E8%83%BD%E6%A3%80%E6%9F%A5%E6%95%B0%E5%80%BC/">
-
- 肺功能检查数值
-
- </a>
- </div>
-
- <span class="post-date">Mar 20, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/7/index.html b/archives/page/7/index.html
index ab38a48c..b00340a3 100644
--- a/archives/page/7/index.html
+++ b/archives/page/7/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/03/20/%E8%82%BA%E5%8A%9F%E8%83%BD%E6%A3%80%E6%9F%A5%E6%95%B0%E5%80%BC/">
+
+ 肺功能检查数值
+
+ </a>
+ </div>
+
+ <span class="post-date">Mar 20, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/03/19/%E9%A2%86%E5%9F%9F%E9%A9%B1%E5%8A%A8%E8%AE%BE%E8%AE%A1%E4%B8%AD%E8%81%9A%E5%90%88%E6%A0%B9%E6%8C%81%E4%B9%85%E5%8C%96%E5%92%8C%E4%BA%8B%E4%BB%B6%E5%8F%91%E5%B8%83%E5%8F%AF%E8%83%BD%E5%AF%BC%E8%87%B4%E6%95%B0%E6%8D%AE%E4%B8%8D%E4%B8%80%E8%87%B4%E9%97%AE%E9%A2%98/">
领域驱动设计中聚合根持久化和事件发布可能导致数据不一致问题
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/01/19/%E8%BA%AB%E4%BD%93%E5%BE%80%E5%89%8D%E5%80%BE%EF%BC%8C%E7%81%B5%E9%AD%82%E5%90%91%E5%90%8E%E6%91%87/">
-
- 身体往前倾,灵魂向后摇
-
- </a>
- </div>
-
- <span class="post-date">Jan 19, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/8/index.html b/archives/page/8/index.html
index 73fb729a..7b03f081 100644
--- a/archives/page/8/index.html
+++ b/archives/page/8/index.html
@@ -159,6 +159,26 @@
+ <div class="year-title">2025</div>
+
+
+ <div class="post-list-item">
+ <div class="post-title">
+ <a href="/2025/01/19/%E8%BA%AB%E4%BD%93%E5%BE%80%E5%89%8D%E5%80%BE%EF%BC%8C%E7%81%B5%E9%AD%82%E5%90%91%E5%90%8E%E6%91%87/">
+
+ 身体往前倾,灵魂向后摇
+
+ </a>
+ </div>
+
+ <span class="post-date">Jan 19, 2025</span>
+ </div>
+
+
+
+
+
+
<div class="year-title">2024</div>
@@ -319,24 +339,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2024/09/27/Turborepo-%E7%AE%80%E8%BF%B0/">
-
- Turborepo 简述
-
- </a>
- </div>
-
- <span class="post-date">Sep 27, 2024</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/archives/page/9/index.html b/archives/page/9/index.html
index 31e0badb..464e5462 100644
--- a/archives/page/9/index.html
+++ b/archives/page/9/index.html
@@ -164,6 +164,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2024/09/27/Turborepo-%E7%AE%80%E8%BF%B0/">
+
+ Turborepo 简述
+
+ </a>
+ </div>
+
+ <span class="post-date">Sep 27, 2024</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2024/09/15/%E8%82%A9%E5%91%A8%E7%82%8E%E5%92%8C%E8%82%A9%E8%A2%96%E6%8D%9F%E4%BC%A4%E7%9A%84%E5%8C%BA%E5%88%AB/">
肩周炎和肩袖损伤的区别
@@ -319,24 +337,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2024/08/02/%E4%BA%8C%E3%80%87%E4%BA%8C%E5%9B%9B%E5%B9%B4%E5%85%AB%E6%9C%88%E4%B8%80%E6%97%A5/">
-
- 二〇二四年八月一日
-
- </a>
- </div>
-
- <span class="post-date">Aug 2, 2024</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/page/2/index.html b/page/2/index.html
index 226641fc..4524673b 100644
--- a/page/2/index.html
+++ b/page/2/index.html
@@ -61,119 +61,7 @@
- <meta name="generator" content="Hexo 6.3.0"><style>mjx-container[jax="SVG"] {
- direction: ltr;
-}
-
-mjx-container[jax="SVG"] > svg {
- overflow: visible;
-}
-
-mjx-container[jax="SVG"][display="true"] {
- display: block;
- text-align: center;
- margin: 1em 0;
-}
-
-mjx-container[jax="SVG"][justify="left"] {
- text-align: left;
-}
-
-mjx-container[jax="SVG"][justify="right"] {
- text-align: right;
-}
-
-g[data-mml-node="merror"] > g {
- fill: red;
- stroke: red;
-}
-
-g[data-mml-node="merror"] > rect[data-background] {
- fill: yellow;
- stroke: none;
-}
-
-g[data-mml-node="mtable"] > line[data-line] {
- stroke-width: 70px;
- fill: none;
-}
-
-g[data-mml-node="mtable"] > rect[data-frame] {
- stroke-width: 70px;
- fill: none;
-}
-
-g[data-mml-node="mtable"] > .mjx-dashed {
- stroke-dasharray: 140;
-}
-
-g[data-mml-node="mtable"] > .mjx-dotted {
- stroke-linecap: round;
- stroke-dasharray: 0,140;
-}
-
-g[data-mml-node="mtable"] > svg {
- overflow: visible;
-}
-
-[jax="SVG"] mjx-tool {
- display: inline-block;
- position: relative;
- width: 0;
- height: 0;
-}
-
-[jax="SVG"] mjx-tool > mjx-tip {
- position: absolute;
- top: 0;
- left: 0;
-}
-
-mjx-tool > mjx-tip {
- display: inline-block;
- padding: .2em;
- border: 1px solid #888;
- font-size: 70%;
- background-color: #F8F8F8;
- color: black;
- box-shadow: 2px 2px 5px #AAAAAA;
-}
-
-g[data-mml-node="maction"][data-toggle] {
- cursor: pointer;
-}
-
-mjx-status {
- display: block;
- position: fixed;
- left: 1em;
- bottom: 1em;
- min-width: 25%;
- padding: .2em .4em;
- border: 1px solid #888;
- font-size: 90%;
- background-color: #F8F8F8;
- color: black;
-}
-
-foreignObject[data-mjx-xml] {
- font-family: initial;
- line-height: normal;
- overflow: visible;
-}
-
-.MathJax path {
- stroke-width: 3;
-}
-
-mjx-container[display="true"] {
- overflow: auto hidden;
-}
-
-mjx-container[display="true"] + br {
- display: none;
-}
-</style></head>
+ <meta name="generator" content="Hexo 6.3.0"></head>
<body>
<div class="wrapper">
diff --git a/page/3/index.html b/page/3/index.html
index 4524673b..226641fc 100644
--- a/page/3/index.html
+++ b/page/3/index.html
@@ -61,7 +61,119 @@
- <meta name="generator" content="Hexo 6.3.0"></head>
+ <meta name="generator" content="Hexo 6.3.0"><style>mjx-container[jax="SVG"] {
+ direction: ltr;
+}
+
+mjx-container[jax="SVG"] > svg {
+ overflow: visible;
+}
+
+mjx-container[jax="SVG"][display="true"] {
+ display: block;
+ text-align: center;
+ margin: 1em 0;
+}
+
+mjx-container[jax="SVG"][justify="left"] {
+ text-align: left;
+}
+
+mjx-container[jax="SVG"][justify="right"] {
+ text-align: right;
+}
+
+g[data-mml-node="merror"] > g {
+ fill: red;
+ stroke: red;
+}
+
+g[data-mml-node="merror"] > rect[data-background] {
+ fill: yellow;
+ stroke: none;
+}
+
+g[data-mml-node="mtable"] > line[data-line] {
+ stroke-width: 70px;
+ fill: none;
+}
+
+g[data-mml-node="mtable"] > rect[data-frame] {
+ stroke-width: 70px;
+ fill: none;
+}
+
+g[data-mml-node="mtable"] > .mjx-dashed {
+ stroke-dasharray: 140;
+}
+
+g[data-mml-node="mtable"] > .mjx-dotted {
+ stroke-linecap: round;
+ stroke-dasharray: 0,140;
+}
+
+g[data-mml-node="mtable"] > svg {
+ overflow: visible;
+}
+
+[jax="SVG"] mjx-tool {
+ display: inline-block;
+ position: relative;
+ width: 0;
+ height: 0;
+}
+
+[jax="SVG"] mjx-tool > mjx-tip {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+mjx-tool > mjx-tip {
+ display: inline-block;
+ padding: .2em;
+ border: 1px solid #888;
+ font-size: 70%;
+ background-color: #F8F8F8;
+ color: black;
+ box-shadow: 2px 2px 5px #AAAAAA;
+}
+
+g[data-mml-node="maction"][data-toggle] {
+ cursor: pointer;
+}
+
+mjx-status {
+ display: block;
+ position: fixed;
+ left: 1em;
+ bottom: 1em;
+ min-width: 25%;
+ padding: .2em .4em;
+ border: 1px solid #888;
+ font-size: 90%;
+ background-color: #F8F8F8;
+ color: black;
+}
+
+foreignObject[data-mjx-xml] {
+ font-family: initial;
+ line-height: normal;
+ overflow: visible;
+}
+
+.MathJax path {
+ stroke-width: 3;
+}
+
+mjx-container[display="true"] {
+ overflow: auto hidden;
+}
+
+mjx-container[display="true"] + br {
+ display: none;
+}
+</style></head>
<body>
<div class="wrapper">
diff --git a/search.xml b/search.xml
index 3e497b54..9a55caae 100644
--- a/search.xml
+++ b/search.xml
@@ -151,21 +151,6 @@
</tags>
</entry>
<entry>
- <title>Adolescent Onset of Acute Heart Failure</title>
- <url>/2023/11/21/Adolescent-Onset-of-Acute-Heart-Failure/</url>
- <content><![CDATA[<p>心力衰竭一般是常见于成人的,主要继发于高血压和冠状动脉疾病。 青少年的病因很广泛,包括心肌炎、心肌病、结构性心脏病、营养缺乏、代谢紊乱、高血压危象和心律失常等。在发达国家,先天性心脏病和心肌病是儿童心力衰竭的两大主要原因,而在发展中国家,主要原因包括感染和严重贫血。 尽管原因不同,但青少年心力衰竭的表现与成人相似。常见症状包括呼吸困难、外周水肿、端坐呼吸、咳嗽、喘息和继发于水肿的阵发性夜间呼吸困难,但也可能包括非特异性症状,如疲劳、恶心、厌食或液体潴留导致的体重增加。表现形式差异很大,包括无明显症状、充血性心力衰竭体征,极端情况下表现为心源性休克。同样,体检也可能存在很大差异。如果患者患有代偿性心力衰竭,则可以进行相对良性的检查。</p>
-<p>心力衰竭的一些不易被察觉但高度相关的检查结果包括有:心动过速、心音异常(奔马律、舒张期杂音或病理性收缩期杂音)、呼吸急促和肝肿大。胸部X光片和心电图(ECG)可能显示非特异性发现。胸片可显示心脏肥大伴肺充血。心电图结果通常是非特异性的。 这篇文章对青少年心力衰竭的罕见和常见原因进行了概述。</p>
-<ul>
-<li><a href="/papers/Approach%20to%20Idiopathic%20Anaphylaxis%20in%20Adolescents.pdf">原始文章</a></li>
-</ul>
-<h2 id="其他"><a class="header-anchor" href="#其他">¶</a>其他</h2>
-<p>端坐呼吸或端坐呼吸是平躺时发生的呼吸短促,导致患者不得不支撑在床上或坐在椅子上睡觉。它通常被视为心力衰竭的晚期表现,是由于液体重新分布到中央循环,导致肺毛细血管压力增加并导致呼吸困难所致。它也见于腹部肥胖或肺部疾病的情况。端坐呼吸与平呼吸相反,平呼吸是指坐或站直时呼吸急促会加重。</p>
-]]></content>
- <tags>
- <tag>Medicine</tag>
- </tags>
- </entry>
- <entry>
<title>A Brief History of Just-In-Time</title>
<url>/2023/09/28/A-Brief-History-of-Just-In-Time/</url>
<content><![CDATA[<p>Software systems have been using “just-in-time” compilation (JIT) techniques since the<br>
@@ -204,6 +189,21 @@ such systems. This classification emerges as we survey forty years of JIT work,
</tags>
</entry>
<entry>
+ <title>Adolescent Onset of Acute Heart Failure</title>
+ <url>/2023/11/21/Adolescent-Onset-of-Acute-Heart-Failure/</url>
+ <content><![CDATA[<p>心力衰竭一般是常见于成人的,主要继发于高血压和冠状动脉疾病。 青少年的病因很广泛,包括心肌炎、心肌病、结构性心脏病、营养缺乏、代谢紊乱、高血压危象和心律失常等。在发达国家,先天性心脏病和心肌病是儿童心力衰竭的两大主要原因,而在发展中国家,主要原因包括感染和严重贫血。 尽管原因不同,但青少年心力衰竭的表现与成人相似。常见症状包括呼吸困难、外周水肿、端坐呼吸、咳嗽、喘息和继发于水肿的阵发性夜间呼吸困难,但也可能包括非特异性症状,如疲劳、恶心、厌食或液体潴留导致的体重增加。表现形式差异很大,包括无明显症状、充血性心力衰竭体征,极端情况下表现为心源性休克。同样,体检也可能存在很大差异。如果患者患有代偿性心力衰竭,则可以进行相对良性的检查。</p>
+<p>心力衰竭的一些不易被察觉但高度相关的检查结果包括有:心动过速、心音异常(奔马律、舒张期杂音或病理性收缩期杂音)、呼吸急促和肝肿大。胸部X光片和心电图(ECG)可能显示非特异性发现。胸片可显示心脏肥大伴肺充血。心电图结果通常是非特异性的。 这篇文章对青少年心力衰竭的罕见和常见原因进行了概述。</p>
+<ul>
+<li><a href="/papers/Approach%20to%20Idiopathic%20Anaphylaxis%20in%20Adolescents.pdf">原始文章</a></li>
+</ul>
+<h2 id="其他"><a class="header-anchor" href="#其他">¶</a>其他</h2>
+<p>端坐呼吸或端坐呼吸是平躺时发生的呼吸短促,导致患者不得不支撑在床上或坐在椅子上睡觉。它通常被视为心力衰竭的晚期表现,是由于液体重新分布到中央循环,导致肺毛细血管压力增加并导致呼吸困难所致。它也见于腹部肥胖或肺部疾病的情况。端坐呼吸与平呼吸相反,平呼吸是指坐或站直时呼吸急促会加重。</p>
+]]></content>
+ <tags>
+ <tag>Medicine</tag>
+ </tags>
+ </entry>
+ <entry>
<title>Advanced C binding using ocaml-ctypes and dune</title>
<url>/2024/09/15/Advanced-C-binding-using-ocaml-ctypes-and-dune/</url>
<content><![CDATA[<p>I was working on a OCaml binding for <a href="https://github.com/Haivision/srt">libsrt</a> last summer, to add support for SRT real-time input and output to <a href="https://github.com/savonet/liquidsoap">liquidsoap</a>, and came across the need to access the <code>[sys/socket.h](https://pubs.opengroup.org/onlinepubs/7908799/xns/syssocket.h.html)</code> C API.</p>
@@ -6759,6 +6759,96 @@ NestJS 依赖其底层 HTTP 适配器(默认为 Express)来解析传入的�
</tags>
</entry>
<entry>
+ <title>给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古</title>
+ <url>/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/</url>
+ <content><![CDATA[<p>一台旧笔记本装上 Hermes Agent 之后,就成了 7×24 挂在家庭网络里的常驻服务机。机器继续服役,但&quot;笔记本&quot;这个出厂身份留下的问题需要逐个拆除:拔电半小时自动休眠、合盖掉线、电池永远充到顶。这篇文章记录一次完整的改造过程——大部分是常规配置,最后一段是真正的硬骨头:Linux 下没有现成驱动的 Redmi EC,如何从固件代码里考古出充电上限的寄存器地址,并把 80% 上限真正写进硬件。</p>
+<p>改造对象是 Redmi Book Pro 15 2022,系统 Pop!_OS 24.04,内核 6.18.7。文中所有验证步骤都给出了可复核的证据,文末附完整的脚本清单。</p>
+<h2 id="休眠问题的两个来源:一个在用户会话,一个在系统层"><a class="header-anchor" href="#休眠问题的两个来源:一个在用户会话,一个在系统层">¶</a>休眠问题的两个来源:一个在用户会话,一个在系统层</h2>
+<p>先说结论:这台机器的自动休眠由两套机制叠加控制,只改任何一处都会被另一处重新睡掉。</p>
+<p>第一处在 GNOME。<code>org.gnome.settings-daemon.plugins.power</code> 这组键值把插电和用电池分成两个策略:这台机器出厂默认插电模式 <code>nothing</code>(永不睡),电池模式 <code>suspend</code>(30 分钟无操作就睡)。服务器场景下,这个&quot;电池模式&quot;就是拔电失联的直接原因。禁用只需两条命令:</p>
+<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">gsettings <span class="built_in">set</span> org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type <span class="string">&#x27;nothing&#x27;</span></span><br><span class="line">gsettings <span class="built_in">set</span> org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type <span class="string">&#x27;nothing&#x27;</span></span><br></pre></td></tr></table></figure>
+<p>第二处在 systemd-logind。不处理它,合盖依然会触发 suspend。做法是往 <code>/etc/systemd/logind.conf.d/</code> 放一个drop-in 配置:</p>
+<figure class="highlight ini"><table><tr><td class="code"><pre><span class="line"><span class="section">[Login]</span></span><br><span class="line"><span class="attr">HandleLidSwitch</span>=ignore</span><br><span class="line"><span class="attr">HandleLidSwitchExternalPower</span>=ignore</span><br><span class="line"><span class="attr">HandleLidSwitchDocked</span>=ignore</span><br><span class="line"><span class="attr">AllowSuspend</span>=<span class="literal">no</span></span><br><span class="line"><span class="attr">AllowHibernation</span>=<span class="literal">no</span></span><br></pre></td></tr></table></figure>
+<p><code>AllowSuspend=no</code> 这几行比合盖策略更进一步——它让 suspend/hibernate 这两个电源目标在系统层面不可达。从此无论哪个组件想休眠这台机器,systemd 都会拒绝执行。对服务器而言这是最保险的一层。</p>
+<h2 id="充电上限:配置了两年,从来没生效过"><a class="header-anchor" href="#充电上限:配置了两年,从来没生效过">¶</a>充电上限:配置了两年,从来没生效过</h2>
+<p>机器上一直装着 TLP,配置文件里写得明明白白:</p>
+<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">START_CHARGE_THRESH_BAT0=20</span><br><span class="line">STOP_CHARGE_THRESH_BAT0=80</span><br></pre></td></tr></table></figure>
+<p>但电量依然冲到了 94%(对应衰减后的满充点)。原因在 TLP 的工作方式:它自己不碰硬件,只调用内核提供的接口。Linux 内核标准接口是 <code>/sys/class/power_supply/BAT0/charge_control_end_threshold</code>,TLP 依次尝试三种后端——<code>natacpi</code>(内核 ACPI 驱动直写)、<code>acpi_call</code>(通过第三方模块调用任意 ACPI 方法)、<code>sysfs</code>(上述标准接口)。三种在这台机器上全部缺席:Redmi 没有为自家 EC 提交过任何内核驱动,<code>charge_control_end_threshold</code> 文件不存在,<code>acpi_call</code> 也没有安装。</p>
+<p>TLP 的处理方式是静默降级——配置留着,什么都不做。这解释了&quot;设置了却充到顶&quot;的全部现象。</p>
+<h2 id="从-DSDT-考古:找到-EC-里的充电上限字段"><a class="header-anchor" href="#从-DSDT-考古:找到-EC-里的充电上限字段">¶</a>从 DSDT 考古:找到 EC 里的充电上限字段</h2>
+<p>内核不提供接口,就要自己读固件。ACPI 的 DSDT 表是主板固件的执行代码,用 <code>iasl</code> 反汇编后就是一份可检索的&quot;硬件说明书&quot;:</p>
+<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="built_in">cp</span> /sys/firmware/acpi/tables/DSDT /tmp/probe/</span><br><span class="line">iasl -d /tmp/probe/DSDT.bin</span><br></pre></td></tr></table></figure>
+<p>在反汇编产物里,<code>Device (EC0)</code> 是嵌入式控制器(Embedded Controller,主板上负责电池、键盘、风扇等底层事务的 8 位单片机)。EC 暴露给 ACPI 的字段表以 <code>Field (ERAM…)</code> 开头,逐项列出每个字段的名称和位宽。搜索电池相关的命名,一段关键结构浮现出来:</p>
+<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">Offset (0x80),</span><br><span class="line">ACIN, 1, // AC 已插电</span><br><span class="line">BTIN, 1, // 电池在位</span><br><span class="line">BTST, 4, // 电池状态</span><br><span class="line">ADPW, 8,</span><br><span class="line">BTSN, 16, // 序列号</span><br><span class="line">BTDC, 16, // Design Capacity 设计容量</span><br><span class="line">BTDV, 16, // Design Voltage 设计电压</span><br><span class="line">BTFC, 16, // Full Charge Capacity 满充容量</span><br><span class="line">BTTP, 16,</span><br><span class="line">BTCT, 16, // Cycle Count 循环次数</span><br><span class="line">BTPR, 16, // Present Capacity 当前容量</span><br><span class="line">BTVT, 16, // Voltage 电压</span><br><span class="line">RSOC, 8, // Relative State of Charge 电量百分比</span><br><span class="line">… // 8 个状态位占满一个字节</span><br><span class="line">BTCC, 16, // Charge Cap 充电上限</span><br><span class="line">BATM, 16,</span><br></pre></td></tr></table></figure>
+<p>按 ACPI Field 的位累积规则手工推算,每个字段落在 EC RAM 的具体字节位置:电量百分比 RSOC 在偏移 0x92,充电上限 BTCC 在 0x95-0x96(16 位小端)。这台机器的 EC RAM 通过内存映射窗口 <code>0xFE0B0400</code> 可直接访问。</p>
+<p>推断需要验证。验证方法是交叉比对:把 32 个字节一次性读出来,看各项读数能否和系统已知的数值对上。实际读取结果:</p>
+<table>
+<thead>
+<tr>
+<th>EC 字段</th>
+<th>读数</th>
+<th>系统对照值</th>
+<th>结果</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>RSOC</td>
+<td>89%</td>
+<td>upower 实时 89%(自放电后的实时值)</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTDC</td>
+<td>4664 mAh × 15440 mV = 72.0 Wh</td>
+<td>energy_full_design 72.012 Wh</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTFC</td>
+<td>3939 mAh → 60.8 Wh</td>
+<td>energy_full 60.818 Wh</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTFC/BTDC</td>
+<td>84.5%</td>
+<td>电池健康度 84.455%</td>
+<td>命中</td>
+</tr>
+<tr>
+<td>BTPR/BTFC</td>
+<td>88.9%</td>
+<td>≈ RSOC 89%,内部自洽</td>
+<td>命中</td>
+</tr>
+</tbody>
+</table>
+<p>六项全部命中,偏移表确认无误。这次读取还带来一个意外收获:<strong>循环次数 1196 次</strong>——内核 sysfs 一直报 0,真实数字一直躺在 EC 里。84.5% 的健康度对一千二百次循环来说衰减曲线相当正常,而 80% 上限从现在开始会显著放缓后续衰减。</p>
+<p>验证时 BTCC 读数为 0,即从未有系统写入过它——TLP 静默失效、小米自己的管理软件从未在 Linux 侧运行,这个字段空了两年。</p>
+<h2 id="写入与固化:从一次性验证到开机自启"><a class="header-anchor" href="#写入与固化:从一次性验证到开机自启">¶</a>写入与固化:从一次性验证到开机自启</h2>
+<p>写入本身是对内存映射窗口的 2 字节操作。用 <code>dd</code> 定位到 <code>0xFE0B0495</code>,写入小端编码的 80,读回确认 EC 接受。行为验证更直接:写入时电量 87%,高于上限,状态立即表现为 Discharging(拒绝充电);电量自然回落到 83% 后,状态转为 Charging——EC 正在按&quot;低于 80 才充、充到 80 停&quot;的逻辑工作。</p>
+<p>EC 的值在冷启动后可能复位,所以最后一步是固化:一个 20 行的 shell 脚本(写入 + 最多 5 次读回重试 + 写 syslog),注册成 oneshot 的 systemd 服务,<code>WantedBy=multi-user.target</code>。每次开机自动重写。日志验证一行即可:<code>journalctl -t ec-charge-limit</code>。</p>
+<h2 id="为什么绕了这么多路"><a class="header-anchor" href="#为什么绕了这么多路">¶</a>为什么绕了这么多路</h2>
+<p>这套探索的完整链条值得复盘,因为它演示了一个通用模式:<strong>当厂商不为 Linux 提供驱动时,固件代码是最后的、也是完全可靠的文档</strong>。</p>
+<p>TLP 配置存在但从未生效,说明用户态工具依赖于内核 ABI 的覆盖面。内核接口缺失时,<code>acpi_call</code> 这类&quot;万能调用器&quot;是第一层补救——但它的前提仍是 ACPI 层存在可调用的方法。DSDT 反汇编显示这台机器的 EC 确实声明了 BTCC 字段,但没有任何 AML 代码(ACPI 层的解释执行代码)读写它——小米把充电控制做成了纯 EC 寄存器协议,只有 Windows 侧的私有驱动知道怎么写。这一层是 acpi_call 也救不了的,于是只剩最后一条路:直接读写 EC RAM。</p>
+<p>这已经触及了此类探索的边界。直接写 EC 是有真实风险的操作——这段内存窗口同时被固件本身使用,写错偏移可能影响风扇、键盘背光乃至供电策略。整个过程中风险控制靠三件事:所有写入前先完成只读交叉验证(六个字段全命中才敢写);写入目标收窄到 2 字节;写入后立即读回并观察行为。至于回滚,同样的通道写 100 就能恢复原状。</p>
+<h2 id="交付清单"><a class="header-anchor" href="#交付清单">¶</a>交付清单</h2>
+<p>改造后的最终状态:</p>
+<ul>
+<li>拔电、合盖均不休眠,suspend 目标在 systemd 层全局禁用</li>
+<li>充电到 80% 由 EC 强制执行,不依赖任何用户态进程存活</li>
+<li>开机自动重写上限,冷启动不丢配置</li>
+<li>电池档案:设计 72 Wh,满充 60.8 Wh(健康度 84.5%),循环 1196 次</li>
+</ul>
+<p>完整脚本已归档:<code>setup-server-power.sh</code>(休眠部分)、<code>acpi-probe-battery.sh</code>(DSDT 反汇编 + 只读探测)、<code>ec-verify-readonly.sh</code>(字段交叉验证)、<code>ec-set-charge-limit.sh</code>(写入与行为观察)、<code>power-rollback.sh</code>(一键回滚)。如果你有一台同样&quot;EC 沉默&quot;的笔记本,这套只读验证优先的流程可以直接复用——先证明地址表是对的,再谈写入。</p>
+]]></content>
+ <tags>
+ <tag>Technique</tag>
+ <tag>Linux</tag>
+ </tags>
+ </entry>
+ <entry>
<title>什么玩意儿都是</title>
<url>/2024/09/07/%E7%BB%99%E5%AD%A9%E5%AD%90%E4%BB%AC%E7%9A%84%E8%AF%9D/</url>
<content><![CDATA[<p>那些自古流传至今的至理名言,如无证实都不可信。今天人人称道的真理,明天却有可能被证实为谬论;有些人被这种云山雾罩的谬论遮蔽了双眼,还以为那是会为他们的土地带来甘露的云雨。</p>
diff --git a/tag/index.html b/tag/index.html
index 4c270821..893d3e11 100644
--- a/tag/index.html
+++ b/tag/index.html
@@ -196,6 +196,12 @@
</span>
<span class="post-tag">
+ <a href="/tags/Linux/">
+ Linux
+ </a>
+ </span>
+
+ <span class="post-tag">
<a href="/tags/Music/">
Music
</a>
diff --git a/tags/Linux/index.html b/tags/Linux/index.html
new file mode 100644
index 00000000..b033dfef
--- /dev/null
+++ b/tags/Linux/index.html
@@ -0,0 +1,217 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+<meta http-equiv="X-UA-Compatible" content="ie=edge">
+
+ <meta name="author" content="韩暮秋">
+
+
+ <meta name="subtitle" content="暮秋小屋">
+
+
+ <meta name="description" content="这里是暮秋小屋,思念和灵感的寄存处">
+
+
+ <meta name="keywords" content="韩暮秋,MuqiuHan,'Muqiu Han', 'muqiu han', muqiuhan">
+
+
+
+
+ <title>
+
+ Tag: Linux |
+ 暮秋小屋
+ </title>
+
+
+
+ <link rel="icon" href="/favicon.ico">
+
+
+
+
+ <!-- stylesheets list from _config.yml -->
+
+ <link rel="stylesheet" href="/css/style.css">
+
+
+
+
+ <link rel="preload" href="/fonts/FZYouSongS-509R.woff2" as="font" type="font/woff2" crossorigin>
+
+
+
+ <!-- scripts list from _config.yml -->
+
+ <script
+ src="/js/menu.js"></script>
+
+
+
+
+
+ <script
+ src="https://polyfill.alicdn.com/polyfill.js?features=es6"></script>
+ <script
+ id="MathJax-script"
+ async
+ src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/mathjax/3.2.0/es5/tex-mml-chtml.js"></script>
+
+
+
+
+ <meta name="generator" content="Hexo 6.3.0"></head>
+ <body>
+ <div class="wrapper">
+
+ <div class="header">
+ <div class="flex-container">
+ <div class="header-inner">
+ <div class="site-brand-container">
+ <a href="/">
+
+ 暮秋小屋
+
+ </a>
+ </div>
+ <div id="menu-btn" class="menu-btn" onclick="toggleMenu()">
+ 菜单
+ </div>
+ <nav class="site-nav">
+ <ul class="menu-list">
+
+
+ <li class="menu-item">
+ <a href="/">
+ 主页
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/categories/gallery/">
+ 日记本
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/tags/Medicine/">
+ 泛医学
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/tags/Technique/">
+ 计算机
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/tags/Life/">
+ 生活
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/archives">
+ 全部
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/about">
+ 关于
+ </a>
+ </li>
+
+
+
+ <li class="menu-item">
+ <a href="/search">搜索</a>
+ </li>
+
+ </ul>
+ </nav>
+ </div>
+ </div>
+</div>
+
+
+ <div class="main">
+ <div class="flex-container">
+ <div id="tag">
+
+
+ <p class="tag-title">
+ / <a href="/tag/">tags</a>
+ / <a href="">Linux</a> /
+ </p>
+ <div class="post-list">
+
+
+
+
+
+
+ <div class="year-title">2026</div>
+
+
+ <div class="post-list-item">
+ <div class="post-title">
+ <a href="/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/">
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 29, 2026</span>
+ </div>
+
+
+ <div id="paginator">
+
+ </div>
+</div>
+
+
+
+
+</div>
+ </div>
+ </div>
+
+ <div class="footer">
+ <div class="flex-container">
+ <div class="footer-text">
+
+
+ 韩暮秋 |
+
+
+ 希望路过的人可以添点柴火让这里暖和点
+
+ </div>
+ </div>
+</div>
+
+
+ </div>
+
+ <script src="/js/mermaid-zoom.js"></script>
+
+ </body>
+</html>
diff --git a/tags/Technique/index.html b/tags/Technique/index.html
index 7220c4b9..677c2b4b 100644
--- a/tags/Technique/index.html
+++ b/tags/Technique/index.html
@@ -171,6 +171,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2026/08/29/%E7%BB%99%E4%B8%80%E5%8F%B0Linux%E7%AC%94%E8%AE%B0%E6%9C%AC%E5%81%9A%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8C%96%E6%94%B9%E9%80%A0%EF%BC%9A%E4%BC%91%E7%9C%A0%E3%80%81%E5%85%85%E7%94%B5%E4%B8%8A%E9%99%90%E4%B8%8EEC%E5%AF%84%E5%AD%98%E5%99%A8%E8%80%83%E5%8F%A4/">
+
+ 给一台 Linux 笔记本做服务器化改造:休眠、充电上限与 EC 寄存器考古
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 29, 2026</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2026/08/20/%E9%9B%86%E5%90%88%E8%AE%BA%E7%B1%BB%E5%9E%8B%E4%B8%8E%E6%B8%90%E8%BF%9B%E5%BC%8F%E7%B1%BB%E5%9E%8B%E6%A3%80%E6%9F%A5%EF%BC%9AElixir-%E7%B1%BB%E5%9E%8B%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1%E5%8E%9F%E5%88%99%E8%AF%A6%E8%A7%A3/">
集合论类型与渐进式类型检查:Elixir 类型系统设计原则详解
@@ -328,24 +346,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/08/13/nestjs-enableImplicitConversion-and-transform/">
-
- NestJS 中 enableImplicitConversion 与 @Transform 的冲突
-
- </a>
- </div>
-
- <span class="post-date">Aug 13, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/tags/Technique/page/2/index.html b/tags/Technique/page/2/index.html
index 57535f56..f70f80db 100644
--- a/tags/Technique/page/2/index.html
+++ b/tags/Technique/page/2/index.html
@@ -171,6 +171,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/08/13/nestjs-enableImplicitConversion-and-transform/">
+
+ NestJS 中 enableImplicitConversion 与 @Transform 的冲突
+
+ </a>
+ </div>
+
+ <span class="post-date">Aug 13, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/07/31/svelte-lazyquery/">
使用 Runed intersection observer 与 tanstack query 实现通用的惰性加载组件
@@ -326,24 +344,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/03/30/F-%E9%87%8D%E8%BD%BD%E8%A7%A3%E6%9E%90%E9%97%AE%E9%A2%98/">
-
- F# 重载解析问题
-
- </a>
- </div>
-
- <span class="post-date">Mar 30, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/tags/Technique/page/3/index.html b/tags/Technique/page/3/index.html
index bcbe6deb..13246765 100644
--- a/tags/Technique/page/3/index.html
+++ b/tags/Technique/page/3/index.html
@@ -171,6 +171,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2025/03/30/F-%E9%87%8D%E8%BD%BD%E8%A7%A3%E6%9E%90%E9%97%AE%E9%A2%98/">
+
+ F# 重载解析问题
+
+ </a>
+ </div>
+
+ <span class="post-date">Mar 30, 2025</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2025/03/30/libdecor-gtk-WARNING-Failed-to-initialize-GTK/">
libdecor-gtk-WARNING Failed to initialize GTK in VSCode on Wayland
@@ -326,24 +344,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2025/02/10/%E5%AE%9E%E6%97%B6%E6%90%9C%E7%B4%A2%E4%B8%AD%E7%9A%84%E9%98%B2%E6%8A%96%E5%87%BD%E6%95%B0/">
-
- 实时搜索中的防抖函数
-
- </a>
- </div>
-
- <span class="post-date">Feb 10, 2025</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/tags/Technique/page/4/index.html b/tags/Technique/page/4/index.html
index a9c31eb6..b5935e18 100644
--- a/tags/Technique/page/4/index.html
+++ b/tags/Technique/page/4/index.html
@@ -166,6 +166,26 @@
+ <div class="year-title">2025</div>
+
+
+ <div class="post-list-item">
+ <div class="post-title">
+ <a href="/2025/02/10/%E5%AE%9E%E6%97%B6%E6%90%9C%E7%B4%A2%E4%B8%AD%E7%9A%84%E9%98%B2%E6%8A%96%E5%87%BD%E6%95%B0/">
+
+ 实时搜索中的防抖函数
+
+ </a>
+ </div>
+
+ <span class="post-date">Feb 10, 2025</span>
+ </div>
+
+
+
+
+
+
<div class="year-title">2024</div>
@@ -326,24 +346,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2024/07/01/OCaml-News-2024-4/">
-
- OCaml News 2024-4
-
- </a>
- </div>
-
- <span class="post-date">Jul 1, 2024</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/tags/Technique/page/5/index.html b/tags/Technique/page/5/index.html
index d531adc9..70037ff1 100644
--- a/tags/Technique/page/5/index.html
+++ b/tags/Technique/page/5/index.html
@@ -171,6 +171,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2024/07/01/OCaml-News-2024-4/">
+
+ OCaml News 2024-4
+
+ </a>
+ </div>
+
+ <span class="post-date">Jul 1, 2024</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2024/06/27/OCaml-News-2024-5/">
OCaml News 2024-5
@@ -326,26 +344,6 @@
</div>
-
-
-
-
- <div class="year-title">2023</div>
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/10/21/OCaml-Core-Int-pow-%E7%9A%84%E5%AE%9E%E7%8E%B0/">
-
- OCaml Core.Int.pow 的实现
-
- </a>
- </div>
-
- <span class="post-date">Oct 21, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/tags/Technique/page/6/index.html b/tags/Technique/page/6/index.html
index 2c06b344..9dec8b8f 100644
--- a/tags/Technique/page/6/index.html
+++ b/tags/Technique/page/6/index.html
@@ -171,6 +171,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/10/21/OCaml-Core-Int-pow-%E7%9A%84%E5%AE%9E%E7%8E%B0/">
+
+ OCaml Core.Int.pow 的实现
+
+ </a>
+ </div>
+
+ <span class="post-date">Oct 21, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/10/05/v8%E4%B8%AD%E7%9A%84Number-toString/">
v8中的Number.toString()
@@ -326,24 +344,6 @@
</div>
-
-
-
-
-
- <div class="post-list-item">
- <div class="post-title">
- <a href="/2023/05/02/Rust-Partial-%E8%AF%AD%E4%B9%89/">
-
- Rust Partial 语义
-
- </a>
- </div>
-
- <span class="post-date">May 2, 2023</span>
- </div>
-
-
<div id="paginator">
<div class=paginator>
diff --git a/tags/Technique/page/7/index.html b/tags/Technique/page/7/index.html
index 47765738..cd2d786d 100644
--- a/tags/Technique/page/7/index.html
+++ b/tags/Technique/page/7/index.html
@@ -171,6 +171,24 @@
<div class="post-list-item">
<div class="post-title">
+ <a href="/2023/05/02/Rust-Partial-%E8%AF%AD%E4%B9%89/">
+
+ Rust Partial 语义
+
+ </a>
+ </div>
+
+ <span class="post-date">May 2, 2023</span>
+ </div>
+
+
+
+
+
+
+
+ <div class="post-list-item">
+ <div class="post-title">
<a href="/2023/05/01/Rust-%E8%99%9A%E8%A1%A8%E5%B8%83%E5%B1%80%E8%A7%84%E5%88%99%E4%BB%8B%E7%BB%8D/">
Rust 虚表布局规则介绍