1

I have a dual boot set up with Ubuntu 18.04 and 22.04. When I log in 18.04 the wired connection in the network settings shows a Link speed of 1000 Mb/s, while in 22.04 it shows 100 Mb/s.

Info on Ubuntu 22.04:

> uname -a

Linux cc 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

> sudo lshw -C network

-network
description: Wireless interface product: RTL8812AE 802.11ac PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:07:00.0 logical name: wlp7s0 version: 01 serial: d0:37:45:4c:0f:b3 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rtl8821ae driverversion=5.19.0-35-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11 resources: irq:79 ioport:e000(size=256) memory:fcb00000-fcb03fff
-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:08:00.0 logical name: enp8s0 version: 15 serial: 04:d9:f5:76:15:b0 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-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.19.0-35-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.0.100 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s resources: irq:39 ioport:d000(size=256) memory:fca04000-fca04fff memory:fca00000-fca03fff

> sudo ethtool enp8s0

Settings for enp8s0: Supported ports: [ TP MII ] 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: 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Link partner advertised pause frame use: Symmetric Receive-only Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: on master-slave cfg: preferred slave master-slave status: slave Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Supports Wake-on: pumbg Wake-on: d Link detected: yes

> sudo ethtool -i enp8s0

version: 5.19.0-35-generic firmware-version: rtl8168h-2_0.0.2 02/26/15 expansion-rom-version: bus-info: 0000:08:00.0 supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no

> lspci | awk '/[Nn]et/ {print $1}' | xargs -i% lspci -ks %

07:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8812AE 802.11ac PCIe Wireless Network Adapter (rev 01) Subsystem: Realtek Semiconductor Co., Ltd. RTL8812AE 802.11ac PCIe Wireless Network Adapter Kernel driver in use: rtl8821ae Kernel modules: rtl8821ae 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) Subsystem: ASUSTeK Computer Inc. PRIME B450M-A Motherboard Kernel driver in use: r8169 Kernel modules: r8169

> sudo dmesg | grep r8169 # the up and down links are me setting the speed to 1000 and 100

[ 1.021751] r8169 0000:08:00.0 eth0: RTL8168h/8111h, 04:d9:f5:76:15:b0, XID 541, IRQ 54 [ 1.021756] r8169 0000:08:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko] [ 2.775004] r8169 0000:08:00.0 enp8s0: renamed from eth0 [ 5.878614] Generic FE-GE Realtek PHY r8169-0-800:00: attached PHY driver (mii_bus:phy_addr=r8169-0-800:00, irq=MAC) [ 6.066748] r8169 0000:08:00.0 enp8s0: Link is Down [ 22.934280] Generic FE-GE Realtek PHY r8169-0-800:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling! [ 22.934294] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx [ 298.818969] r8169 0000:08:00.0 enp8s0: Link is Down [ 325.940383] r8169 0000:08:00.0 enp8s0: Link is Down [ 344.602188] Generic FE-GE Realtek PHY r8169-0-800:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling! [ 344.602201] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full (downshifted) - flow control rx/tx [ 892.022066] r8169 0000:08:00.0 enp8s0: Link is Down [ 1021.829180] r8169 0000:08:00.0 enp8s0: Link is Down [ 1033.732636] r8169 0000:08:00.0 enp8s0: Link is Down [ 1070.106381] r8169 0000:08:00.0 enp8s0: Link is Down [ 1082.716879] r8169 0000:08:00.0 enp8s0: Link is Down [ 1085.513138] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full - flow control rx/tx [ 1485.561946] r8169 0000:08:00.0 enp8s0: Link is Down [ 1587.331448] r8169 0000:08:00.0 enp8s0: Link is Down [ 1590.190212] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full - flow control rx/tx [ 1674.111292] r8169 0000:08:00.0 enp8s0: Link is Down [ 1843.666686] r8169 0000:08:00.0 enp8s0: Link is Down [ 1846.453070] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full - flow control rx/tx [ 2403.530799] r8169 0000:08:00.0 enp8s0: Link is Down [ 2439.863622] r8169 0000:08:00.0 enp8s0: Link is Down [ 2442.743673] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full - flow control rx/tx [ 2453.224431] r8169 0000:08:00.0 enp8s0: Link is Down [ 2457.465233] r8169 0000:08:00.0 enp8s0: Link is Down [ 2550.292449] r8169 0000:08:00.0 enp8s0: Link is Down [ 2553.750133] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full - flow control rx/tx [ 2602.361706] r8169 0000:08:00.0 enp8s0: Link is Down [ 2692.932207] r8169 0000:08:00.0 enp8s0: Link is Down [ 2695.792083] r8169 0000:08:00.0 enp8s0: Link is Up - 100Mbps/Full - flow control rx/tx

> ip link | grep enpip # on speed 100

2: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000

I already tried running sudo ethtool -s enp8s0 speed 1000 autoneg off duplex full, but it kills my connection when I do so.

> sudo ethtool enp8s0 # on speed 1000

Settings for enp8s0: Supported ports: [ TP MII ] 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: 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Auto-negotiation: off master-slave cfg: preferred slave master-slave status: unknown Port: Twisted Pair PHYAD: 0 Transceiver: external MDI-X: Unknown Supports Wake-on: pumbg Wake-on: d Link detected: no

> ip link | grep enp # on speed 1000

2: enp8s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000

My connection only comes back when I set the speed to 100 using ethtool -s. I'm ruling out hardware problems because the link works at 1000 Mb/s in the same machine when I boot in Ubuntu 18.04.

How can I make it run at 1000 Mb/s in Ubuntu 22.04?


Edit:

I ran:

> sudo apt install r8168-dkms
> sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded

>echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf blacklist r8169

And performed a hard power cycle. These are the differences in the logs (basically just changed a few places from r8169 to r8168) but the problem persists:

> sudo lshw -C network

-network
description: Wireless interface product: RTL8812AE 802.11ac PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:07:00.0 logical name: wlp7s0 version: 01 serial: d0:37:45:4c:0f:b3 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=rtl8821ae driverversion=5.19.0-35-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11 resources: irq:79 ioport:e000(size=256) memory:fcb00000-fcb03fff
-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:08:00.0 logical name: enp8s0 version: 15 serial: 04:d9:f5:76:15:b0 size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.049.02-NAPI duplex=full ip=192.168.0.100 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s resources: irq:46 ioport:d000(size=256) memory:fca04000-fca04fff memory:fca00000-fca03fff

> sudo ethtool enp8s0

Settings for enp8s0: 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: 100baseT/Full Advertised pause frame use: Symmetric Receive-only Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Link partner advertised pause frame use: Symmetric Receive-only 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 Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000033 (51) drv probe ifdown ifup Link detected: yes

> sudo ethtool -i enp8s0

driver: r8168 version: 8.049.02-NAPI firmware-version: expansion-rom-version: bus-info: 0000:08:00.0 supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no

> lspci | awk '/[Nn]et/ {print $1}' | xargs -i% lspci -ks %

07:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8812AE 802.11ac PCIe Wireless Network Adapter (rev 01) Subsystem: Realtek Semiconductor Co., Ltd. RTL8812AE 802.11ac PCIe Wireless Network Adapter Kernel driver in use: rtl8821ae Kernel modules: rtl8821ae 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) Subsystem: ASUSTeK Computer Inc. PRIME B450M-A Motherboard Kernel driver in use: r8168 Kernel modules: r8168

> sudo ethtool enp8s0 # on speed 1000

Settings for enp8s0: 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: 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Auto-negotiation: on Port: Twisted Pair PHYAD: 0 Transceiver: internal MDI-X: Unknown Supports Wake-on: pumbg Wake-on: g Current message level: 0x00000033 (51) drv probe ifdown ifup

  • 1
    Install the r8168 driver into 22.04. The r8169 driver is really flaky on the RTL8111/8168/8411 chipset. sudo apt install r8168-dkms – Terrance Mar 27 '23 at 04:06
  • @Terrance, I was able to set sudo ethtool -s enp8s0 speed 1000 autoneg on duplex full now (when I used autoneg off it returned Invalid argument). But now I get r8168: enp8s0: link up r8168: enp8s0: link down every minute on sudo dmesg. Connection keeps dropping. Works normally in speed 100 though. – Lucas P. Luiz Mar 27 '23 at 05:00
  • My bad! Use this answer https://askubuntu.com/a/1164639/231142 and blacklist the r8169 driver. I forgot to tell you that and you are probably having a driver conflict right now. No need to install the driver from that answer. – Terrance Mar 27 '23 at 13:28
  • @Terrance, thanks for the reply, but unfortunately that didn't work. When I ran sudo rmmod r8169, I got rmmod: ERROR: Module r8169 is not currently loaded. I added it to the blacklist anyways, but the link keeps dropping. When I set it to speed 1000, sudo dmesg still returns r8168: enp8s0: link down r8168: enp8s0: link up r8168: enp8s0: link down r8168: enp8s0: link up ... – Lucas P. Luiz Mar 27 '23 at 18:01
  • Oh, perform a hard power cycle of the system. Power off the host, disconnect all power. Hold in the power button for 15-30 seconds. Reconnect all power and power the host back on. Did you run the part of blacklisting the driver? echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf I have had to do this power cycle of my host where the r8169 driver hung on causing issues to the point of a simple reboot would not fix the issue. – Terrance Mar 27 '23 at 19:54
  • @Terrance, again thanks for the support, but sadly it didn't work. I did blacklist the driver and performed a hard power cycle. The problem is still there unfortunately. – Lucas P. Luiz Mar 27 '23 at 23:38
  • Last thing I would suggest would be possibly to back the 22.04 LTS to Kernel version 5.15. It seems that the 5.19 Kernel just has too many issues. I have gone back to the 5.15 for now and seems to have taken care of issues I was having in 22.04 LTS. Beyond that, I don't know what else to tell you other than possibly clean installing 22.04 LTS. sudo apt install linux-headers-5.15.0-69 linux-headers-5.15.0-69-generic linux-image-5.15.0-69-generic linux-modules-5.15.0-69-generic linux-modules-extra-5.15.0-69-generic – Terrance Mar 28 '23 at 01:00
  • @Terrance, I did try downgrading the kernel but it didn't work. I tried versions 5.15 and 5.13. 5.4 (which is the same in my ubuntu 18 didn't run). – Lucas P. Luiz Mar 28 '23 at 22:31

2 Answers2

2

I did manage to solve it by following these steps in this exact order using 5.19 kernel:

  1. Download "GBE Ethernet LINUX driver r8168 for kernel up to 5.19" from https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
  2. Extract it and run the autorun.sh file as sudo
  3. Restart the computer
  4. Run sudo ethtool -s enp8s0 speed 1000 autoneg on duplex full
  5. Unplug the Ethernet cable and replug it

I'm not sure which of these steps were or weren't necessary, but now it looks like it's working.


Edit

I also followed https://askubuntu.com/a/1334101/231142 as suggested by @Terrance in the comments.

  • 2
    That is strange! The 8.051.02 RTL driver will actually fail on my system, but the RTL8168 8.049.02 from the repos will work fine in both 5.19 and 5.15. I am glad that you got it working! +1 But, I will suggest that you look at https://askubuntu.com/a/1334101/231142 and change the version number to match the one you downloaded which is the 8.051.02, that way when Kernel updates happen DKMS will install the driver automatically into the new update. – Terrance Mar 28 '23 at 23:29
  • 1
    @Terrance, thanks! Just did that. Now dkms status shows r8168/8.049.02, 5.19.0-35-generic, x86_64: built r8168/8.051.02, 5.19.0-35-generic, x86_64: installed. – Lucas P. Luiz Mar 29 '23 at 11:28
  • 1
    You can remove the 8.049.02 driver from that kernel. sudo dkms remove r8168/8.049.02 – Terrance Mar 29 '23 at 13:20
0

This seems to have been fixed in the latest updates for Ubuntu 22.04. I've just installed kernel 5.19.0-38 and that has brought the speed back to 1 GB on my r8168. Tested transferring files to a memory card, seeing up to 500 Mb speeds (HD read speed limited).

David
  • 2,101
  • 13
  • 16
  • 25
  • The answer does not need to contain the network description. This is info that a question would contain. – David Apr 09 '23 at 08:15