How might I diagnose whether I have a working ethernet interface?
I bought a laptop this year, not via this website but from a vendor on Amazon.
I cannot connect to the internet via cable
and I’m afraid that my network interface is not working correctly for some unknown to me reason.
My environment: Ubuntu Desktop 20.04 LTS (the problem was present on Windows as well –
the OS that laptop was shipped to me). I can connect through the same cable from another laptop. WiFi works on this laptop but the quality is not good.
I ran ip l
to identify the name of the interface in question and got the following output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 18:c0:4d:0f:14:0d brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DORMANT group
I’ve trimmed the last line of the output in order to avoid doxing the details of my wireless interface.
Having identified the name of the interface in question as enp3s0
I then proceeded further with my investigation and ran
sudo ethtool enp3s0
which returned the following output (irrespectively of the cable being plugged in or not).
Settings for enp3s0:
Cannot get device settings: No such device
Supports Wake-on: pumbg
Wake-on: d
Link detected: no
I’ve tried also sudo ethtool -p enp3s0 15
and got the following output (irrespectively of the cable being plugged in or not):
Cannot identify NIC: Operation not supported
The output of dmesg -t --level=alert,crit,err,warn
is:
NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
NVRM: BAR0 is 0M @ 0x0 (PCI:0000:01:00.0)
nvidia: probe of 0000:01:00.0 failed with error -1
NVRM: The NVIDIA probe routine failed for 1 device(s).
NVRM: None of the NVIDIA devices were initialized.
NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
NVRM: BAR0 is 0M @ 0x0 (PCI:0000:01:00.0)
[...]
nvidia: probe of 0000:01:00.0 failed with error -1
NVRM: The NVIDIA probe routine failed for 1 device(s).
NVRM: None of the NVIDIA devices were initialized.
Where [...]
stands for the first seven lines of the output repeated over 300 times.
My question is do I have a working ethernet interface?
Link detected: no
and
the problem was present on Windows as well – the OS that that laptop was shipped to me
Strongly indicate your NIC is not working. The circuitry might be OK, but a pin/some pins could be broken.
You’re good to RMA the laptop or replace the NIC/connector.
According to the specifications of the laptop, the wired NIC is a Realtek RTL8125-BG. It needs a firmware file to work correctly.
Looks like there are multiple versions of the NIC hardware, requiring different firmware files. The linux-firmware package in the main Ubuntu 20.04 repository seems to only include the rtl8125a-3.fw
version of the firmware. You might need the package version available in the focal-updates
repository which also includes the rtl8125b-1.fw
and rtl8125b-2.fw
firmware files.
You should check that the later two firmware files are present on your system in the /lib/firmware/rtl_nic/
directory, and if they aren’t there, enable the focal-updates
repository and update the linux-firmware
package.
The support for RTL8125 version B was added into the kernel in July 2020. If you are running the 20.04 default kernel version (5.4 series), you might also need to install the newer "hardware enablement kernel" (5.8 series) to make your RTL8125 version B work correctly.
Although the Ubuntu Desktop 20.04 LTS should have received the hardware enablement kernel automatically, it’s better to check than guess. Please run uname -r
: it reports the version number of the current kernel. If it’s 5.4.something, you might be missing some updates.