<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Asus ROG Flow Z13 幻X（Strix Halo）透過 USB4 外接 Gigabyte 5090 Ai Box eGPU，Linux 下 CUDA 運算崩潰— 完整除錯紀錄與技術總結]]></title><description><![CDATA[<h1>Asus ROG Flow Z13（Strix Halo）透過 USB4 外接 RTX 5090 eGPU，Linux 下 CUDA 運算必崩</h1>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>TL;DR（先看這裡）</strong></p>
<ul>
<li><strong>Blackwell（RTX 5090）+ TB4/USB4 eGPU + Linux = 任何 CUDA 運算都會讓整機瞬間斷電。</strong></li>
<li>這是 NVIDIA GSP 韌體 RPC 心跳在隧道延遲下逾時，NVIDIA 尚未修復。</li>
<li>換驅動版本無效。同一組硬體在 Windows 下完全正常。</li>
</ul>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4a1.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--bulb" style="height:23px;width:auto;vertical-align:middle" title="💡" alt="💡" /> <strong>確認方式只要 30 秒：</strong> 接上 → 載入驅動 → 跑任何 CUDA kernel。活著 = 修好了，斷電 = 還沒。</p>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>在那之前，雙開機用 Windows 是完全合理的答案，不是妥協。</strong></p>
</blockquote>
<hr />
<h2>環境</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>項目</th>
<th>規格</th>
</tr>
</thead>
<tbody>
<tr>
<td>主機</td>
<td>Asus ROG Flow Z13 (GZ302EA)</td>
</tr>
<tr>
<td>SoC</td>
<td>AMD Ryzen AI MAX+ 395 (Strix Halo)</td>
</tr>
<tr>
<td>USB4 埠</td>
<td>USB4 40Gbps（PCIe 隧道封裝）</td>
</tr>
<tr>
<td>eGPU</td>
<td>GIGABYTE AORUS RTX 5090 AI BOX (TB5)</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu 26.04 LTS, kernel 7.0.0-14</td>
</tr>
</tbody>
</table>
<hr />
<h2>症狀</h2>
<p dir="auto">GPU 正常初始化、<code>nvidia-smi</code> 閒置時完全正常、模型能載入 VRAM。</p>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f534.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--red_circle" style="height:23px;width:auto;vertical-align:middle" title="🔴" alt="🔴" /> <strong>但任何 CUDA 運算都會讓整機瞬間斷電</strong> —— 無 kernel panic、無 Xid、無 AER、SysRq 無反應，journald 連一行都來不及寫。</p>
</blockquote>
<hr />
<h2>決定性的二分測試</h2>
<p dir="auto">我寫了一支 CUDA 程式把「PCIe 傳輸」與「GPU 運算」分開：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>測試</th>
<th>結果</th>
</tr>
</thead>
<tbody>
<tr>
<td>PCIe 傳輸 150 GB 來回（64 MiB → 4 GiB 五級）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> 全數存活，實測 0.78 GB/s</td>
</tr>
<tr>
<td>GPU 運算核心</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 立即整機斷電，無一次例外</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4a1.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--bulb" style="height:23px;width:auto;vertical-align:middle" title="💡" alt="💡" /> <strong>傳輸沒問題，運算必死。</strong> 這一刀切下去，後面所有的猜測都可以停止。</p>
</blockquote>
<hr />
<h2>已排除的假設（每項都有實測數據）</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>假設</th>
<th>排除依據</th>
</tr>
</thead>
<tbody>
<tr>
<td>記憶體不足 / OOM</td>
<td>崩潰時 available 120 GiB</td>
</tr>
<tr>
<td>與 iGPU 模型共存衝突</td>
<td>主模型未執行仍崩潰</td>
</tr>
<tr>
<td>amdgpu SVM 分頁風暴</td>
<td>相關 kernel worker 計數全程 0</td>
</tr>
<tr>
<td>eGPU 盒經 USB4 反向供電</td>
<td>主機使用自己的充電器</td>
</tr>
<tr>
<td>顯卡功耗尖峰</td>
<td>崩潰時僅 85W（上限 575W）</td>
</tr>
<tr>
<td>PCIe 錯誤 / 掉線</td>
<td>無 AER、無 Xid、無 Link Down</td>
</tr>
<tr>
<td>過熱</td>
<td>GPU 43°C</td>
</tr>
<tr>
<td>DRAM-less SSD (HMB)</td>
<td>零 NVMe 錯誤</td>
</tr>
</tbody>
</table>
<hr />
<h2>真正的原因</h2>
<p dir="auto">這是 NVIDIA 的<strong>已知且未修復</strong>問題：</p>
<ul>
<li><a href="https://github.com/NVIDIA/open-gpu-kernel-modules/issues/979" rel="nofollow ugc">open-gpu-kernel-modules issue #979</a></li>
<li><a href="https://forums.developer.nvidia.com/t/rtx-5060-ti-egpu-aorus-ai-box-cuda-hard-lock-on-linux-via-thunderbolt-4/365386" rel="nofollow ugc">NVIDIA 論壇：AORUS AI BOX CUDA hard-lock</a></li>
</ul>
<p dir="auto">核心錯誤：</p>
<pre><code>GPU1 _kgspRpcRecvPoll: LibOS heartbeat timed out
kgspInitRm_IMPL: SET_GUEST_SYSTEM_INFO failed
</code></pre>
<p dir="auto">Blackwell 把大量工作交給 GPU 上的 <strong>GSP 韌體</strong>，主機與 GSP 之間靠 RPC 溝通並有心跳逾時。</p>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f534.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--red_circle" style="height:23px;width:auto;vertical-align:middle" title="🔴" alt="🔴" /> <strong>透過 TB4/USB4 隧道時延遲過高 → 心跳逾時 → 硬鎖。</strong></p>
</blockquote>
<p dir="auto">上游歸納的模式：<strong>TB5 主機正常，TB4/USB4 主機必崩。</strong></p>
<p dir="auto">Z13 的埠是 USB4 40Gbps，AORUS 盒是 TB5 —— 協商後降為 USB4，正中此模式。</p>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4a1.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--bulb" style="height:23px;width:auto;vertical-align:middle" title="💡" alt="💡" /> <strong>這也解釋了為什麼同一組硬體在 Windows 下可以正常推論：驅動架構不同，沒有這條 RPC 路徑。</strong></p>
</blockquote>
<hr />
<h2>試過但無效的所有方法</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>嘗試</th>
<th>結果</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>nvidia-driver-595-open</code></td>
<td>崩潰</td>
</tr>
<tr>
<td><code>nvidia-driver-595</code>（專有版）</td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> <strong>無法使用</strong> —— GB202 強制要求 open kernel modules</td>
</tr>
<tr>
<td><code>nvidia-driver-610-open</code>（論壇唯一有成功先例）</td>
<td>崩潰 ×2</td>
</tr>
<tr>
<td><code>pcie_ports=native pcie_aspm=off pcie_port_pm=off</code></td>
<td>無效</td>
</tr>
<tr>
<td><code>pci=assign-busses,realloc,hpmmiosize=...</code></td>
<td><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> <strong>弄壞了 iGPU</strong></td>
</tr>
<tr>
<td>換 USB4 埠</td>
<td>PCIe 鏈路改善，仍崩潰</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>坑：<code>pci=assign-busses</code> 會重新編號整台機器的 PCI 匯流排</strong></p>
<p dir="auto">從 eGPU 論壇抄了一組核心參數一次全加，結果：</p>
<pre><code>iGPU 位址 c4:00.0 → 06:00.0
amdgpu 載入了但綁不上去
rocminfo 找不到 gfx1151
GTT 消失
</code></pre>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f534.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--red_circle" style="height:23px;width:auto;vertical-align:middle" title="🔴" alt="🔴" /> <strong>在一台整個 LLM 部署都靠 iGPU 的機器上，我把 iGPU 弄壞了。</strong></p>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>教訓：PCIe 參數要一次只加一個，每次都驗證既有裝置仍正常。</strong></p>
</blockquote>
<hr />
<h2>附帶發現</h2>
<h3>USB4 埠的選擇會影響 PCIe 鏈路</h3>
<p dir="auto">Z13 有兩個 USB4 埠，對應不同橋接器，鏈路品質差很多：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>埠</th>
<th>下游鏈路</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>00:01.2</code></td>
<td>2.5 GT/s (Gen1)</td>
</tr>
<tr>
<td><code>00:01.1</code></td>
<td>16.0 GT/s x4 (Gen4)</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4a1.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--bulb" style="height:23px;width:auto;vertical-align:middle" title="💡" alt="💡" /> <strong>同一台機器、同一條線、同一個盒子，換個孔差 6 倍。</strong></p>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> <strong>如果你的 eGPU 慢得莫名其妙，先試另一個埠。</strong></p>
</blockquote>
<h3>每次硬鎖後，eGPU 盒必須實體斷電</h3>
<p dir="auto">單純重開機救不回來。未斷電就重開時：</p>
<pre><code>nvidia-smi          → 讀得到基本資訊
cudaSetDevice()     → CUDA-capable device(s) is/are busy or unavailable
                    → 而且一試就再次弄掛驅動
</code></pre>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>驅動卡死後不要重複執行 <code>nvidia-smi</code></strong> —— 每次都會多一個 D state 且 <code>kill -9</code> 無效的進程，<code>nvidia_uvm</code> 引用計數只增不減。</p>
</blockquote>
<hr />
<h2><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> 給後來者的建議</h2>
<p dir="auto"><strong>如果你想用 Strix Halo + USB4 + RTX 5090：</strong></p>
<ul>
<li><strong>Windows 側：</strong> <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /> 正常可用，沒問題。</li>
<li><strong>Linux 側：</strong> <img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--x" style="height:23px;width:auto;vertical-align:middle" title="❌" alt="❌" /> 目前（2026-08）任何 CUDA 運算必崩，NVIDIA 尚未修復。</li>
<li><strong>確認方式只要 30 秒：</strong> 接上 → 載入驅動 → 跑任何 CUDA kernel。活著 = 修好了，斷電 = 還沒。</li>
<li><strong>在那之前，雙開機用 Windows 是完全合理的答案，不是妥協。</strong></li>
</ul>
<p dir="auto"><strong>如果你要在 Z13 上玩 eGPU（不管用不用 AI）：</strong></p>
<ul>
<li>兩個 USB4 埠鏈路品質差 6 倍，務必接 <code>00:01.1</code> 那側（16 GT/s x4）。</li>
<li>PCIe 核心參數要<strong>一次只加一個</strong>，不要一次全加。</li>
<li>每次硬鎖後，<strong>實體斷電 eGPU 盒再重開</strong>。</li>
<li>驅動卡死後<strong>不要重複執行 <code>nvidia-smi</code></strong>。</li>
</ul>
]]></description><link>https://lcz.me/topic/1009</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 19:27:09 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1009.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Aug 2026 07:19:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Asus ROG Flow Z13 幻X（Strix Halo）透過 USB4 外接 Gigabyte 5090 Ai Box eGPU，Linux 下 CUDA 運算崩潰— 完整除錯紀錄與技術總結 on Mon, 03 Aug 2026 07:27:52 GMT]]></title><description><![CDATA[<p dir="auto">非常好的分享，发帖格式规整，高亮到位，问题阐述的非常清晰，用心了。</p>
<p dir="auto">其实显卡坞的事，也就是EGPU纯粹是玄学，A卡和N卡，雷电3 4， Oculink我都用过，Oclink要好点，N卡要好点。但也是各种问题。要能补充点实拍图就好了，不然大片表格容易被谷歌判定为垃圾内容，网站已经被丢入沙盒了。<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f622.png?v=2fb7360d8c6" class="not-responsive emoji emoji-android emoji--cry" style="height:23px;width:auto;vertical-align:middle" title="😢" alt="😢" /></p>
]]></description><link>https://lcz.me/post/11293</link><guid isPermaLink="true">https://lcz.me/post/11293</guid><dc:creator><![CDATA[terry]]></dc:creator><pubDate>Mon, 03 Aug 2026 07:27:52 GMT</pubDate></item></channel></rss>