<?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[[實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法)]]></title><description><![CDATA[<p dir="auto">這是接續下午的內容<br />
針對P2P實現方法做說明</p>
<h2>P2P 如何建立（安裝流程）</h2>
<blockquote>
<p dir="auto">以下為本機 2026-09-20 實裝軌跡，非理論步驟。來源：aikitoria/open-gpu-kernel-modules（branch <code>615.71.09-p2p</code>，fork 自 tinygrad 的 P2P patch）。<br />
<strong>同代雙卡（我們的 5090×2）只需 patch 後的 kernel module，不需 patch libcuda</strong>；跨代（如 3090+5090）才需 <code>patch-libcuda-p2p.py</code>。</p>
</blockquote>
<h3>前置條件（缺一不可）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>條件</th>
<th>本機做法</th>
<th>驗證</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>兩卡 BAR1 皆 32G</strong></td>
<td>刷 BIOS F6→F8b（AGESA 1.3.0.1b）修掉 GPU1 只 claim 256M 的 per-device ReBAR bug</td>
<td><code>sudo lspci -vvv -s &lt;bdf&gt; \| grep "Region 1"</code> 兩卡皆 <code>size=32G</code></td>
</tr>
<tr>
<td><strong>Secure Boot = Disabled</strong></td>
<td>BIOS 關（自編 module 無憑證，開著會被拒載 <code>Key was rejected by service</code>）</td>
<td><code>mokutil --sb-state</code> → <code>SecureBoot disabled</code></td>
</tr>
<tr>
<td><strong>停 NInfer（12435 紅線）</strong></td>
<td><code>systemctl --user stop ninfer-gpu1-df2.service</code></td>
<td><code>ss -ltnp \| grep 12435</code> 無輸出</td>
</tr>
<tr>
<td><strong>編譯依賴</strong></td>
<td><code>sudo apt install -y dwarves</code>（補 <code>pahole</code>）+ <code>sudo apt install --reinstall linux-headers-$(uname -r)</code>（補 <code>System.map</code>）</td>
<td>—</td>
</tr>
<tr>
<td><strong>iommu=pt</strong>（本機非必需但保留）</td>
<td>GRUB 加 <code>amd_iommu=on iommu=pt</code></td>
<td>重開機後 <code>/proc/cmdline</code> 有、AMD-Vi <code>DMA-FQ→identity</code></td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--warning" style="height:1.4em;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>刷 BIOS 安全警告</strong>：更新後 Secure Boot 會被重置為 Enable，刷完重進 BIOS 必改回 Disable；Windows 機刷前先確認 BitLocker 狀態（變更 UEFI 可能觸發 recovery key 鎖機）。</p>
</blockquote>
<h3>安裝步驟</h3>
<pre><code class="language-bash"># 0) 備份現況
nvidia-smi --query-gpu=driver_version --format=csv &gt; /root/driver-before-$(date +%F).txt
sudo cp /etc/default/grub /etc/default/grub.bak.$(date +%F)

# 1) 卸掉舊驅動（595.91.07）
#    dpkg pattern 用 nvidia.*-595（中間有 -，舊寫法 ^(prefix)595 會抓到 0 個）
#    只碰 driver 套件，不碰 CUDA toolkit

# 2) 裝 615.71.09 userspace（.run)
#    ⚠️ hermes gateway 會封鎖 self-extracting installer，腳本代執行會失敗
#    ⚠️ 615.71.09 已把 --no-opengl-libs 換名成 --no-opengl-files（照舊參數會 unrecognized option）
sudo ~/NVIDIA-Linux-x86_64-615.71.09.run --silent --no-kernel-modules --no-opengl-files --no-x-check --no-nouveau-check

# 3) 抓 patch 源 + 編譯 kernel module
git clone https://github.com/aikitoria/open-gpu-kernel-modules
cd open-gpu-kernel-modules   # branch: 615.71.09-p2p
cd kernel-open
make clean &amp;&amp; make -j$(nproc) &amp;&amp; sudo make modules_install
# ⚠️ 卡關 4：若末行仍 "missing System.map. Skipping depmod"
sudo ln -sf /boot/System.map-$(uname -r) /lib/modules/$(uname -r)/System.map
sudo depmod -a

# 4) iommu=pt（GRUB 改完 update-grub）

# 5) 重開機（讓新 module + iommu=pt 生效）
sudo reboot

# 6) 驗證
nvidia-smi --query-gpu=driver_version --format=csv   # 應 615.71.09
nvidia-smi topo -p2p r                                 # 應 GPU0&lt;-&gt;GPU1 = OK（非 CNS）
./p2pBandwidthLatencyTest                              # 或自編 cudaMemcpy P2P test，看頻寬
</code></pre>
<h3>真正會卡關的 6 個點（本機實測踩到）</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>症狀</th>
<th>解法</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td><code>.run</code> → <code>unrecognized option: --no-opengl-libs</code></td>
<td>615.71.09 換名成 <code>--no-opengl-files</code>；照舊手冊跑前先 <code>--advanced-options</code> 核對當版參數</td>
</tr>
<tr>
<td>1</td>
<td><code>pahole: not found</code> + <code>missing System.map</code> → <code>Driver/library version mismatch</code></td>
<td><code>apt install dwarves</code> + <code>apt install --reinstall linux-headers-$(uname -r)</code></td>
</tr>
<tr>
<td>2</td>
<td><code>modprobe -r nvidia_drm</code> → <code>Module in use</code>（桌面佔用）</td>
<td><code>sudo systemctl isolate multi-user.target</code> 切純文字再 modprobe；或直接 <code>sudo reboot</code>（最乾淨）</td>
</tr>
<tr>
<td>3</td>
<td>重開機後核心沒載入 nvidia module</td>
<td>重裝 <code>linux-headers</code> + <code>linux-image</code>，重編 + <code>depmod -a &amp;&amp; modprobe nvidia</code></td>
</tr>
<tr>
<td>4</td>
<td>編譯成功但仍 <code>missing System.map</code></td>
<td><code>sudo ln -sf /boot/System.map-$(uname -r) /lib/modules/$(uname -r)/System.map</code> + <code>depmod -a</code></td>
</tr>
<tr>
<td>5</td>
<td><code>Key was rejected by service</code>（Secure Boot 擋自編 module）</td>
<td>BIOS 關 Secure Boot；<code>mokutil --sb-state</code> 確認</td>
</tr>
</tbody>
</table>
<blockquote>
<p dir="auto"><strong><code>.ko</code> 實際路徑坑</strong>：本 repo 把 <code>.ko</code> 裝到 <code>/lib/modules/$(KVER)/kernel/drivers/video/</code>（非 <code>updates/</code> 或 <code>extra/</code>），驗證腳本若硬查後兩者會 fail-closed 誤判失敗。</p>
</blockquote>
<h3>驗證結果（本機）</h3>
<ul>
<li><code>nvidia-smi topo -p2p r</code>：<strong>CNS → OK</strong>（雙向）</li>
<li><strong>P2P 頻寬實測：28.46 / 28.47 GB/s</strong>（自編 CUDA <code>cudaMemcpy</code>，128MB×10，NInfer 在 GPU0 跑著的真實負載下）≈ Gen5 x8 理論（~31.5）的 <strong>~90%</strong>，比 CNS 走 host memory（~15-20 GB/s）翻倍</li>
<li><strong>教訓</strong>：P2P 驗收不能只看 <code>topo -p2p r = OK</code>（driver 層回報），要<strong>實測頻寬</strong>；且測試要記下 NInfer 佔哪張卡、是否空閒，數據才可比</li>
<li>回退：<code>nvidia-uninstall</code> + 清未被 dpkg 管理的 <code>.so</code> + 還原 GRUB 備份 + 重裝 595.91.07（<code>p2p-rollback.sh</code>）</li>
</ul>
<hr />
<h2>總結</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>階段</th>
<th>之前</th>
<th>現在</th>
<th>改善</th>
<th>主要貢獻</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Prefill</strong></td>
<td>~1,158 t/s</td>
<td><strong>~2,801 t/s</strong></td>
<td><strong>~2.4×</strong></td>
<td>P2P + NCCL（+ 驅動升級）</td>
</tr>
<tr>
<td><strong>Decode</strong></td>
<td>~48 t/s</td>
<td><strong>~90 t/s</strong></td>
<td><strong>~1.9×</strong></td>
<td>MTP（n-max 7）</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>一句話</strong>：P2P patch 解鎖雙卡 PCIe 直接互連，prefill 從 host bounce 瓶頸脫出；MTP 讓 decode 每步多驗證幾個 token，整體接近翻倍。兩者是<strong>獨立且互補</strong>的優化——P2P 管 prefill，MTP 管 decode。</p>
<hr />
<h2>可重現性與前置</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>組件</th>
<th>來源</th>
<th>備註</th>
</tr>
</thead>
<tbody>
<tr>
<td>P2P 驅動</td>
<td>aikitoria fork（NVIDIA 615.71.09 open kernel module）</td>
<td>需手動編譯；<code>p2p-install.sh</code> / <code>p2p-verify.sh</code> / <code>p2p-rollback.sh</code> 留存</td>
</tr>
<tr>
<td>NCCL shim</td>
<td>自編 NCCL 2.29.7</td>
<td><code>LD_LIBRARY_PATH</code> 指向 shim lib 目錄</td>
</tr>
<tr>
<td>MTP</td>
<td>llama.cpp 原生 <code>--spec-type draft-mtp</code></td>
<td>Qwen3.8 內建 MTP head，無需額外模型</td>
</tr>
<tr>
<td>BIOS</td>
<td>AGESA 1.3.0.1b（F8b）</td>
<td>修 GPU1 BAR1=256M 的 per-device ReBAR bug（兩卡皆需 32G BAR）</td>
</tr>
</tbody>
</table>
]]></description><link>https://lcz.me/topic/1845</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 15:39:12 GMT</lastBuildDate><atom:link href="https://lcz.me/topic/1845.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Sep 2026 15:17:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Wed, 30 Sep 2026 07:40:18 GMT]]></title><description><![CDATA[<p dir="auto">什么样的主板才行？</p>
]]></description><link>https://lcz.me/post/21544</link><guid isPermaLink="true">https://lcz.me/post/21544</guid><dc:creator><![CDATA[johnnybegood]]></dc:creator><pubDate>Wed, 30 Sep 2026 07:40:18 GMT</pubDate></item><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Wed, 30 Sep 2026 07:02:02 GMT]]></title><description><![CDATA[<p dir="auto">皮衣黄：销量有点小下滑？</p>
]]></description><link>https://lcz.me/post/21536</link><guid isPermaLink="true">https://lcz.me/post/21536</guid><dc:creator><![CDATA[stxpnet]]></dc:creator><pubDate>Wed, 30 Sep 2026 07:02:02 GMT</pubDate></item><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Wed, 23 Sep 2026 03:24:16 GMT]]></title><description><![CDATA[<p dir="auto">相当于提高了多卡性能，也就是说... 这是利好，给我接着涨！（抖机灵）<img src="https://lcz.me/assets/plugins/nodebb-plugin-emoji/emoji/android/1f600.png?v=fe25256ab4a" class="not-responsive emoji emoji-android emoji--grinning" style="height:1.4em;width:auto;vertical-align:middle" title=":grinning:" alt="😀" /></p>
]]></description><link>https://lcz.me/post/20204</link><guid isPermaLink="true">https://lcz.me/post/20204</guid><dc:creator><![CDATA[Bunsei]]></dc:creator><pubDate>Wed, 23 Sep 2026 03:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Wed, 23 Sep 2026 03:22:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%E5%BC%A0%E5%85%89%E7%92%9E" aria-label="Profile: 张光璞">@<bdi>张光璞</bdi></a> 就是哦，估计是2028年为6090首发即涨价到10w做准备？</p>
]]></description><link>https://lcz.me/post/20201</link><guid isPermaLink="true">https://lcz.me/post/20201</guid><dc:creator><![CDATA[懒人烘培]]></dc:creator><pubDate>Wed, 23 Sep 2026 03:22:06 GMT</pubDate></item><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Wed, 23 Sep 2026 03:07:47 GMT]]></title><description><![CDATA[<p dir="auto">更新訊息～～～～<br />
這驅動是特規的.....所以系統更新時（我是用ubuntu）可能會把你作的patch蓋掉，所以做系統更新務必注意<br />
必要時請AI幫你作更新前分析!!!!!!!!!!!!!!!!!</p>
]]></description><link>https://lcz.me/post/20200</link><guid isPermaLink="true">https://lcz.me/post/20200</guid><dc:creator><![CDATA[David Chen]]></dc:creator><pubDate>Wed, 23 Sep 2026 03:07:47 GMT</pubDate></item><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Mon, 21 Sep 2026 02:12:19 GMT]]></title><description><![CDATA[<p dir="auto">5090 已经涨到快5万了， 这一波又是神助攻。</p>
<p dir="auto">怕不是老黄的什么阴谋。</p>
]]></description><link>https://lcz.me/post/19640</link><guid isPermaLink="true">https://lcz.me/post/19640</guid><dc:creator><![CDATA[张光璞]]></dc:creator><pubDate>Mon, 21 Sep 2026 02:12:19 GMT</pubDate></item><item><title><![CDATA[Reply to [實測] 開源社群釋出非官方破解版驅動，實現 RTX 5090 P2P 共享記憶體共享(類似nvlnk方法) on Sun, 20 Sep 2026 16:02:35 GMT]]></title><description><![CDATA[<p dir="auto">数据和流程都很扎实，补几点：</p>
<p dir="auto">1）28.46 GB/s 这个数的天花板不是驱动，是平台 lane。5090×2 在 AM5/X670E 上插满两条 x16 槽会自动拆成 x8/x8（CPU 只给 24 lane），Gen5 x8 理论 ~31.5 GB/s，跑到 90% 已经贴顶。这条路径的上限由主板决定，要真正双 x16 得上 WRX90/TRX50 这类平台。</p>
<p dir="auto">2）验收口径对：<code>topo -p2p r</code> 只是 driver 层自报，必须拿 <code>cudaMemcpy</code> / <code>p2pBandwidthLatencyTest</code> 实测。建议再补一个 <code>nccl-tests all_reduce_perf</code>（128MB~1GB），因为 TP 真正吃的是 all-reduce 的 busbw，不是点对点拷贝。</p>
<p dir="auto">3）prefill 2.4× 里掺了「驱动 595→615」这个变量，严格归因的话最好在同一驱动版本下开/关 patch 各测一次，把 P2P 净收益单独摘出来；MTP 的 1.9× decode 是另一条线，分开报是对的。</p>
<p dir="auto">4）安全边界要写清：自编 module + 关 Secure Boot，对单机推理机可以接受，但这台机器别当通用桌面或跑不受信负载；驱动一升级 patch 就失效，回退脚本（<a href="http://p2p-rollback.sh" rel="nofollow ugc">p2p-rollback.sh</a>）要当资产维护。</p>
<p dir="auto">5）跨代（3090+5090）要 patch libcuda 那条路，风险比同代高，不建议在生产机上做。</p>
]]></description><link>https://lcz.me/post/19587</link><guid isPermaLink="true">https://lcz.me/post/19587</guid><dc:creator><![CDATA[Xiaote]]></dc:creator><pubDate>Sun, 20 Sep 2026 16:02:35 GMT</pubDate></item></channel></rss>