1

I am attempting to upgrade my home network to 2.5 Gbps ethernet using r8125 PCIe cards (Cudy). After considerable troubleshooting effort and research, I am unable to get this working on this machine. Despite the card being recognized (enp6s0), it does not pass any data (no internet or LAN connection).

Secure boot is off:

$ mokutil --sb-state

EFI variables are not supported on this system

System info:

$ inxi -F
System:    Host: zephyr Kernel: 5.9.0-050900-generic x86_64 bits: 64 Desktop: LXQt 0.14.1 

Distro: Ubuntu 20.04.2 LTS (Focal Fossa) Machine: Type: Desktop Mobo: Gigabyte model: B550M DS3H v: x.x serial:

BIOS: American Megatrends v: F10 date: 09/18/2020

CPU: Topology: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP L2 cache: 4096 KiB Speed: 2196 MHz min/max: 2200/3600 MHz Core speeds (MHz): 1: 2195 2: 2195 3: 2189 4: 2191 5: 2196 6: 2196 7: 2189 8: 2195 9: 2196 10: 2193 11: 2197 12: 2196 13: 2194 14: 2192 15: 2195 16: 2190

Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Park [Mobility Radeon HD 5430] driver: radeon v: kernel Display: x11 server: X.Org 1.20.9 driver: radeon FAILED: ati unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz OpenGL: renderer: AMD CEDAR (DRM 2.50.0 / 5.9.0-050900-generic LLVM 11.0.0) v: 3.3 Mesa 20.2.6

Audio: Device-1: Advanced Micro Devices [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] driver: snd_hda_intel Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio driver: snd_hda_intel Sound Server: ALSA v: k5.9.0-050900-generic

Network: Device-1: Realtek RTL8125 2.5GbE driver: r8169 IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: b4:4b:d6:27:23:06

Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 IF: enp9s0 state: down mac: 18:c0:4d:6e:99:ff**

Drives:
Local Storage: total: 14.67 TiB used: 156.59 GiB (1.0%)

ID-1: /dev/nvme0n1 vendor: Transcend model: TS128GMTE110S size: 119.24 GiB

ID-2: /dev/sda vendor: Western Digital model: WD40EZRZ-22GXCB0 size: 3.64 TiB

ID-3: /dev/sdb vendor: Western Digital model: WD40EZRZ-19GXCB0 size: 3.64 TiB

ID-4: /dev/sdg vendor: Western Digital model: WD40EZRZ-22GXCB0 size: 3.64 TiB

ID-5: /dev/sdh vendor: Western Digital model: WD40EZRZ-22GXCB0 size: 3.64 TiB

RAID: Device-1: md0 type: mdraid status: active raid: raid-10 report: 4/4 UUUU Components: online: sdb~c1 sdg~c2 sda~c0 sdh~c3

Partition: ID-1: / size: 116.87 GiB used: 30.55 GiB (26.1%) fs: ext4 dev: /dev/nvme0n1p2

Sensors: System Temperatures: cpu: 76.9 C mobo: N/A gpu: radeon temp: 16 C Fan Speeds (RPM): N/A

Info: Processes: 417 Uptime: 28m Memory: 15.62 GiB used: 2.56 GiB (16.4%) Shell: bash inxi: 3.0.38

$ lspci | grep Realtek

06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller 09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 16)

$ lsmod | grep r8125 r8125 159744 0

$ lsmod | grep r8169 r8169 94208 0

$ ethtool enp6s0 Settings for enp6s0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full 2500baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full 2500baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Port: MII PHYAD: 0 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Link detected: no

[edit]

$ cd r8125
$ sudo ./autorun.sh
[sudo] password for kevin:

Check old driver and unload it. rmmod r8125 Build the module and install At main.c:160:

  • SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76

sign-file: certs/signing_key.pem: No such file or directory Warning: modules_install: missing 'System.map' file. Skipping depmod. DEPMOD 5.9.0-050900-generic load module r8125 Updating initramfs. Please wait. update-initramfs: Generating /boot/initrd.img-5.9.0-050900-generic Completed.

Steps I have tried:

  • installed r8125 drivers (v. 9.005.01) from Realtek website
  • performed dkms install as detailed here
  • disabled onboard LAN port in UEFI (Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169)
  • unloaded r8169 driver with sudo modprobe -r r8169
  • activated card by sudo ifconfig enp6s0 up
  • Loaded Linux kernel 5.9 which has native r8125 support
  • blacklisted r8169 in /etc/modprobe.d/blacklist.conf [edit]
  • swapped with identical model NIC known to work in another system [edit]
  • moved NIC to a different PCIe slot [edit]

Other observations:

  • I have another system with Gigabyte B450M-D3SH with the same Cudy card installed which passes data successfully. I have not swapped this card in yet to test for a defective unit.

  • It is curious that the onboard LAN seems to be recognized as a PCIe device: Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169. Could this relate to the source of the problem somehow?

I am at a loss as to the cause of this problem. Any assistance will be greatly appreciated.

muru
  • 197,895
  • 55
  • 485
  • 740
Kevin A
  • 11
  • 1
    The driver can be found at https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software for the r8125 that works with 20.04. Someone I gave this hint to was able to install it at https://askubuntu.com/questions/1330909/ethernet-not-loaded#comment2269221_1330909 I wish I had the card in my system so I could do a step by step install for a good answer. – Terrance Apr 13 '21 at 16:16
  • You may have to blacklist the r8169 driver, as it's running the card now (instead of the Realtek driver). Realtek RTL8125 2.5GbE driver: r8169. – heynnema Apr 13 '21 at 16:43
  • @hennema: I forgot to include that I also tried blacklisting r8169, but that didn't work either. I have added it to the list above. – Kevin A Apr 13 '21 at 18:21
  • @Terrance: If you are referring to "2.5G Ethernet LINUX driver r8125 for kernel up to 5.6" that is the one I have downloaded and installed, and is the same as at the end of the link trail you provided. I see another under the rubric of "Others" called "RTL8125B Ring Library driver"... haven't tried this as it's not clearly marked for Linux, and I'm not sure what it's for. Thanks. – Kevin A Apr 13 '21 at 18:25
  • The only one that should work would be the one for Linux. I believe the Ring Library would be for Ring topology networks, but I am not 100% sure. Try doing a hard power cycle on your system by unplugging the power from it and pressing the power button a few times then power it back up. Have you tried another cable that you know works to see if it is getting any IPs? – Terrance Apr 13 '21 at 18:35
  • @Terrance: the cable is ok; I can switch back to the onboard LAN port with the same cable and LAN access is restored. I cycled the power as you described, with negative results. I swapped the duplicate NICs, resulting in the same behavior in each machine (therefore, its not a defective NIC). I repeated the procedure of disabling onboard LAN in UEFI, removing r8169 and manually installing r8125, with negative results. I do note, however, there is a persistent SSL signing error for r8125 on this machine that was remedied by the dkms procedure on the machine in which the NIC works. – Kevin A Apr 13 '21 at 22:40
  • @Terrance: Another observation is that when booting with LAN cable in the non-functioning NIC, it hangs for approximately 90 sec attempting to scan the network... as if r8125 drivers are not being loaded in the boot sequence. This doesn't happen with the cable plugged into the functioning onboard LAN port. I'm still stymied, but thanks for the helpful suggestions. – Kevin A Apr 13 '21 at 22:40
  • On the one that is not working, what is the output of dkms status? – Terrance Apr 13 '21 at 22:56
  • $ dkms status r8125, 9.005.01, 5.9.0-050900-generic, x86_64: installed (WARNING! Diff between built and installed module!) – Kevin A Apr 13 '21 at 22:58
  • There is a way to fix that. sudo dkms uninstall -m r8125 -v 9.005.01 -k 5.9.0-050900-generic && sudo dkms install -m r8125 -v 9.005.01 -k 5.9.0-050900-generic --force – Terrance Apr 13 '21 at 23:11
  • $ dkms status r8125, 9.005.01, 5.9.0-050900-generic, x86_64: installed
    • SSL error persists - r8125 NIC still non-functional.
    – Kevin A Apr 13 '21 at 23:32
  • Is there a reason why you are using the 5.9 kernel? I am just wondering as the HWE kernel version for 20.04 is 5.8. Where are you getting this SSL error? Can you add that to your quesiton? Also, I have seen this before, but look in the socket on the card and see if there are any bent pins. Mainly because the ethtool was saying no link. I, honestly am running out of ideas for you. – Terrance Apr 13 '21 at 23:40
  • b/c its my understanding that 5.9 contains r8125 drivers. - SSL error added above; PCIe socket inspected --> nothing amiss; rearranged some hardware and rolled back to prior kernel (5.4) --> no change. :-( [edit] ethtool now shows "Link detected: yes" but still no data exchange. – Kevin A Apr 14 '21 at 00:54
  • I am sorry, but the socket where the network cable plugs into it. My bad. Look for any physical damage in there. I would now also suggest swapping the cards for the time being from the other system just to eliminate the hardware as being the issue. – Terrance Apr 14 '21 at 03:34
  • Thank you. I swapped out the cards and have ruled out a NIC hardware issue. – Kevin A Apr 14 '21 at 13:04
  • Moved NIC to a different PCIe slot: no change. I am out of ideas, other than inviting motherboard manufacturer to review this comment string and offer any suggestions. – Kevin A Apr 15 '21 at 18:12
  • Solved. It was an issue with no IP address being assigned to the new card. After manually adding a static IP in /etc/netplan/00-installer-config.yaml, I am basking in ~2.4 Gbps glory. Suffice it to say that I need to learn much more about networking. Thank you very much for your efforts. Ref: LinuxTechi, "How to Assign Static IP Address on Ubuntu 20.04 LTS". – Kevin A Apr 17 '21 at 02:19
  • If you have solved your problem, please post an answer describing how you solved it instead of editing the question – muru Apr 17 '21 at 08:10

1 Answers1

0

Solution:

  1. For safety, save a copy of /etc/netplan/00-installer-config.yaml as /etc/netplan/00-installer-config.yaml-old. So you can revert if needed.

  2. Modify /etc/netplan/00-installer-config.yaml to read as follows:

    network:
      ethernets:
        enp9s0:
          dhcp4: true
        enp4s0:
          addresses: [192.168.1.XX/24]
          gateway4: 192.168.1.1
          nameservers:
            addresses: [Y.Y.Y.Y, Z.Z.Z.Z]
      version: 2                                                                 
    

    where X = desired LAN IP, Y & Z = DNS nameservers of choice, and using your adapter name (e.g., enp4s0). Be mindful that .yaml files are sensitive to indentation.

  3. Save file

  4. sudo netplan apply

I manually added from enp4s0 thru addresses. While the above steps brought the NIC to life, the proper driver is still not loading at boot. As this is a different problem, if unable to resolve I will post as a new thread.

https://www.linuxtechi.com/assign-static-ip-address-ubuntu-20-04-lts/

muru
  • 197,895
  • 55
  • 485
  • 740
Kevin A
  • 11