Ubuntu 20.04 Connection failed

Recently installed Ubuntu 20.04 on my desktop pc and I have problem with wired connection on it. Every time I'm trying to connect I see the message "Connection failed. Activation of network connection failed". I have already tried to connect to my router through static ip, connect without the router, disabling IPv6 in my system and all the solutions from this site - sorry for russian, it's my native language and this site have a lot of possible solutions. Oh, and when I'm loading with ubuntu Live CD or in second OS Windows 10 there are no connection problems at all. So nothing helped for now. I can give any additional info needed. Please, help. @heynnema @nate Sorry for bothering you, I just turned off my pc for a couple of hours and now when I've turned it on connection just successfully established without a problem. Looks like one of the solutions solved my issue and I even didn't notice it in a moment. If it's still matters here's listing for your request: terminal

@heynnema here's output on your request: 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)

And also problem came back, I don't think that I changed anything about my network connection, but it is broken again, same problem as before. About your past requests all that changed is in "ip a" enp2s0 has no more inet line in it

UPD: I don't know what's going on, connection failed and nothing helpes, I'm rebooting my PC and booting it in Win10 for several hours, after that I'm coming back in Ubuntu and everything working without any problem.

UPD 19.06 @heynnema Looks like this patch is not working for me, I'm pretty sure that I have installed it just like said in the instructions and nothing has changed, after reboot I'm still having connection problems.

@heynnema If by status you mean am I still havine problem then yes, I am. Everything just like before - if I reboot Ubuntu to Ubuntu then my connection failed, if I reboot Ubuntu-Win10-Ubuntu everything working fine. Sorry for bothering you so much, I just don't know what to do. Maybe I should just try to buy another network adapter if problem is in my hardware.

@heynnema Maybe I did something wrong? Here's the file which I have added in /etc/initramfs-tools/scripts/init-top and chmod a+x it. Here is my GRUB command line after editing: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash r8169_disable_msi" After that I have updated initframs and updated grub as it said in instructions. What can be wrong?

UPD Yes, I rebooted after the patch.enter image description hereenter image description here

15

2 Answers

Edit /etc/network/interfaces, and change it to this...

auto lo
iface lo inet loopback

Your ethernet is connecting at 100Mb, but it's capable of 1Gb. This is either a cable problem (most common), or a switch/hub/router that's not capable of gigabit connections. Are you using cat 5e or cat 6 cables?

Update #1:

lspci -nn | grep -i ethernet = 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)

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
#
#
# Attached is a work-around for the in-kernel driver that is as unhacky as I can make it.
# 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.)
# 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..
# Still hoping we can cherry pick the in-driver workaround for bionic...?
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

Update #2:

The patch is working, but the ethernet is still failing, because the symlinks in /boot are wrong. See below...

enter image description here

Update #3:

cd /boot # change directory

ls -al # get current listing

sudo rm -i initrd.img # delete bad symlink

sudo rm -i vmlinuz # delete bad symlink

sudo mv initrd.img.old initrd.img # rename remaining symlink

sudo mv vmlinuz.old vmlinuz # rename remaining symlink

sudo ln -s initrd.img-5.8.0-43-generic initrd.img.old # recreate symlink

sudo ln -s vmlinuz-5.8.0-43-generic vmlinuz.old # recreate symlink

ls -al # compare new symlinks to original listing

reboot # reboot and verify ethernet operation

4

For me, disabling and enabling Hyper-V then restarting pc have resolved my problem :)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like