# Should I compile network drivers as modules or built in?

## P1neapple

I have an ethernet device requiring e1000e

I also have a wifi card requiring iwlwifi (which requires firmware)

I heard that if I compile the wifi card driver built-in, it will try to load before the firmware is available, and it will fail. Is this true?

So should I compile my ethernet and wireless drivers built-in or as modules??

Thanks in advance

----------

## The Doctor

 *P1neapple wrote:*   

> I heard that if I compile the wifi card driver built-in, it will try to load before the firmware is available, and it will fail. Is this true?

 Generally. You could build the firmware into the kernel, but the module approach is much better since if the firmware is updated you don't have to rebuild your kernel. It is also much simpler, so I would say network devices should always be modules unless you have a strong reason not to.

----------

## P1neapple

The firmware is external AFAIK as it is part of the linux-firmware package (if that makes any difference, because i don't think the kernel needs to be rebuilt)

Ok I'll just compile them as modules then, just like I did, thanks!!

----------

## steveL

Personally I'd build-in the ethernet driver, unless it requires firmware, as that means it's always eth0. Wireless for sure is better as module.

----------

## P1neapple

So if it's built in it's eth0?? That's interesting...

I don't believe that's true. At least in my virtualbox setup, my ethernet driver is built-in, and it's not eth0 (it's like ens0p3 or something like that)

----------

## charles17

 *P1neapple wrote:*   

> my ethernet driver is built-in, and it's not eth0 (it's like ens0p3 or something like that)

 At the beginning it's eth0.  You can check with *Quote:*   

> $ dmesg | grep 'network interface'
> 
> [    8.292260] systemd-udevd[268]: renamed network interface wlan0 to wlp8s0
> 
> [    8.312213] systemd-udevd[263]: renamed network interface eth0 to enp2s14

 

----------

## P1neapple

I don't use systemd, if that makes a difference. And still, it's a different name when you want to use it  :Wink: 

----------

## charles17

 *P1neapple wrote:*   

> I don't use systemd, 

 Nor do I.  But having ens0p3 indicates it has been renamed.

BTW: eth0 or ens0p3 is not the driver. It is the interface name.  You'll get the driver name running "lspci -k".

----------

## steveL

 *P1neapple wrote:*   

> I don't use systemd, if that makes a difference. And still, it's a different name when you want to use it ;)

 

And I don't use udev unpredictable naming; so it's not for me, which is how I like it. ;-)

----------

## P1neapple

 *charles17 wrote:*   

>  *P1neapple wrote:*   I don't use systemd,  Nor do I.  But having ens0p3 indicates it has been renamed.
> 
> BTW: eth0 or ens0p3 is not the driver. It is the interface name.  You'll get the driver name running "lspci -k".

 

I know it's not the driver, I mentioned the driver above (e1000e). Your output included "systemd-udevd" so i assumed you are using systemd.

----------

## Hu

 *P1neapple wrote:*   

> I know it's not the driver, I mentioned the driver above (e1000e). Your output included "systemd-udevd" so i assumed you are using systemd.

 After systemd consumed udev, later releases of udev switched to the name systemd-udevd, even if you use it on a systemd-free system.  Naming seems to be a recurring problem for the systemd developers.

----------

