I have a network card in an Ubuntu machine that will not come up (as in link down, layer 1 problem). The driver is loaded, as shown below:
$ ethtool -i ens8
driver: r8169
version: 6.8.0-35-generic
firmware-version: rtl8168h-2_0.0.2 02/26/15
expansion-rom-version:
bus-info: 0000:00:08.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
I try to bring the link up and this is is what happens, it just stays down.
$ sudo ip link set ens8 up
$ ip a | grep -A3 ens8
3: ens8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 9c:53:22:48:71:63 brd ff:ff:ff:ff:ff:ff
altname enp0s8
I check dmesg for and kernel/driver alerts:
$ sudo dmesg -T | grep "ens8\|r8169"
[Wed Jun 12 21:13:19 2024] r8169 0000:00:08.0 eth0: RTL8168h/8111h, 9c:53:22:48:71:63, XID 541, IRQ 29
[Wed Jun 12 21:13:19 2024] r8169 0000:00:08.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[Wed Jun 12 21:13:19 2024] r8169 0000:00:08.0 ens8: renamed from eth0
[Wed Jun 12 21:13:22 2024] Generic FE-GE Realtek PHY r8169-0-40:00: attached PHY driver (mii_bus:phy_addr=r8169-0-40:00, irq=MAC)
[Wed Jun 12 21:13:22 2024] r8169 0000:00:08.0 ens8: No native access to PCI extended config space, falling back to CSI
[Wed Jun 12 21:13:22 2024] r8169 0000:00:08.0 ens8: Link is Down
I see that it says "No native access to PCI extended config space", which google doesn't have a clear answer on. I'm not sure where to go with this and I'm looking for help to resolve this problem.
I have created a basic network profile in network manager to bring specifically ens8 up with a dynamic IP, but when I try activate it, I get the following:
$ nmcli con up PCINIC
Error: Connection activation failed: No suitable device found for this connection (device ens3 not available because profile is not compatible with device (mismatching interface name)).
I have also included this profile (a brief version for simplicity) below as to display the settings I used:
$ nmcli con show PCINIC
connection.id: PCINIC
connection.type: 802-3-ethernet
connection.interface-name: ens8
connection.autoconnect: yes
connection.autoconnect-priority: 400
ipv4.method: auto
Side notes: This is a VM using PCI passthrough for the PCI network card in the host machine. This NIC works if I move it into an Ubuntu 18.04 VM no problem. However after I installed a new VM using Ubuntu 24.04 LTS and removed that NIC from the old VM to the new one, I cannot seem to get this link up. So it's not a fault with the NIC, it's driver related in my opinion.
EDIT: Added some lspci output, as well and manually setting speed duplex:
$ lspci -knn | grep -A 5 00:08
00:08.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8161] (rev 15)
Subsystem: Realtek Semiconductor Co., Ltd. TP-Link TG-3468 v4.0 Gigabit PCI Express Network Adapter [10ec:8168]
Kernel driver in use: r8169
Kernel modules: r8169, r8168
I have also tried manually setting speed and duplex via the following:
$ nmcli con modify PCINIC 802-3-ethernet.auto-negotiate no 802-3-ethernet.speed 1000 802-3-ethernet.duplex full
$ sudo systemctl restart NetworkManager.service
$ nmcli con up PCINIC
Error: Connection activation failed: No suitable device found for this connection (device ens3 not available because profile is not compatible with device (mismatching interface name)).
$ ip a | grep ens8
3: ens8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
Now set it back to auto:
$ nmcli con modify PCINIC 802-3-ethernet.auto-negotiate yes
$ sudo systemctl restart NetworkManager.service
$ nmcli con up PCINIC
Error: Connection activation failed: No suitable device found for this connection (device ens3 not available because profile is not compatible with device (mismatching interface name)).
$ ip a | grep ens8
3: ens8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
To be clear this card works fine in an Ubuntu 18.04 vm I have still on this computer, ruling out the cable and switch connected to the other end.