Ubuntu 18.04 add e1000e Intel driver to dkms

Note: The compile process appears to be broken for driver version 3.8.4. So the following steps will not work for that version. This post will be updated when a suitable fix is found for the same.

Here’s a quick guide on how to add the Intel e1000e driver to DKMS (Dynamic Kernel Module Support) so that it gets installed / uninstalled automatically with future kernel updates and removals.

Download the driver from Intel website https://downloadcenter.intel.com/download/15817

As of my writing this article, the e1000e version is 3.4.2.1. On download the tarball I get e1000e-3.4.2.1.tar.gz.

Extract it to /usr/src:

tar -xzf e1000e-3.4.2.1.tar.gz -C /usr/src

Create a dkms.conf in /usr/src/e1000e-3.4.2.1 with following contents:

PACKAGE_NAME="e1000e"
PACKAGE_VERSION="3.4.2.1"
AUTOINSTALL=yes
MAKE[0]="make -C src/"
BUILT_MODULE_NAME="e1000e"
BUILT_MODULE_LOCATION="src/"
DEST_MODULE_LOCATION="/kernel/drivers/net/ethernet/intel/e1000e"

Next, we have to tell DKMS that such a module has been added and build it for each of the kernels we have on the system:

dkms add -m e1000e/3.4.2.1
for k in /boot/vmlinuz*; do
  dkms install -k ${k##*vmlinuz-} e1000e/3.4.2.1
done

Finally, reboot the system and the new module should be live.

18 Comments on “Ubuntu 18.04 add e1000e Intel driver to dkms”

    • when I try to do the dkms install step, I get:
      for k in /boot/vmlinuz*; do dkms install -k ${k##*vmlinuz-} e1000e/3.8.4; done

      Kernel preparation unnecessary for this kernel. Skipping…

      Building module:
      cleaning build area…(bad exit status: 2)
      make -j4 KERNELRELEASE=5.4.0-47-generic -C src/…(bad exit status: 2)
      ERROR (dkms apport): binary package for e1000e: 3.8.4 not found
      Error! Bad return status for module build on kernel: 5.4.0-47-generic (x86_64)
      Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.

      Kernel preparation unnecessary for this kernel. Skipping…

      Building module:
      cleaning build area…(bad exit status: 2)
      make -j4 KERNELRELEASE=5.4.0-48-generic -C src/…(bad exit status: 2)
      ERROR (dkms apport): binary package for e1000e: 3.8.4 not found
      Error! Bad return status for module build on kernel: 5.4.0-48-generic (x86_64)
      Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.

      then the log:

      DKMS make.log for e1000e-3.8.4 for kernel 5.4.0-48-generic (x86_64)
      Sun Sep 27 10:17:44 PDT 2020
      make: Entering directory ‘/var/lib/dkms/e1000e/3.8.4/build/src’
      make: *** No targets. Stop.
      make: Leaving directory ‘/var/lib/dkms/e1000e/3.8.4/build/src’

      Like

      • It appears you did not execute the dkms add command that you have run before dkms install?

        I just checked the 3.8.4 driver structure (though did not try installing it), it is the same as earlier so there should be no change in steps.

        Like

    • I ran:
      dkms add -m e1000e/3.8.4
      then
      for k in /boot/vmlinuz*; do dkms install -k ${k##*vmlinuz-} e1000e/3.8.4; done
      and I’m running as root (sudo bash)
      and here’s my dkms.conf file:
      cat /usr/src/e1000e-3.8.4/dkms.conf
      PACKAGE_NAME=”e1000e”
      PACKAGE_VERSION=”3.8.4″
      AUTOINSTALL=yes
      MAKE[0]=”make -C src/”
      BUILT_MODULE_NAME=”e1000e”
      BUILT_MODULE_LOCATION=”src/”
      DEST_MODULE_LOCATION=”/kernel/drivers/net/ethernet/intel/e1000e”

      Like

      • Ok it seems there is indeed some issue. I’ll update the post once I’m able to fix it.

        Like

  1. Hello, thanks for tutorial…

    Actually I’m trying to install the last step and getting failed with the command:

    Could you help me please?

    Error! DKMS tree already contains: e1000e-3.8.4
    You cannot add the same module/version combo more than once.
    
    Kernel preparation unnecessary for this kernel.  Skipping...
    
    Building module:
    cleaning build area...(bad exit status: 2)
    make -j8 KERNELRELEASE=5.4.0-48-generic -C src/...(bad exit status: 2)
    Error! Bad return status for module build on kernel: 5.4.0-48-generic (boot/vmlinuz)
    Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.
    
    Kernel preparation unnecessary for this kernel.  Skipping...
    
    Building module:
    cleaning build area...(bad exit status: 2)
    make -j8 KERNELRELEASE=5.4.0-26-generic -C src/...(bad exit status: 2)
    Error! Bad return status for module build on kernel: 5.4.0-26-generic (x86_64)
    Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.
    
    Kernel preparation unnecessary for this kernel.  Skipping...
    
    Building module:
    cleaning build area...(bad exit status: 2)
    make -j8 KERNELRELEASE=5.4.0-48-generic -C src/...(bad exit status: 2)
    Error! Bad return status for module build on kernel: 5.4.0-48-generic (x86_64)
    Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.
    
    Kernel preparation unnecessary for this kernel.  Skipping...
    
    Building module:
    cleaning build area...(bad exit status: 2)
    make -j8 KERNELRELEASE=5.4.0-48-generic -C src/...(bad exit status: 2)
    Error! Bad return status for module build on kernel: 5.4.0-48-generic (boot/vmlinuz.old)
    Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.
    

    Like

    • Hi Erick,

      Something has changed with the driver and I haven’t been able to dig into the build process yet to fix it. Few days ago another visitor Jerry has posted same issue.

      Like

  2. Hi
    thank you for instructions, but I got the same error as above:
    root@xxx:/usr/src/e1000e-3.8.4/src# for k in /boot/vmlinuz*; do dkms install -k ${k##*vmlinuz-} e1000e/3.8.4; done


    Kernel preparation unnecessary for this kernel. Skipping…

    Building module:
    cleaning build area…(bad exit status: 2)
    make -j4 KERNELRELEASE=5.4.0-52-generic -C src/…(bad exit status: 2)
    ERROR (dkms apport): binary package for e1000e: 3.8.4 not found
    Error! Bad return status for module build on kernel: 5.4.0-52-generic (x86_64)
    Consult /var/lib/dkms/e1000e/3.8.4/build/make.log for more information.
    root@xxx:/usr/src/e1000e-3.8.4/src# cat /var/lib/dkms/e1000e/3.8.4/build/make.log
    DKMS make.log for e1000e-3.8.4 for kernel 5.4.0-52-generic (x86_64)
    Wed Oct 21 13:11:25 EDT 2020
    make: Entering directory ‘/var/lib/dkms/e1000e/3.8.4/build/src’
    make: *** No targets. Stop.
    make: Leaving directory ‘/var/lib/dkms/e1000e/3.8.4/build/src’

    Same error for all kernels installed.
    But following instruction in README to “make install” was successful, results:
    root@xxx:/usr/src/e1000e-3.8.4/src# modinfo e1000e
    filename: /lib/modules/5.4.0-52-generic/updates/drivers/net/ethernet/intel/e1000e/e1000e.ko
    version: 3.8.4-NAPI
    license: GPL
    description: Intel(R) PRO/1000 Network Driver
    author: Intel Corporation, linux.nics@intel.com

    Thank you

    Like

  3. I also ran into problems with the build step. Actually, looking closely it was the cleanup step at first.

    I had to add:

    CLEAN="make -C src/ clean"
    

    and also change the source location directory like so:

    BUILT_MODULE_LOCATION="../source/src/"
    

    Then it worked like a charm, which is great.

    Like

  4. Could you let me know if I now have the dkmf conf file correct please

    CKAGE_NAME=”e1000e”
    PACKAGE_VERSION=”3.8.4″
    CLEAN=”make -C src/ clean”
    AUTOINSTALL=yes
    MAKE[0]=”make -C src/”
    BUILT_MODULE_NAME=”e1000e”
    BUILT_MODULE_LOCATION=”../source/src/”
    DEST_MODULE_LOCATION=”/kernel/drivers/net/ethernet/intel/e1000e”

    I really do not know what I am doing , apart from trying to fix a non working ethernet port

    Here is what I have tried

    neil@neil-linux ~/Downloads $ sudo tar -xzf e1000e-3.8.4.tar.gz -C /usr/src
    [sudo] password for neil:
    neil@neil-linux ~/Downloads $ cd /usr/src/e1000e-3.8.4/

    neil@neil-linux /usr/src/e1000e-3.8.4 $ sudo nano dkms.conf
    neil@neil-linux /usr/src/e1000e-3.8.4 $ sudo dkms add -m e1000e/3.8.4

    Creating symlink /var/lib/dkms/e1000e/3.8.4/source ->
    /usr/src/e1000e-3.8.4

    DKMS: add completed.
    neil@neil-linux /usr/src/e1000e-3.8.4 $ sudo for k in /boot/vmlinuz*; do
    bash: syntax error near unexpected token `do’

    neil@neil-linux /usr/src/e1000e-3.8.4 $ sudo dkms install -k ${k##*vmlinuz-} e1000e/3.8.4
    Error! Invalid number of arguments passed.
    Usage: add / or
    add -m / or
    add -m -v

    neil@neil-linux /usr/src/e1000e-3.8.4 $ sudo dkms install -k ${k##*vmlinuz-} e1000e/3.8.4
    Error! Invalid number of arguments passed.
    Usage: add / or
    add -m / or
    add -m -v

    edit and add Alexis fix as per his post..then try again..

    neil@neil-linux /usr/src/e1000e-3.8.4 $ sudo nano dkms.conf
    neil@neil-linux /usr/src/e1000e-3.8.4 $ for k in /boot/vmlinuz*; do dkms install -k ${k##*vmlinuz-}

    dkms add -m e1000e/3.8.4
    for k in /boot/vmlinuz*; do dkms install -k ${k##*vmlinuz-}; dkms add -m e1000e/3.8.4

    exit
    ^C
    neil@neil-linux /usr/src/e1000e-3.8.4 $ for k in /boot/vmlinuz*; do dkms install -k ${k##vmlinuz-}; dkms add -m e1000e/3.8.4; for k in /boot/vmlinuz; do dkms install -k ${k##*vmlinuz-}; dkms add -m e1000e/3.8.4; exit
    exit
    ^C

    After pasting in the command string

    for k in /boot/vmlinuz*; do dkms install -k ${k##*vmlinuz-}

    the system just dumps me at the cursor > with no further action till I Ctrl-C out of there.

    I am going to post thi snow, do a reboot and see what happens..

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: