Realtek 8168 negotiating wrong speed
Hey guys thanks in advance for your help.
So I have a a server that just upgraded to Ubuntu 22.10, using kernel 6.0.3-060003-generic from the previous release. The server has two network cards that im playing with to give lan and internet access separately...The details are unimportant. Here is my sitch. Card at en01 works properly and connects at 1000 speed. Network card 2 at enp5s0 only connects to the verizon supplied router at 100. I tried multiple ethernet cables as well. A windows machine connecting to the router connects at 1000. The system reports that the router only advertises 100 which is just wrong. I'm sure it is a driver or config problem. I am using an rtl 8168 (the working card is an intel e1000e) which I installed under another kernel same result. When I installed the driver (not sure where i got it) I believe I black listed 8169 for some compatibility reason. I am including below excerpts from various outputs that might be helpful. Thanks in advance From dmesg kernel: pci 0000:05:00.0: [10ec:8168] type 00 class 0x020000 kernel: r8168: loading out-of-tree module taints kernel. kernel: r8168: module verification failed: signature and/or required key missing - tainting kernel kernel: r8168 Gigabit Ethernet driver 8.050.03-NAPI loaded kernel: r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625. kernel: r8168 Copyright (C) 2022 Realtek NIC software team <nicfae@realtek.com> kernel: r8168 0000:05:00.0 enp5s0: renamed from eth0 kernel: r8168: enp5s0: link up from lspci Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06) from ethtool Settings for enp5s0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/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 Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 100baseT/Half 100baseT/Full Link partner advertised pause frame use: No Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: on Port: Twisted Pair PHYAD: 0 Transceiver: internal MDI-X: Unknown netlink error: Operation not permitted Current message level: 0x00000033 (51) drv probe ifdown ifup Link detected: yes Note the bold part that shows advertised speed at only 100. This is a brand new fios router with a 10g port. It does not only do 100. Thanks :) |
If I need to guess it is not the correct driver. Sometimes kernel loads a "similar" driver which will work perfectly only with a similar chip (for example R8169), but this is just a guess.
|
Quote:
Would you have any suggestions on how to proceed? |
Downgrade your kernel to a known working stable version, reboot into it and 'hold' it against kernel upgrades.
May as well recompile your kernel for performance too if you want ( ͡~ ͜ʖ ͡° ) |
The correct package for Debian is "r8168-dkms" (purged and installed this package today on Parrot Linux).
What is the output of the following? Code:
modprobe --show-depends <module> |
Quote:
uname -a Linux haven 6.0.3-060003-generic #202210220459-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 22 08:10:12 UTC x86_64 x86_64 x86_64 GNU/Linux I do obviously have several other kernels installed from upgrades. There are two that are at 5.15 (which is under the 5.17 that the realtek driver seems to want) I always thought for performance security and stability the newer kernel is desired. As far as remaking the kernel....I've dabbled with that before and have never successfully built one that boots. I've edited and compiled many other programs but no love from the kernel |
Quote:
modprobe --show-depends r8168 insmod /lib/modules/6.0.3-060003-generic/updates/dkms/r8168.ko Here is me trying to install 8168 aptitude install r8168-dkms r8168-dkms is already installed at the requested version (8.050.03-2) r8168-dkms is already installed at the requested version (8.050.03-2) The following packages will be REMOVED: beignet-opencl-icd{u} libdrm-intel1{u} libpciaccess0{u} ocl-icd-libopencl1{u} I did not continue and remove anything |
If your wifi is working and you can connect to the internet, you can try purging and reinstalling the package.
You can also see if the driver (r8169) is loaded with these two commands Code:
lsmod Code:
inxi -n Code:
inxi -n |
Quote:
lsmod | grep 8168 r8168 577536 0 Network: Device-1: Intel Ethernet I217-LM driver: e1000e IF: eno1 state: up speed: 1000 Mbps duplex: full mac: 98:90:96:b7:ff:fa Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168 IF: enp5s0 state: up speed: 100 Mbps duplex: full mac: 00:e0:4c:2a:0f:c3 AS you can see it continues to negotiate 100 not 1000. AS I said above the device has 1 10gb port and 3 1gb ports Tried connecting to 10 and 1 and same result I'm having some other potential problems with my hard drive so I might replace it and try a fresh install, see if that changes anything |
Quote:
Then it is a simple command to load your good working config: yes "" | make oldconfig The follow this guide from the famous Falko Timme starting at 'make menuconfig': https://www.howtoforge.com/kernel_compilation_ubuntu_p2 It's also good to copy the latest firmware into the /lib/firmware/ folder https://git.kernel.org/pub/scm/linux...x-firmware.git Only thing I'm not sure towards Ubuntu (and variants) is if you have to regenerate your initramfs? As I've abandoned Debian since the systemd debacle and been a happy slackware user since, I regenerate the initrd everytime I install a custom kernel... it just works ( ° ͜ʖ °) |
Quote:
Ok so I reinstalled Ubuntu. Somehow after whatever updates I only ended up with Linux haven 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Which is under the 5.17 specieied on their website. (GBE Ethernet LINUX driver r8168 for kernel up to 5.17) The system installed a 8168 during the install. It has the same problem. Incidentally I changed the router for other reasons ans the same thing) directions are to ./autorun.sh (as root or with sudo) ./autorun.sh Check old driver and unload it. Build the module and install warning: the compiler differs from the one used to build the kernel The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Skipping BTF generation for /home/enesha/r8168-8.050.03/src/r8168.ko due to unavailability of vmlinux arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support At main.c:160: - SSL error:FFFFFFFF80000002:system library::No such file or directory: ../crypto/bio/bss_file.c:67 - SSL error:10000080:BIO routines::no such file: ../crypto/bio/bss_file.c:75 sign-file: certs/signing_key.pem: No such file or directory Warning: modules_install: missing 'System.map' file. Skipping depmod. Backup r8169.ko rename r8169.ko to r8169.bak DEPMOD 5.15.0-52-generic load module r8168 Updating initramfs. Please wait. update-initramfs: Generating /boot/initrd.img-5.15.0-52-generic I: The initramfs will attempt to resume from /dev/sdb3 I: (UUID=68f9157f-b408-40e7-87a9-9daa1438fce2) I: Set the RESUME variable to override this. Completed. It did load the 8168 presumeably just built by the realtek installer. Still only works at 100 im stumped |
just curious: did you test it with the initial driver (r8169) ?
|
Correct, I looked up the latest driver and appears it is only up to 5.17
https://www.realtek.com/en/component...press-software May as well try the dkms available at https://packages.ubuntu.com/search?keywords=r8168-dkms Another angle is to check the config on the network switch. I've seen dodgy cabling and other hurdles through the years... If the switchport is hardcoded for auto-mdix, test with another known good device so as to rule out layer 1 issues. |
Quote:
I ordered another nic that claims linux support and is a different chipset. I feel kinda defeated here |
Quote:
I thought hardware at first too. but it was a brand new fios router and a win machine got 1000. That not withstanding I did get a different router from tplink because I don't like the access the fios router gives to verizon. It was on sale. Claims gig ports. Same link negotiation and same listed as only advertising 100 from the router |
All times are GMT -5. The time now is 03:09 PM. |