Ethernet not working well in Ubuntu 18.04 on new desktop
The solution is available at this off-SO link.
In summary, here is what I did that solved the issue.
- Inserted a WiFi USB dongle and connected to the WiFi router, and tested that internet connection is working.
- Did:
sudo apt-get update
- Did:
sudo apt-get install r8168-dkms
to install the r8168 kernel driver (suppressing the r8169 driver that came default with the kernel) - Reboot the PC
- After reboot the Wired Ethernet started working.
Related videos on Youtube
bdutta74
Updated on September 18, 2022Comments
-
bdutta74 over 1 year
Assembled a developer (non gaming) desktop with following configuration:
- Processor: Intel i5 8400
- Memory: DDR4-2400 8GB (double-rank), 1.2V, CL17
- Motherboard: MSI H310M PRO-VH
- HDD: Seagate Barracuda 1TB 7200rpm SATA
Then I installed Ubuntu 18.04 from the latest downloaded ISO image, via a pendrive. After connecting the desktop via the onboard LAN interface, to my home router, the interface goes into, a log Connecting state, never manages to actually connect, and finally becomes Disconnected. This is when the Wired ethernet is configured with defaults to use DHCP. Here is what
ip a
shows:xyz@shivalik:~$ ip a 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 30:9c:23:b3:cd:42 brd ff:ff:ff:ff:ff:ff inet6 fe80::452c:f71e:f47d:1b54/64 scope link noprefixroute valid_lft forever preferred_lft forever
If I modify the Wired Ethernet interface to use static-IP, the interface seems to come up, but not work. I am unable to reach even the home router, that is at the other end of the ethernet cable connected to the Desktop. In this case, here is what
ip a
shows:xyz@shivalik:~$ ip -s a 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 30:9c:23:b3:cd:42 brd ff:ff:ff:ff:ff:ff inet 192.168.2.220/24 brd 192.168.2.255 scope global noprefixroute enp1s0 valid_lft forever preferred_lft forever inet6 fe80::452c:f71e:f47d:1b54/64 scope link noprefixroute valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 0 0 0 0 0 0 TX: bytes packets errors dropped carrier collsns 1624 35 0 0 0 0
The motherboard documentation says that it has the Realtek RTL8111H Gigabit LAN controller on board. Here some of the troubleshooting information I've gathered on this host:
xyz@shivalik:~$ lspci -knn | grep Eth -A3 01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15) Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1462:7b33] Kernel driver in use: r8169 Kernel modules: r8169
and
xyz@shivalik:~$ sudo lshw -C network *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: 30:9c:23:b3:cd:42 size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: irq:123 ioport:3000(size=256) memory:a1104000-a1104fff memory:a1100000-a1103fff
Have replaced the LAN cables (with brand new spare ones I had), but that didn't change anything. The LAN port LEDs indicate PHY connectivity it seems, on both end and they are blinking, albeit slowly. What do I have to do to get the network working on this desktop ?
-
bdutta74 almost 6 yearsThanks. For point #1 - confirmed that router and cables are fine by using my laptop and connecting using them. For point #2 - I've used Lubuntu 18.04 live via pen-drive, with exactly same effect. Wondering, why would it be any better using Kali linux live-distro ? Is Kali known to have wider range-of, more recent drivers ? Checking around I notice that r8169 is most commonly used module for RTL8111H device, although I found some about recommendation to use r8168 module (like this one: askubuntu.com/questions/558944/…).
-
Winnie Tigger almost 6 yearsKali is only an example. But because it is highly network related, it may have a better support for network interfaces - just a guess. Maybe you like to use it for doublechecking. If this also fails, I assume that your onboard LAN is defektive. I have no experience with the RTL8111H device but my personal experience in networking shows that sometimes hardware incompatibilities prevent some NICs form connecting to a specific network device.
-
leomilrib over 5 yearsthis apparently worked for me, although for some reason it only took effect after I reinstall the kernel (linux-image-4.15.0-34-generic). I tried restarting several times and manually loading thru
modprobe
but only reinstalling seems to take effect. -
bdutta74 over 5 yearsThe r8168 driver is a DKMS driver, so the observation is somewhat strange. You see why so in this Ask-Ubuntu answer.
-
leomilrib over 5 yearsyeah, sorry, I should have said "but only reinstalling it seems to have taken effect in my case". That was an unexpected behavior for me also... I was having other problems with my sound card, but none related specific to drivers tho...
-
ComputerScientist over 3 yearsThanks @bdutta74 unfortunately it did not seem to work for my issue: askubuntu.com/questions/1277732/…