1

The internet connection to my computer using Ubuntu 16.04.5 became very unstable over the last month after some updates Another computer on the same network, not using Linux, does not show issues. And this is not using a WiFi connection.

After some research, I found several references to issues related to the r8168 RealTek Ethernet controller I have with kernel 4.15.0-33.

Reading various answers, I found that I should install a newer version of the driver compatible with 4.15 linux kernels.

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

  • 63 ask to test a kernel which happen to be 4.15.0-33 which has the issue
  • 59 it is recommended to load latest r8168 driver version, so I downloaded and installed version 8.046.00 from .deb

But the connection is still unstable and afterwards when I use the following command to check driver installation there is a warning:

This is the output of dkms status:

bbswitch, 0.8, 4.15.0-32-generic, x86_64: installed  
bbswitch, 0.8, 4.15.0-33-generic, x86_64: installed  
bbswitch, 0.8, 4.4.0-134-generic, x86_64: installed  
nvidia-384, 384.130, 4.15.0-32-generic, x86_64: installed  
nvidia-384, 384.130, 4.15.0-33-generic, x86_64: installed  
nvidia-384, 384.130, 4.4.0-134-generic, x86_64: installed  
r8168, 8.046.00, 4.15.0-33-generic, x86_64: installed (WARNING! Diff between built and installed module!)  

And this is output of modinfo r8168 | grep -i version asked on similar issue discussions:

version:        8.046.00-NAPI  
srcversion:     EEF16FD7BFA162691D9F9DD  

So from dkms status I think the installation did not work properly, but I do not know what to do from there.

Could anyone point me to what I should do or could try?

EDIT:
I realize that sound card was not working anymore using kernel 4.15 as well. So I tried to start using older kernel 4.4.0-134. At least it solved the sound issue. But regarding the internet unstability, as r8168 8.046 did not build with that kernel, I re-installed the r8168-dkms package from synaptic (r8168-8.041) but it did not solve the internet issue which is still completely unstable using 4.4.0-134 & r8168-8.041.

muru
  • 197,895
  • 55
  • 485
  • 740

2 Answers2

1

Using the latest supported kernel for 16.04.5 (4.15.xx)...

Purge...

r8168-dkms v8.041

Reinstall...

r8168-dkms_8.046.00-1_all.deb

Edit /usr/src/r8168-8.046.00/dkms.conf...

PACKAGE_NAME="r8168"
PACKAGE_VERSION="8.046.00"
BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"

Add add this line...

MAKE="'make' -j$PROCS_NUM KVER=${kernelver}"

Then redo the dkms commands...

sudo dkms build...
sudo dkms install...

Then recheck the r8168 version info...

modinfo r8168 | grep -i version

reboot
heynnema
  • 70,711
  • Thank you for your help. Followed instructions from your answer below to purge r8168 and check: [link]https://askubuntu.com/questions/933055 Then reinstalled 8.046.00-1 version, added line in file (anyone trying this, you need to add a closing " at the end of the added line) – user867375 Sep 04 '18 at 19:07
  • Buid, install, check version like this: sudo dkms build r8168/8.046.00 -k "$(uname -r)/$(uname -p)" sudo dkms install r8168/8.046.00 -k "$(uname -r)/$(uname -p)"

    modinfo r8168 | grep -i version version: 8.046.00-NAPI srcversion: 1B7F4580601BCFA0300F9D2

    dkms status r8168, 8.046.00, 4.15.0-33-generic, x86_64: installed

    Reboot, internet still not stable after 30 seconds it goes off, then it comes back, then off etc.

    – user867375 Sep 04 '18 at 19:07
  • I corrected the incomplete line that you mention. Thanks. If I read correctly, dkms status now shows that r8168 v8.046 is installed, and has no (WARNING! Diff between built and installed module!). Correct? I'd recommend taking a DIFFERENT ethernet cable and connect it DIRECTLY from your computer, to your cable modem, or router, and see if the problem persists. – heynnema Sep 04 '18 at 23:54
  • You are correct regarding dkms status output. I just exchanged the ethernet cable from my wife's computer with mine, and it is still the same afterwards. My internet is unstable whereas it is working fine on her computer. – user867375 Sep 05 '18 at 18:43
  • What GNOME extensions do you have installed? What happens if you disable them here, does it change the symptoms? – heynnema Sep 05 '18 at 19:12
  • Not completely sure what you mean by GNOME extensions. When I connect to the site and installed the extension it required that I installed chrome-gnome-shell. I am using the gnome-session-flashback interface instead of the default Ubuntu one if that is an extension – user867375 Sep 05 '18 at 19:19
  • Playing with commands using old/new kernel, I just found that sudo lspci -vv return is missing number "Kernel modules" line with 4.15 kernel compared to 4.4. Specifically for the RTL8111/8168/8411 Ethernet Controller there is one difference that sounds potentially like a bug. 4.4 gives Capabilities: [d0] Vital Product Data Unknown small resource type 00, will not decode more. whereas 4.15 gives Capabilities: [d0] Vital Product Data pcilib: sysfs_read_vpd: read failed: Input/output error Not readable – user867375 Sep 05 '18 at 19:23
  • I don't know if that's a real error or not. What happens if you boot to a Ubuntu Live DVD? Does the ethernet problem still occur? If not, what version kernel is it running on? Also, check and see if you have more than one "Wired Connection" scripts. If so, disconnect the ethernet cable, delete all of the "Wired Connection" scripts, reconnect the ethernet cable... and if it doesn't recreate a new "Wired Connection" script on its own, create one. Retry ethernet/Internet. Report back. Also, do you have any files in /etc/netplan? – heynnema Sep 05 '18 at 20:24
  • I had 2 networks, but removing both and reboot did recreate only one but did not solve the issue (not sure if that is one what you mean by "wired connection" script). I do not have a folder /etc/netplan. Will try to reboot on 16.04 Live DVD now and report. – user867375 Sep 07 '18 at 18:42
  • boot with 16.04.4 live DVD using kernel 4.13.0-36 did not work either. – user867375 Sep 07 '18 at 19:07
  • @Raphael I don't know. I myself have had some weird ethernet issues recently. Windows 10 works fine. Ubuntu is giving me some strange symptoms that include a wonky network manager menu in the top panel. No 100% fix yet. – heynnema Sep 08 '18 at 00:37
  • Thank you for your time and help, as I have other issues regarding sound I think will try to install 18.04 to see if it solves the issue. – user867375 Sep 08 '18 at 15:07
  • Thank you for your time and help, as I have other issues regarding sound I think will try to install 18.04 to see if it solves the issue. – user867375 Sep 08 '18 at 15:07
  • I have installed 18.04.1 the problems related to sound etc are solved but internet still unstable. But I note that I am not using anymore dkms but instead another Kernel driver r8169, I guess this is normal? – user867375 Sep 08 '18 at 22:18
  • @Raphael Yes, the r8169 driver is the default driver, and the r8168 can replace it, if you're having problems with the r8169 driver. Please see my answer here about using netplan and NetworkManager together. Maybe it'll help you. – heynnema Sep 08 '18 at 23:13
  • in /etc/netplan, I have a file named 01-network-manager-all.yaml which contains the text you recommend so I guess I should not change anything # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager – user867375 Sep 09 '18 at 18:37
  • ok I think I found the cause of the issue. I suddenly realized that one thing that change around when the issue started is that I put the wifi on on my router for family visitors. I do not see the reason it creates issue but I just turned it off and for nearly 10mn I have not seen any internet interruption what is a record compared to before. I will put a message if happens to be a coincidence, else I will close the case in few days. – user867375 Sep 09 '18 at 18:54
0

The issue was eventually due to the router which was giving same ip address to my daughter's ipad she got from school in august and my computer. After delete/create the conection on my computer when her ipad was connected, my computer got a different ip adress and the issue was fixed. Should have found this earlier, I just did not know her ipad had been connected to our wifi.

Note that I had other issues with 16.04 and kernel 5.15 which were solved by installing 18.04 so something went broken for sure in my 16.04 system with newest kernel but the internet issue was most likely not linked to those as I had thought.