Every few days, the Debian 13 network interface of my homelab would mysteriously hang. When the network dies, I don’t have remote access, will require a local action.
The log shows the network module hangs. All services are running properly. Just no network access.
root@home:~# journalctl -k -f
Jul 25 22:22:10 home kernel: e1000e 0000:00:1f.6 nic0: Detected Hardware Unit Hang: TDH <c3>
TDT <d6>
next_to_use <d6>
next_to_clean <c2>
buffer_info[next_to_clean]:
time_stamp <1b2f434df>
next_to_watch <c3>
jiffies <1b4108200> next_to_watch.status <0> MAC Status <40080083>
PHY Status <796d> PHY 1000BASE-T Status <3800>
PHY Extended Status <3000>
PCI Status <10>
Jul 25 22:22:12 home kernel: e1000e 0000:00:1f.6 nic0: Detected Hardware Unit Hang: TDH <c3>
TDT <d6>
next_to_use <d6>
next_to_clean <c2>
buffer_info[next_to_clean]:
time_stamp <1b2f434df>
next_to_watch <c3>
jiffies <1b41089c0>
next_to_watch.status <0>
MAC Status <40080083>
PHY Status <796d>
PHY 1000BASE-T Status <3800>
PHY Extended Status <3000>
PCI Status <10>
<snip>
Jul 25 22:22:18 home kernel: e1000e 0000:00:1f.6 nic0: Detected Hardware Unit Hang: TDH <c3>
TDT <d6>
next_to_use <d6>
next_to_clean <c2>
buffer_info[next_to_clean]:
time_stamp <1b2f434df>
next_to_watch <c3>
jiffies <1b410a140>
next_to_watch.status <0>
MAC Status <40080083>
PHY Status <796d>
PHY 1000BASE-T Status <3800>
PHY Extended Status <3000>
PCI Status <10>
Jul 25 22:22:20 home kernel: e1000e 0000:00:1f.6 nic0: NIC Link is Down
Jul 25 22:22:20 home kernel: vmbr0: port 1(nic0) entered disabled state
Jul 25 22:22:25 home kernel: e1000e 0000:00:1f.6 nic0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Jul 25 22:22:25 fjulhome kernel: vmbr0: port 1(nic0) entered blocking state Jul 25 22:22:25 home kernel: vmbr0: port 1(nic0) entered forwarding state ^C
root@home:~#
The only resolution to the network hang is to unplug the network cable and plug it back.
I tried changing the network cable, turning off EEE and ASPM, there was no success. There were numerous Reddit posts about the e1000 network card unable to perform TCP offloading. This is a very common network chip found in lots of hardware including my Lenovo TinyPC. The next natural step is to try disabling offloading.
ethtool -K nic0 tso off
ethtool -K nic0 gso off
ethtool -K nic0 gro off
The outcome was good. It lasted for a week without any problems. To disable the offloading permanently, create a service.
sudo nano /etc/systemd/system/tcp-offload.service
Inside the file tcp-offload.service put the following text.
[Unit]
Description=Disable TCP Offload Settings
After=network.target
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -K eth0 tso off gso off gro off
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Restart the service.
sudo systemctl daemon-reload
sudo systemctl enable --now tcp-offload.service
