Skip to content

Instantly share code, notes, and snippets.

@amit177
Last active November 22, 2023 09:57
Show Gist options
  • Save amit177/63c86ee05110091f6fdda4c87a4209d0 to your computer and use it in GitHub Desktop.
Save amit177/63c86ee05110091f6fdda4c87a4209d0 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 e1000e - Reset adapter unexpectedly FIX

This guide will help you fix Ubuntu 20.04 TCP packet drops on high load with the intel e1000e driver.

Use at your own risk, I do not take any responsibility if your stuff breaks. BACKUP YOUR DATA BEFORE!

Prerequisites

To confirm this issue happens to you, look for the message Reset adapter unexpectedly in /var/log/dmesg: Use the command cat /var/log/dmesg | grep "Reset adapter unexpectedly"

If no messages show up, do the command again once you notice huge packet loss, if still nothing shows up - you're having a different issue.

If messages do show up, it means you are most likely having the same issue, or a physical issue with the network cable connected to the machine.

To confirm you are using the driver e1000e use sudo ethtool -i INTERFACE_NAME, you may need to install ethtool: sudo apt install ethtool.

Example output:

driver: e1000e
version: 3.2.6-k
firmware-version: 0.4-4

Now, after confirming that you are using the same driver and having the same issue, install the 'lspci' command: sudo apt install pciutils

Get the model of your network interface: lspci | grep Ethernet

Example output: 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)

Before continuing, open the driver website and validate the following:

  1. Your e1000e version (from the ethtool command, ex version: 3.2.6-k) is not the latest version shown on the website (aka you're not using the latest version)
  2. Your network interface model (from the lspci command, ex I219-LM) is listed in the supported interfaces list

e1000e Installation

After verifying said things, start the installation:

  1. Install dependencies:
sudo apt install build-essential tar linux-headers-`uname -r`
  1. Download the driver source from https://downloadcenter.intel.com/download/15817

  2. Extract the driver source: tar -xzvf e1000e-VERSION.tar.gz

  3. Compile: cd e1000e-VERSION/src && sudo make install

Make sure there are no errors before continuing to the next step

  1. Load the updated driver version: sudo rmmod e1000e; sudo modprobe e1000e

Note that your connection might drop for a few seconds! If the connection does not come back, it means that the update failed, you should reboot the server and rollback to an older version of the driver.

  1. Confirm that the update was successful: sudo ethtool -i INTERFACE_NAME (check that the version field was updated)

If it didn't, do not continue!

  1. Make a backup of your old initramfs image: cp /boot/initrd-$(uname -r).img{,.bck}

  2. Rebuild a new initramfs image with the updated driver: update-initramfs -u

  3. Reboot the system

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