6

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 ?

9

The solution is available at this off-SO link.

In summary, here is what I did that solved the issue.

  1. Inserted a WiFi USB dongle and connected to the WiFi router, and tested that internet connection is working.
  2. Did: sudo apt-get update
  3. Did: sudo apt-get install r8168-dkms to install the r8168 kernel driver (suppressing the r8169 driver that came default with the kernel)
  4. Reboot the PC
  5. After reboot the Wired Ethernet started working.
4
  • this 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.
    – leomilrib
    Sep 18 '18 at 9:38
  • 1
    The r8168 driver is a DKMS driver, so the observation is somewhat strange. You see why so in this Ask-Ubuntu answer.
    – bdutta74
    Sep 21 '18 at 8:12
  • yeah, 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...
    – leomilrib
    Sep 25 '18 at 13:58
  • Thanks @bdutta74 unfortunately it did not seem to work for my issue: askubuntu.com/questions/1277732/… Sep 26 '20 at 22:24
0

You have to do some more investigation on that. Here are some things that can be tested.

  • connect a definitive working device on that cable/router-interface, to check that cable and router-interface are working
  • use a live-distro like kali linux or something similar that will boot from pendrive, to check that your hardware is ok
  • check if the correct modules are loaded for the ethernet controller
2
  • Thanks. 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/…).
    – bdutta74
    Jun 4 '18 at 8:12
  • 1
    Kali 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. Jun 4 '18 at 8:40
0

I did follow the r8168-dkms install answer, but what fixed the issue for me was: Cleaning the Ethernet port!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.