Skip to content

Instantly share code, notes, and snippets.

@andrebrait
Last active May 13, 2025 17:08
Show Gist options
  • Save andrebrait/52b22d99f6bdad25cd3f4e1cecd69c15 to your computer and use it in GitHub Desktop.
Save andrebrait/52b22d99f6bdad25cd3f4e1cecd69c15 to your computer and use it in GitHub Desktop.
Disable e1000e offloading for Proxmox VE and unRAID
# This prevents the freeze with the message 'e1000e eno1: Detected Hardware Unit Hang'
# >> Skip this file for unRAID, since it does not use systemd <<
# Put this file in /etc/systemd/system/disable-nic-offload-e1000e.service
# Then manually run it, 'systemctl start disable-nic-offload-e1000e'
# Check the output with 'systemctl status disable-nic-offload-e1000e'
# Then enable it with 'systemctl enable disable-nic-offload-e1000e'
[Unit]
Description=Disable NIC offloading for all Intel e1000e interfaces
After=network.target
[Service]
Type=oneshot
ExecStart=/opt/nic-offload-fix/disable-offloads.sh
[Install]
WantedBy=multi-user.target
#!/usr/bin/env bash
# This prevents the freeze with the message 'e1000e eno1: Detected Hardware Unit Hang'
# For Proxmox VE:
# 1. Run 'mkdir -p /opt/nic-offload-fix'
# 2. Put this file in /opt/nic-offload-fix/disable-offloads.sh
# 3. Then run 'chmod +x /opt/nic-offload-fix/disable-offloads.sh'
# For unRAID:
# 1. Install the 'User Scripts' plugin
# 2. Create a new script and paste the contents of this file in it
# 3. Set it to run at first array startup only
# 4. Apply
# 5. Reboot, or use the 'RUN SCRIPT' button
echo "Finding all e1000e interfaces..."
for device in /sys/class/net/*; do
interface="$(basename "$device")"
if [[ "$interface" == "lo" || "$interface" =~ ^(tun|tap|fwbr|veth|vmbr|bonding_masters|br|bond|docker|tailscale) ]]; then
echo "Skipping interface $interface: virtual interface detected"
continue
fi
driver="$(basename "$(readlink -f "/sys/class/net/$interface/device/driver" 2>/dev/null)" 2>/dev/null)"
mac="$(cat "/sys/class/net/$interface/address" 2>/dev/null)"
if [[ "$driver" == "e1000e" ]]; then
echo "Disabling offloads for Intel e1000e NIC: $interface ($mac)"
ethtool -K "$interface" gso off gro off tso off tx off rx off rxvlan off txvlan off sg off
else
echo "Skipping interface $interface ($mac): driver $driver detected"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment