<?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[UEFI imaging slow (~1.2 GB&#x2F;min) on Realtek RTL8168h (rev 15) - r8169 CSI fallback - possible regression from r8169 switch?]]></title><description><![CDATA[<p dir="auto">Hi guys,</p>
<p dir="auto">Issue seemingly with a certain NIC type on some of our kit we’ve noticed for a while but only just been able to investigate fully. Wondering if anyone else has this issue with a similar</p>
<p dir="auto">FOG Version: 1.5.10.2149<br />
FOS Kernel: 6.18.38<br />
Init Version: 20260804<br />
Server OS: Ubuntu (master + 2 x storage nodes)<br />
Client Hardware: Dell OptiPlex 3070</p>
<p dir="auto"><strong>ISSUE</strong> UEFI image deployments run at around 1.2 GB/min (~100 Mbps) on Dell OptiPlex 3070 machines. Legacy/BIOS deployments on the same hardware and infrastructure run at 6-10 GB/min as expected. UEFI uploads (capture) are also fast at ~15 GB/min so the issue is specific to UEFI downloads only.</p>
<p dir="auto"><strong>THINGS ALREADY RULED OUT</strong>:</p>
<ul>
<li>Patch lead (swapped, no difference)</li>
<li>Image compression (tested ZSTD and Partclone, identical speed)</li>
<li>RAID vs AHCI (no difference)</li>
<li>Storage node (tested all 3 nodes, same result)</li>
<li>Dell BIOS (already on latest v1.35)</li>
<li>iPXE boot file (tested ipxe.efi and snponly.efi, no difference)</li>
<li>Kernel arg r8169.aspm=0 (no difference)</li>
<li>Link speed (confirmed 1000Mb/s Full Duplex via ethtool)</li>
</ul>
<p dir="auto"><strong>ROOT CAUSE IDENTIFIED</strong> lspci in a FOG debug task on the affected 3070 shows: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15) dmesg | grep r816 shows: r8169 0000:01:00.0 eth0: RTL8168h/8111h r8169 0000:01:00.0 eth0: jumbo frames [frames: 9194 bytes, tx checksumming: ko] r8169 0000:01:00.0 enp1s0: No native access to PCI extended config space, falling back to CSI r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control off The key issues are tx checksumming: ko and the CSI fallback, both known performance problems with the r8169 driver on RTL8168h rev 15 chips.</p>
<p dir="auto"><strong>SUSPECTED CAUSE</strong> I noticed this recent commit in the FOS repo: Switch x64/arm64 kernels to in-kernel r8169 for RTL8168/8125/8126 I believe this switch from r8168 to r8169 may have introduced the regression. This is documented in Debian Bug #1110193 (filed July 2025): <a href="https://bugs.debian.org/1110193" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugs.debian.org/1110193</a> The reporter has identical lspci output and the same Rx-only slowdown, resolved by installing r8168-dkms.</p>
<p dir="auto"><strong>WORKAROUND</strong> Booting in Legacy/BIOS mode for imaging works but is not practical long term.</p>
<p dir="auto"><strong>REQUEST</strong> Would it be possible to revert the r8169 switch for RTL8168h rev 15 chips or provide an experimental kernel build with r8168 re-enabled? Happy to test any experimental builds and report back. r8168 driver code is already in the FOS repo at: <a href="https://github.com/FOGProject/fos/tree/master/KernelPackages/drivers/net/ethernet/realtek" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/FOGProject/fos/tree/master/KernelPackages/drivers/net/ethernet/realtek</a></p>
<p dir="auto">Thanks in advance guys.</p>
]]></description><link>http://forums.fogproject.org/topic/18212/uefi-imaging-slow-1-2-gb-min-on-realtek-rtl8168h-rev-15-r8169-csi-fallback-possible-regression-from-r8169-switch</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 14:10:54 GMT</lastBuildDate><atom:link href="http://forums.fogproject.org/topic/18212.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Aug 2026 09:34:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UEFI imaging slow (~1.2 GB&#x2F;min) on Realtek RTL8168h (rev 15) - r8169 CSI fallback - possible regression from r8169 switch? on Wed, 05 Aug 2026 12:38:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="http://forums.fogproject.org/uid/48556">@rpycroft</a> Thank you for the writeup. The elimination you did up front — cables,<br />
link speed, compression, RAID vs AHCI, all three storage nodes, BIOS, iPXE<br />
files — saved me a lot of guessing, and the commit you linked is the right one.</p>
<p dir="auto">You’re right that it’s the r8169 switch, but not quite in the way it looks.<br />
The in-kernel driver isn’t worse than the vendor one here. It exposed something<br />
we’d had broken for nine years without knowing.</p>
<p dir="auto">Two kernel options that are on by default upstream have been off in the FOS<br />
kernel config since 2016:</p>
<pre><code># CONFIG_PCIEASPM is not set
# CONFIG_PCI_MMCONFIG is not set
</code></pre>
<p dir="auto">ASPM is PCIe link power management — it lets the link drop into a low power<br />
state when idle and wake when there’s traffic. Waking up is the expensive part.</p>
<p dir="auto">Nobody noticed for nine years because the Realtek vendor drivers we used to<br />
ship handled ASPM themselves. Our r8168 build had dynamic ASPM compiled in,<br />
which effectively switched ASPM off any time packets were moving. It didn’t<br />
matter that the kernel couldn’t manage it, because the driver never asked the<br />
kernel to.</p>
<p dir="auto">r8169 does it the normal way: it asks the PCI core to disable L1 once, when the<br />
card is probed. That’s where this bites. With CONFIG_PCIEASPM off, the function<br />
it calls isn’t a function at all — it’s a stub that returns “success” without<br />
doing anything. So r8169 is told the OS disabled L1, marks ASPM as being under<br />
OS control, and then goes on to <em>enable</em> ASPM and L1.2 on the card — on a<br />
kernel with no ASPM code in it that disabled nothing. Not one line in the logs<br />
to say so.</p>
<p dir="auto">That “falling back to CSI” line you included is the second option. Without<br />
CONFIG_PCI_MMCONFIG the kernel only sees the first 256 bytes of each device’s<br />
config space, and the registers controlling the L1 sub-states live past that.<br />
So even a kernel that wanted to fix this couldn’t reach them. Including that<br />
line is what let me tie the two together, so thank you for pasting it.</p>
<p dir="auto">That also explains the two things in your report that looked strangest:</p>
<p dir="auto">Why UEFI and not legacy — ASPM is programmed by the firmware, and Dell’s UEFI<br />
path turns L1 on where the legacy/CSM path leaves it off. Our kernel couldn’t<br />
change it either way, so whatever the firmware picked stuck. Legacy was never<br />
actually faster; you were getting a machine where ASPM was already off.</p>
<p dir="auto">Why deploys and not captures — a deploy is your client <em>receiving</em>. The link<br />
goes quiet between bursts from the server, drops into L1.2, and pays the wake<br />
cost over and over. A capture is the client <em>sending</em>, which keeps the link<br />
busy so it never gets the chance to sleep. That’s your 15 GB/min upload sitting<br />
next to a 1.2 GB/min download on the same cable.</p>
<p dir="auto">Worth saying before anyone suggests it: adding pcie_aspm=off to the kernel<br />
arguments does nothing on a FOS kernel. The code registering that argument is<br />
inside the same #ifdef, so it’s compiled out too. It would look like you tried<br />
the standard fix and it didn’t help.</p>
<p dir="auto">I’ve built you an experimental x64 kernel with both options turned back on:</p>
<pre><code>https://github.com/FOGProject/fos/releases/tag/EXP_20260805-123232

sha256  6fadc7204889bc76fe943520319044940c24654365a523d5df7adf8327a88d25
</code></pre>
<p dir="auto">It’s the kernel only — your init is untouched and doesn’t need changing. Back<br />
up your current /var/www/html/fog/service/ipxe/bzImage, drop this one in its<br />
place, and deploy to one of the 3070s. Putting the old file back is the whole<br />
rollback if it doesn’t help.</p>
<p dir="auto">If you want to confirm the diagnosis yourself first, it takes about a minute<br />
and doesn’t need my kernel at all. Boot a 3070 to a shell in debug mode:</p>
<pre><code>lspci -nn | grep -i ethernet     # note the Realtek address, e.g. 02:00.0
lspci -t                         # note the root port above it, e.g. 00:1c.5

setpci -s 02:00.0 CAP_EXP+10.w
setpci -s 00:1c.5 CAP_EXP+10.w
</code></pre>
<p dir="auto">The bottom two bits of each value are the ASPM setting — 0 is off, 2 is L1,<br />
3 is L0s+L1. Run it once booted UEFI and once booted legacy. If I have this<br />
right, UEFI shows a 2 or a 3 and legacy shows a 0.</p>
<p dir="auto">And to watch it fix itself, clear both (root port first) and rerun the deploy<br />
without rebooting:</p>
<pre><code>setpci -s 00:1c.5 CAP_EXP+10.w=0000
setpci -s 02:00.0 CAP_EXP+10.w=0000
</code></pre>
<p dir="auto">That’s not a fix you can keep — it’s gone on the next boot — but if the speed<br />
jumps back to 6-10 GB/min, that confirms it before you swap any files.</p>
<p dir="auto">One loose end: could you post the raw output of <code>ethtool -k &lt;interface&gt;</code>? You<br />
mentioned tx checksumming being off and I want to be sure I’m not waving away a<br />
second, separate problem. It shouldn’t be able to cause a download-only<br />
slowdown, but I’d rather look than assume.</p>
<p dir="auto">Thanks for the report and for offering to test — I’m taking you up on it.</p>
]]></description><link>http://forums.fogproject.org/post/158446</link><guid isPermaLink="true">http://forums.fogproject.org/post/158446</guid><dc:creator><![CDATA[Tom Elliott]]></dc:creator><pubDate>Wed, 05 Aug 2026 12:38:20 GMT</pubDate></item></channel></rss>