Network disconnects for a minute after sleep

I have the same NIC (Realtek 8168) that generally works ok with r8169 driver (Asus motherboard)
but it would sometimes be slow to connect after boot, so i changed to kernel driver r8168

I know Linux users with the same NIC on Gigabyte motherboards where r8169 driver does not work at all and r8169 driver must be blacklisted to use the r8168 driver

suggest try changing to r8168 kernel driver in

manjaro-settings-manager -m msm_mhwd

enable option in bottom left corner - Show All Devices

Look in section Network controller > RTL8111/8168/8411 for network-r8168

Right click on network-r8168 and select Install

Manjaro Settings Manager should install r8168 driver for each kernel version on system and blacklist the r8169 driver

1 Like

I had the same problem. Installing the r8169 also gave a problem which I figured out.
Ethernet Device from (sudo inxi -basic):
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Samsung Co driver: r8169 v: kernel port: 3000 bus ID: 06:00.0
chip ID: 10ec:8168
I attempted to update the driver r8169aspm-dkms with Kernel 5.4.67-1-MANJARO. Constantly got a failed installation. Then I finally read the comments that were referenced to in the installation. “linux/pci-aspm.h” was missing. The kernel had something similar from my reading but with a different name. Further reading online I saw that using a newer Kernel (5.7.19-2-MANJARO) might have linux/pci-aspm.h there. The problem came back for me today so just updating the driver did not work for me. I have to read the warning messages more in the logs. I upgraded to 59 but it crashed the system. 58 could not find the files for installation.I have been reading things wrong. This time two (4.14 ,4.19 )kernels seemed to have installed the r8169 correctly . 44,54, and 57 did not. Two kernels installed without error. When I went to the build this time there was no build folder. Installing with the newer Kernel must have fixed the missing file problem. This r8169-aspm is not working right with the dkms. I have no idea what is wrong. I fixed one problem but the bad dkms interaction did not go away. Before this I don’t think I got the new one installed at all but now I do. I started my computer without r8169 so I have a wireless connection via usb dongles. This is the installer info:
Preparing…
Cloning r8169aspm-dkms build files…
Checking r8169aspm-dkms dependencies…
Warning: r8169aspm-dkms-v4.15.3-2 is up to date – reinstalling
Resolving dependencies…
Checking inter-conflicts…

Building r8169aspm-dkms…
==> Making package: r8169aspm-dkms v4.15.3-2 (Tue 20 Oct 2020 06:13:05 PM KST)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
-> Updating r8169_aspm git repo…
Fetching origin
-> Found dkms.conf
-> Found blacklist-r8169-dkms.conf
==> Validating source files with sha256sums…
r8169_aspm … Skipped
dkms.conf … Passed
blacklist-r8169-dkms.conf … Passed
==> Removing existing $srcdir/ directory…
==> Extracting sources…
-> Creating working copy of r8169_aspm git repo…
Cloning into ‘r8169_aspm’…
done.
==> Entering fakeroot environment…
==> Starting package()…
==> Tidying install…
-> Removing libtool files…
-> Purging unwanted files…
-> Removing static library files…
-> Compressing man and info pages…
==> Checking for packaging issues…
==> Creating package “r8169aspm-dkms”…
-> Generating .PKGINFO file…
-> Generating .BUILDINFO file…
-> Generating .MTREE file…
-> Compressing package…
==> Leaving fakeroot environment.
==> Finished making: r8169aspm-dkms v4.15.3-2 (Tue 20 Oct 2020 06:13:08 PM KST)
==> Cleaning up…

Checking keyring…
Checking integrity…
Loading packages files…
Checking file conflicts…
Checking available disk space…
==> dkms remove --no-depmod -m r8169_aspm -v v4.15.3 -k 4.14.202-1-MANJARO
==> dkms remove --no-depmod -m r8169_aspm -v v4.15.3 -k 4.19.152-1-MANJARO
==> Unable to remove module r8169_aspm/v4.15.3 for kernel 5.7.19-2-MANJARO: Not found in dkms status output.
==> Unable to remove module r8169_aspm/v4.15.3 for kernel 4.4.240-1-MANJARO: Not found in dkms status output.
==> Unable to remove module r8169_aspm/v4.15.3 for kernel 5.4.72-1-MANJARO: Not found in dkms status output.
Reinstalling r8169aspm-dkms (v4.15.3-2)…
Running post-transaction hooks…
Arming ConditionNeedsUpdate…
Install DKMS modules
==> dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 5.7.19-2-MANJARO
Error! Bad return status for module build on kernel: 5.7.19-2-MANJARO (x86_64)
Error while configuring
Consult /var/lib/dkms/r8169_aspm/v4.15.3/build/make.log for more information.
==> Warning, dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 5.7.19-2-MANJARO' returned 10 ==> dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 4.4.240-1-MANJARO Error! Bad return status for module build on kernel: 4.4.240-1-MANJARO (x86_64) Error while configuring Consult /var/lib/dkms/r8169_aspm/v4.15.3/build/make.log for more information. ==> Warning, dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 4.4.240-1-MANJARO’ returned 10
==> dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 5.4.72-1-MANJARO
Error! Bad return status for module build on kernel: 5.4.72-1-MANJARO (x86_64)
Error while configuring
Consult /var/lib/dkms/r8169_aspm/v4.15.3/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 5.4.72-1-MANJARO’ returned 10
==> dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 4.14.202-1-MANJARO
==> dkms install --no-depmod -m r8169_aspm -v v4.15.3 -k 4.19.152-1-MANJARO
==> depmod 4.4.240-1-MANJARO
==> depmod 5.7.19-2-MANJARO
==> depmod 4.19.152-1-MANJARO
==> depmod 4.14.202-1-MANJARO
==> depmod 5.4.72-1-MANJARO
Transaction successfully finished.

$ modinfo -V r8169
kmod version 27
+XZ +ZLIB +LIBCRYPTO -EXPERIMENTAL (Experimental: I think the installer is a work in progress)

Same computer ran LinuxMint with no problems for years. Linux mint was painfully slow. The Linux kernels were all 4…
With Manjaro 2 of the 4. kernels seemed to install OK. None of the 5… Kernels installed without a problem I disconnected the cable from my Netgear N600 WiFi Range Extender. Put a WiFi dongle into my USB port and blocked the module r8169. No problems yet. When the module was active and failed it stopped the wifi in the Network manager also with no internet. I think the installer is not compatible with the kernels. I also think that the when the module r8169 fails it takes down the network manager with it preventing the use of Wifi.

Started Manjaro with Kernel 4.19.152-1-MANJARO. Went into hibernation. After getting things going again the Ethernet connection still was functional and the Network manager still was in the panel. I am really thinking that the driver setup problem is related to the setup file and the Kernel that is used for the setup.

Kernel 5.7 may be EOL but 5.8 caused too many problems on my computer along with a Nvidia driver update (problem connected???). It also made the 5.7 bad both Kernels with the problem with light display manager which eventually I corrected in 5.7.

1 Like

Unfortunately, Kernel 5.7 is EOL so…

I’ve tried r8168 driver and it did not appear to make a difference :frowning:

@ImConfused from what I see, r8169aspm is another driver? This one? AUR (en) - r8169aspm-dkms

It appears to be deprecated though: GitHub - KastB/r8169: Linux driver for Realtek network chips with enabled ASPM

The driver I was using was r8169aspm-dkms v 4.15.3-2. When I tried to use an r8168 it did not work for me. r8169 was the first one that was installed for my Manjaro setup. The r8169aspm-dkms v 4.15.3-2 did work on the kernel 4.19.152-1-MANJARO when I tested it. The Network manager was there after a long period of inactivity under the r8169aspm-dkms v 4.15.3-2 kernel. I just had to sign into my wifi connections again when it worked.The ethernet connection was still there.

My Asus motherboard worked with either version of driver for many years, until it started getting intermittent disconnection problems and I had to use r8186 (about 2 years ago)
But other users would have problems with r8168 driver and need r8169

Installing an r8168 driver from AUR is not enough to get r8169 driver replaced
Manjaro Settings Manager installs the driver matched to the Manjaro kernel
(eg Linux58-r8168 for kernel v5.8)
and linux58-headers
and also creates a file in /etc/modprobe.d/ to blacklist the r8169 driver

A user on old Manjaro forum created search tags for r8168 and r8169 because there were regular issues reported with these drivers

He even worked out commands to load and unload each driver so a user could test both drivers

Ethernet is not working any more (but Wi-Fi still works) - Networking - Manjaro Linux Forum

If the r8168 driver has been installed you can test either driver in this manner.

To test the r8168 driver:

sudo modprobe -r r8168 && sleep 3 && sudo modprobe r8168 && systemctl restart NetworkManager

To test the r8169 driver:

sudo modprobe -r r8168 && sleep 3 && sudo modprobe r8169 && systemctl restart NetworkManager
1 Like

I was having problems with my MSI tomahawk. Some times it didn’t had Network and other times only wifi, after applying the test for r8169 it detected and configured the Ethernet cable.

Thanks for this! :slight_smile: