0

I'm a complete novice at Linux. I tried running Ethernet on Ubuntu 20.04 and it didn't run, I got nothing, not even wired unmanaged. Ethernet is working fine on Windows 10. The Output of

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:05:00.0 logical name: enp5s0 version: 15 serial: 2c:f0:5d:66:42:09 size: 1Gbit/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.11.0-27-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:45 ioport:f000(size=256) memory:fe904000-fe904fff memory:fe900000-fe903fff

It was disabled earlier, but after following this solution, it showed wired unmanaged. I've tried various other solutions. None works for me so far. Some solutions are specific to Ubuntu 18.04 or older.

Terrance
  • 43,712

1 Answers1

0

After your fixes, you may find that ethernet is either intermittent, or only works after booting into Windows.

MSI/MSIX interrupts were enabled for certain ethernet cards in Ubuntu 20.xx. This can cause intermittent ethernet operation. Here's a patch to fix it. Follow the embedded instructions to install.

#!/bin/sh

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1779817

filename: r8169_disable_msi

Drop it in /etc/initramfs-tools/scripts/init-top and chmod a+x it. Add 'r8169_disable_msi'

to your kernel command line (/etc/default/grub, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

usually.)

sudo -H gedit /etc/default/grub # to edit the file

Remember to update-initramfs and update-grub as necessary.

sudo update-initramfs -c -k $(uname -r)

sudo update-grub

reboot

For the moment it disables MSI on everything with the ID 0x10ec:0x8168, as there seems to

be no way to get the MAC version from userspace - and certainly not before the driver is

loaded. Other PCI IDs may need adding..

PREREQ="" prereqs() { echo "$PREREQ" } case $1 in

get pre-requisites

prereqs) prereqs exit 0 ;; esac

disable_msi () { for i in /sys/bus/pci/devices/*; do if [ $(cat $i/vendor) = "0x10ec" -a $(cat $i/device) = "0x8168" ]; then echo 0 >$i/msi_bus fi done }

for x in $(cat /proc/cmdline); do case ${x} in r8169_disable_msi) disable_msi break ;; esac done

heynnema
  • 73,649