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
r8168
driver into 22.04. Ther8169
driver is really flaky on theRTL8111/8168/8411
chipset.sudo apt install r8168-dkms
– Terrance Mar 27 '23 at 04:06sudo ethtool -s enp8s0 speed 1000 autoneg on duplex full
now (when I usedautoneg off
it returnedInvalid argument
). But now I getr8168: enp8s0: link up
r8168: enp8s0: link down
every minute onsudo dmesg
. Connection keeps dropping. Works normally inspeed 100
though. – Lucas P. Luiz Mar 27 '23 at 05:00sudo rmmod r8169
, I gotrmmod: 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 returnsr8168: enp8s0: link down
r8168: enp8s0: link up
r8168: enp8s0: link down
r8168: enp8s0: link up
... – Lucas P. Luiz Mar 27 '23 at 18:01echo "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:54sudo 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