Skip to content

Instantly share code, notes, and snippets.

@brunneis
Last active May 12, 2025 16:05
Show Gist options
  • Save brunneis/0c27411a8028610117fefbe5fb669d10 to your computer and use it in GitHub Desktop.
Save brunneis/0c27411a8028610117fefbe5fb669d10 to your computer and use it in GitHub Desktop.
Proxmox | Fix "e1000e Detected Hardware Unit Hang"
Proxmox Virtual Environment 6.1-3 / Debian 10 (buster)
Kernel 5.3.10-1-pve
Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V (rev 05)
Ethernet driver: e1000e 3.2.6-k
Ethernet firmware: 0.1-4

The solution I've found was to create a oneshot service which disables segmentation offloading.

sudo apt update && apt -y install ethtool

Create the file /usr/lib/systemd/system/fix-e1000e.service with the following content:

[Unit]
Description="Fix for ethernet hang errors"

[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -K NETWORK_INTERFACE tso off gso off

[Install]
After=network-online.target
Wants=network-online.target
systemctl daemon-reload
systemctl enable fix-e1000e
systemctl start fix-e1000e
@fribse
Copy link

fribse commented Sep 30, 2020

Looked good, but when trying it I get:

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.

@MedShake
Copy link

Under [Install] add :
WantedBy=multi-user.target
to fix the error message report by frisbe
(source : https://unix.stackexchange.com/a/339537 )

@CRCinAU
Copy link

CRCinAU commented Jun 28, 2022

It's much cleaner to do this in /etc/network/interfaces as follows:

iface eno1 inet manual
        post-up /usr/bin/logger -p debug -t ifup "Disabling segmentation offload for eno1" && /sbin/ethtool -K $IFACE tso off gso off gro off && /usr/bin/logger -p debug -t ifup "Disabled offload for eno1"

Change eno1 for your ethernet network name.

@mjmccarn
Copy link

mjmccarn commented Apr 3, 2025

Thanks @CRCinAU

I modified your command to

  • use multiple "post-up" lines instead of "&&"
  • use "$IFACE" in the log messages
  • log the actual ethtool command (since I'm sure I'll forget if I ever see this in the logs...)
  • disable offloading for rxvlan and txvlan (since I have vlans configured)
iface eno1 inet manual
	post-up /usr/bin/logger -p debug -t ifup "(post-up) /sbin/ethtool -K $IFACE gso off gro off tso off tx off rx off rxvlan off txvlan off"
	post-up /sbin/ethtool -K $IFACE gso off gro off tso off tx off rx off rxvlan off txvlan off
	post-up /usr/bin/logger -p debug -t ifup "(post-up) Disabled offload for $IFACE"

@ahmetkanar54
Copy link

iface eth0 inet manual
post-up /usr/bin/logger -p debug -t ifup "(post-up) /sbin/ethtool -K $IFACE gso off gro off tso off tx off rx off rxvlan off txvlan off"
post-up /sbin/ethtool -K $IFACE gso off gro off tso off tx off rx off rxvlan off txvlan off
post-up /usr/bin/logger -p debug -t ifup "(post-up) Disabled offload for $IFACE"

-bash: post-up: command not found

What is the solution?

@andrebrait
Copy link

iface eth0 inet manual post-up /usr/bin/logger -p debug -t ifup "(post-up) /sbin/ethtool -K $IFACE gso off gro off tso off tx off rx off rxvlan off txvlan off" post-up /sbin/ethtool -K $IFACE gso off gro off tso off tx off rx off rxvlan off txvlan off post-up /usr/bin/logger -p debug -t ifup "(post-up) Disabled offload for $IFACE"

-bash: post-up: command not found

What is the solution?

Have you added the correct indentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment