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.
Sory, where i need to put The dkms add -m configuration?
LikeLike
You have to run it on command line. Sorry for late reply btw!
LikeLike
Hello, where i need to put The dkms add -m configuration?
LikeLike
Any chance you could update this for 3.8.4?
LikeLike
I think the process remains same for newer versions too
LikeLike
I get a no targets error from make. I can get the exact error tomorrow.
LikeLike
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’
LikeLike
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.
LikeLike
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”
LikeLike
Ok it seems there is indeed some issue. I’ll update the post once I’m able to fix it.
LikeLike
Thank you!
LikeLike
Hello, thanks for tutorial…
Actually I’m trying to install the last step and getting failed with the command:
Could you help me please?
LikeLike
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.
LikeLike
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
LikeLike
I also ran into problems with the build step. Actually, looking closely it was the cleanup step at first.
I had to add:
and also change the source location directory like so:
Then it worked like a charm, which is great.
LikeLike
Hi Alexis, thanks for taking the time to post the fix as a comment on my blog!
LikeLike
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-}
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..
LikeLike
You are missing a
; done
in the line you entered finally before getting the>
prompt.LikeLike
Hey, thank for the post. I am having a similar issue.
I am unable to install e1000e driver 3.8.4 on Ubuntu 18.04 with kernel 4.15.0-187.
Did you find a way to install it?
LikeLike
I haven’t tried it. Can you share what’s the error? Also may be your error is already covered above in comments left by other folks.
LikeLike
I was trying to directly compile the driver manually.
make -C /opt/drivers/e1000e-3.8.4/src install
And getting error:
make: Entering directory ‘/opt/drivers/e1000e-3.8.4/src’
*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but
*** the signing key cannot be found. Module signing has been
*** disabled for this build.
make[1]: Entering directory ‘/usr/src/linux-headers-4.15.0-187-generic’
CC [M] /opt/drivers/e1000e-3.8.4/src/netdev.o
In file included from /opt/drivers/e1000e-3.8.4/src/e1000.h:14:0,
from /opt/drivers/e1000e-3.8.4/src/netdev.c:30:
/opt/drivers/e1000e-3.8.4/src/kcompat.h:7061:28: error: redefinition of ‘skb_frag_off’
static inline unsigned int skb_frag_off(const skb_frag_t * frag)
^~~~~~~~~~~~
In file included from ./include/linux/if_ether.h:23:0,
from ./include/uapi/linux/ethtool.h:19,
from ./include/linux/ethtool.h:18,
from ./include/linux/netdevice.h:41,
from /opt/drivers/e1000e-3.8.4/src/netdev.c:13:
./include/linux/skbuff.h:2763:28: note: previous definition of ‘skb_frag_off’ was here
static inline unsigned int skb_frag_off(const skb_frag_t *frag)
^~~~~~~~~~~~
scripts/Makefile.build:333: recipe for target ‘/opt/drivers/e1000e-3.8.4/src/netdev.o’ failed
make[2]: *** [/opt/drivers/e1000e-3.8.4/src/netdev.o] Error 1
Makefile:1590: recipe for target ‘_module_/opt/drivers/e1000e-3.8.4/src’ failed
make[1]: *** [_module_/opt/drivers/e1000e-3.8.4/src] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-4.15.0-187-generic’
Makefile:73: recipe for target ‘default’ failed
make: *** [default] Error 2
make: Leaving directory ‘/opt/drivers/e1000e-3.8.4/src’
I was on Ubuntu 18.04 kernel 4.15.0-187. But I was able to use an old kernel 4.15.0-112 and compile the driver on that.
My goal was to upgrade OS from Ubuntu 16.04 to 20.04 on this new hardware. By pin the kernel to the working version (4.15.0-112), I was able to upgrade to 20.04 and upgrade to latest kernel 5.13.0.51 which supports my hardware out of the box.
LikeLike