Realtek r8169 driver - Internet drops

Problem

Intermittently no internet on newly installed single boot manjaro. Here's my inxi -Fx

System:    Host: strange-potato Kernel: 5.4.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 Desktop: Xfce 4.14.2 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: H61M-K v: Rev X.0x serial: 161190399802651 BIOS: American Megatrends v: 0801 
           date: 07/21/2014 
CPU:       Topology: Dual Core model: Intel Core i3-2100 bits: 64 type: MT MCP arch: Sandy Bridge rev: 7 L2 cache: 3072 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24754 
           Speed: 1597 MHz min/max: 1600/3100 MHz Core speeds (MHz): 1: 1597 2: 1596 3: 1596 4: 1601 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel 
           bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.7 driver: intel unloaded: modesetting resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel Sandybridge Desktop v: 3.3 Mesa 19.3.4 direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.18-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK P8 series driver: r8169 v: kernel 
           port: e000 bus ID: 03:00.0 
           IF: enp3s0 state: down mac: 2c:4d:54:4e:7d:1f 
           Device-2: Ralink MT7601U Wireless Adapter type: USB driver: mt7601u bus ID: 2-1.5:5 
           IF: wlp0s29u1u5 state: up mac: c8:3a:35:c8:60:3e 
Drives:    Local Storage: total: 931.51 GiB used: 135.98 GiB (14.6%) 
           ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-22MFCA0 size: 931.51 GiB 
Partition: ID-1: / size: 72.83 GiB used: 9.19 GiB (12.6%) fs: ext4 dev: /dev/sda11 
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 181 Uptime: 31m Memory: 3.72 GiB used: 1.45 GiB (38.9%) Init: systemd Compilers: gcc: 9.2.1 Shell: bash 
           v: 5.0.16 inxi: 3.0.37 

  • For the most part, after startup, link light is off. dmesg just says Link is Down.
  • If link light is ON and IPV4 is set to Automatic then dmesg | grep r81 shows this-
[ 1416.109545] RTL8211E Gigabit Ethernet r8169-300:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=r8169-300:00, irq=IGNORE)
[ 1416.266288] r8169 0000:03:00.0 enp3s0: Link is Down
[ 1786.094803] RTL8211E Gigabit Ethernet r8169-300:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=r8169-300:00, irq=IGNORE)
[ 1786.265999] r8169 0000:03:00.0 enp3s0: Link is Down
  • If link light is ON and IPV4 is set to Manual(manual setting is correctly done, I have used manual previously on Linux Mint) then dmesg | grep r81shows Link is Down and Link is Up in a loop, as in it connects and disconnects frequently. Forgot to copy the output of journalctl -f at that time. I faced this problem in Linux Mint too. Couldn't solve it either then.
    EDIT Here's the snippet of journalctl -f while connection is in loop.
Apr 14 18:22:25 strange-potato kernel: audit: type=1130 audit(1586866945.068:105): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 14 18:22:25 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:27 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
Apr 14 18:22:28 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:30 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0058] device (enp3s0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0074] policy: auto-activating connection 'wired' (a43d0459-5932-45a8-85e1-96d118e7d4d2)
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0088] device (enp3s0): Activation: starting connection 'wired' (a43d0459-5932-45a8-85e1-96d118e7d4d2)
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0091] device (enp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0099] manager: NetworkManager state is now CONNECTING
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0112] device (enp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0122] device (enp3s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato avahi-daemon[597]: Joining mDNS multicast group on interface enp3s0.IPv4 with address 192.168.1.26.
Apr 14 18:22:30 strange-potato avahi-daemon[597]: New relevant interface enp3s0.IPv4 for mDNS.
Apr 14 18:22:30 strange-potato avahi-daemon[597]: Registering new address record for 192.168.1.26 on enp3s0.IPv4.
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0147] device (enp3s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0462] device (enp3s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0466] device (enp3s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0474] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0490] manager: NetworkManager state is now CONNECTED_SITE
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0492] policy: set 'wired' (enp3s0) as default for IPv4 routing and DNS
Apr 14 18:22:30 strange-potato NetworkManager[600]: <info>  [1586866950.0717] device (enp3s0): Activation: successful, device activated.
Apr 14 18:22:30 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:32 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
Apr 14 18:22:33 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:34 strange-potato systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Apr 14 18:22:34 strange-potato audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 14 18:22:34 strange-potato kernel: audit: type=1131 audit(1586866954.872:106): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 14 18:22:35 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
Apr 14 18:22:36 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:37 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
Apr 14 18:22:38 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:40 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
Apr 14 18:22:41 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Apr 14 18:22:42 strange-potato kernel: r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx

  • Sometimes, everything works after boot and internet is available, but after some random time of usage like 30, 50, 2/3hr, connection drops suddenly.

Steps I followed from other forums posts

  1. Restarting router - did not work
  2. Unplugging and plugging Ethernet - worked once or twice
  3. disabled ipv6 in nm-applet.
  4. deleting the ethernet profile and creating a new one in nm-applet - never worked, this triggered frequent connects and disconnects situation mentioned above
  5. installed r8168 from pacman -S r8168. blacklisted r8169. But modprobe r8168 showed -
modprobe: FATAL: Module r8168 not found in directory /lib/modules/5.4.18-1-MANJARO
  1. Tried to build r8168 from https://aur.archlinux.org/packages/r8168-dkms/, couldn't implement the patches. Error:
Unable to install module r8168/8.048.02 for kernel 5.4.18-1-MANJARO: Missing kernel headers.
  1. Tried to install network-r8168 from Manjaro Settings Manajer > Hardware Configuration. Error message-
Waiting for user input...
Starting
> Installing network-r8168...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/db/pci/network_drivers/r8168/MHWDCONFIG
Processing classid: 0200
:: Synchronizing package databases...
error: target not found: linux54-r8168
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
Error: pacman failed!
Error: script failed!


Done ...

I am desperate for help now. Thanks in advance.

This error message is straight forward. You do not have the linux-headers package for your kernel installed.

The following command will install the linux-headers automatically for all installed kernels:

sudo pacman -S $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

*credit @dalto for the command

This is likely a kernel issue that is affecting some specific r8168 hardware revisions.

1 Like

shows this error -

error: target not found: linux54-headers

Post:

mhwd-kernel -li 

o/p of

Currently running: 5.4.18-1-MANJARO (linux54)
The following kernels are installed in your system:
   * linux54
sudo pacman-mirrors -f 5 && sudo pacman -Syyu && sudo pacman -S linux54-headers

thanks, not working though error: target not found: linux54-headers

You did not post the outputs to the other commands. Therefore I must assume they were not executed. The headers should install on any sysystem that is properly updated, if not you have likely seriously messed your system. They install just fine on my systems, so I have no idea what's up with yours.

Leave r8168 alone, it really is the past.

A fix for timeouts is exactly the last thing that managed to land in 5.7.
Give it a check.
EDIT: or it could be this other bug

1 Like

finally installed r8168-dkms. After some synchronization issue, But after modprobe r8168 error is this -

modprobe: FATAL: Module r8168 not found in directory /lib/modules/5.4.18-1-MANJARO

here's dkms status

r8168, 8.048.02, 5.4.31-1-MANJARO, x86_64: installed

This probably happened cause dkms installed r8168 for 5.4.31-1-MANJARO but modprobe tries to load from 5.4.18-1-MANJARO. What should I do now? Thanks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by