No ethernet interface detected

Hi,

I am new to nixos, I just started using it with a fresh install (nixos 20.03) on my new computer (a thinkpad t15p gen 1) and it’s a lot of fun.

However I’m having an unusual problem : my wifi connection works great but I can’t use my RJ45 port.

It seems that my system can’t recognize the ethernet interface. This is the output of ifconfig:

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a01:cb08:9072:a00:6c22:1182:8fca:1202  prefixlen 64  scopeid 0x0<global>
        inet6 2a01:cb08:9072:a00:367d:f6ff:fedc:588e  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::367d:f6ff:fedc:588e  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::6733:d2ab:fd04:f151  prefixlen 64  scopeid 0x20<link>
        inet6 2a01:cb08:9072:a00:2d11:dd2d:bce0:1529  prefixlen 64  scopeid 0x0<global>
        inet6 2a01:cb08:9072:a00:b90e:add4:91f9:19b9  prefixlen 64  scopeid 0x0<global>
        ether 34:7d:f6:dc:58:8e  txqueuelen 1000  (Ethernet)
        RX packets 48737  bytes 41945434 (40.0 MiB)
        RX errors 0  dropped 141  overruns 0  frame 0
        TX packets 23269  bytes 3722515 (3.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

and this is the output of lshw -class network:

  *-network:0
       description: Wireless interface
       physical id: 14.3
       bus info: pci@0000:00:14.3
       logical name: wlp0s20f3
       version: 00
       serial: 34:7d:f6:dc:58:8e
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.4.54 firmware=50.3e391d3e.0 ip=192.168.1.14 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: iomemory:600-5ff irq:16 memory:604111c000-604111ffff
  *-network:1 UNCLAIMED
       physical id: 1f.6
       bus info: pci@0000:00:1f.6
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list
       configuration: latency=0
       resources: memory:98500000-9851ffff

I am really not a “technical” person so I am not able to get a lot of informations from those. However I noticed that the “interface 0”, while being described as a “Wireless interface” also has “ethernet” listed in its capabilities. Maybe the problem is that the driver can’t separate the two ?

From this list of specification: https://psref.lenovo.com/Product/ThinkPad/ThinkPad_T15p_Gen_1
I get that my “ethernet card” is an “Intel Ethernet Connection I219-LM”.
I found this topic about someone having what appears to be the same issue with this card:
https://askubuntu.com/questions/1067564/intel-ethernet-i219-lm-driver-in-ubuntu-16-04
The fix was to install the driver “e1000e”. I tried to install what I found corresponding to this in nixpkgs: linuxPackages_4_9.e1000e but it did nothing.

Does anyone have an idea about the source of this problem ?

BTW: I’m using network manager and here is my hardware-configuration.nix:

# Do not modify this file!  It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:

{
  imports =
    [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/42f3c6f7-66ee-425b-934b-ee1f58e2e415";
      fsType = "ext4";
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/52C1-1B05";
      fsType = "vfat";
    };

  fileSystems."/home" =
    { device = "/dev/disk/by-uuid/419e7a0e-ff8c-44ca-935f-e4aa4fbb3761";
      fsType = "ext4";
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/5360010a-b9a3-41fb-b23c-d0748fd9306d"; }
    ];

  nix.maxJobs = lib.mkDefault 8;
  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}


Could you show output of ifconfig -a, maybe the ethernet interface is down and therefore not shown

Here it is (As far as I can tell it’s the same output):

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 92  bytes 8316 (8.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 92  bytes 8316 (8.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a01:cb08:9072:a00:5451:c14:a878:e46c  prefixlen 64  scopeid 0x0<global>
        inet6 2a01:cb08:9072:a00:367d:f6ff:fedc:588e  prefixlen 64  scopeid 0x0<global>
        inet6 2a01:cb08:9072:a00:70a2:d729:297d:f379  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::367d:f6ff:fedc:588e  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::6733:d2ab:fd04:f151  prefixlen 64  scopeid 0x20<link>
        inet6 2a01:cb08:9072:a00:ac52:65c2:6884:242  prefixlen 64  scopeid 0x0<global>
        inet6 2a01:cb08:9072:a00:2d11:dd2d:bce0:1529  prefixlen 64  scopeid 0x0<global>
        ether 34:7d:f6:dc:58:8e  txqueuelen 1000  (Ethernet)
        RX packets 61800  bytes 48074168 (45.8 MiB)
        RX errors 0  dropped 365  overruns 0  frame 0
        TX packets 35140  bytes 6038597 (5.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0