[Resolved] Problems with r8168 & r8169 driver (Kernels 5.0 & 5.1)

How is this?

I have marked "Allow Automatic Negotiation" in the Network Manager configuration, but can't connect at any speed, it's not a specific problem of speed, it's a problem of not being able to connect (100 Mbits , 1Gbit, half duplex, full duplex or anything)

you need to restart the PC after making this change. When I changed it over, my onboard realtek LAN adaptor powered off. Yours may be doing the same when you alter settings. These devices can be a nightmare at times. But also stating the obvious, check the condition of the cables and that the connections are secure.

Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte driver: r8169 v: kernel 
           port: e000 bus ID: 01:00.0 chip ID: 10ec:8168 
           IF: enp1s0 state: up speed: 1000 Mbps duplex: full mac: ******

@anon71843593 but you are using a specific module or compilated module for you? Or use the linux5x-r8168 package?

Do you have the module r8169 on blacklist? I dont understand your configuration. Can explain me?

Thanks a lot!

The cable are OK and the connection is secure, I tested the same cable and connection with other notebook and in the same notebook using Live USB and another distro and works fine

Once again, did you reboot after removing (changing ) the driver?
As mentioned, these chips like to turn off after changing the driver, and/or settings, any settings.

1 Like

I have not compiled my own as it isn't necessary and there is no separate module package installed. I use the standard linux kernel module for r8169.

I removed r8168 from my system using Manjaro Settings Manager>Hardware Configuration which meant the r8169 blacklist also got removed at the same time.

I have a few suggestions:

Check if there has been a bios update since April.

Do a hard power down and reset your bios.

Disconnect any other network devices that do not require troubleshooting. This includes LAN cables, USB to Ethernet adapters, and USB phone tethering. Turn your wifi off via your function key(s).

Power down the laptop and remove the battery and power plug. Let the laptop sit without power for a few minutes. Then, hold down the power button for approximately 30 seconds. Pressing the power button will help drain all left over power from the unit’s motherboard.

Then reattach the AC power (no battery), and restart. Boot into the BIOS settings utility and reset the BIOS back to the factory default and save the default settings. See if it will boot correctly with the factory default settings. If not, you may have to change a few settings in the BIOS (such as secure boot) to get Manjaro to boot correctly.

After restarting check your connection for any changes.

Also try this:

This is a script that should reinitiate your connection (hopefully this will help).

Create the script with an appropriate name and location such as:

/usr/local/sbin/lan-restart.sh

Add the following contents to the script:

#!/bin/bash
sudo -u $USER /bin/bash -lc 'nmcli networking off'
sleep 1
sudo systemctl stop NetworkManager
sleep 1
sudo ip link set eno1 down
sudo sleep 1
sudo modprobe -r r8168
sudo modprobe -r r8169
sleep 3
sudo modprobe r8169
sleep 2
sudo ip link set eno1 mode default
sleep 2
sudo ip link set eno1 up
sleep 2
sudo systemctl start NetworkManager
sleep 1
sudo -u $USER /bin/bash -lc 'nmcli networking on'

Save the file, and exit the text editor.

Be sure to make the script executable:

sudo chmod +x /usr/local/sbin/lan-restart.sh

Launch the script:

sudo /usr/local/sbin/lan-restart.sh
1 Like

After restart + create script and run this. The problem continue:

[  273.227577] r8169 0000:3b:00.0 eno1: Link is Up - 100Mbps/Full - flow control rx/tx
[  273.233806] r8169 0000:3b:00.0 eno1: Link is Down
[  287.084470] r8169 0000:3b:00.0 eno1: Link is Up - 100Mbps/Full - flow control rx/tx
[  287.090919] r8169 0000:3b:00.0 eno1: Link is Down
[  300.935237] r8169 0000:3b:00.0 eno1: Link is Up - 100Mbps/Full - flow control rx/tx
[  300.941988] r8169 0000:3b:00.0 eno1: Link is Down
[  314.759724] r8169 0000:3b:00.0 eno1: Link is Up - 100Mbps/Full - flow control rx/tx
[  314.766753] r8169 0000:3b:00.0 eno1: Link is Down
[  328.742445] r8169 0000:3b:00.0 eno1: Link is Up - 100Mbps/Full - flow control rx/tx
[  328.749694] r8169 0000:3b:00.0 eno1: Link is Down
[  342.583626] r8169 0000:3b:00.0 eno1: Link is Up - 100Mbps/Full - flow control rx/tx
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
           IF: eno1 state: down mac: f4:30:b9:ae:bb:9c 
           Device-2: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter driver: r8822be 
           IF: wlo1 state: up mac: 54:13:79:2f:6a:53 
           IP v4: 192.168.0.41/24 type: noprefixroute scope: global 
           IP v6: fe80::2281:11a5:72a2:d7b3/64 type: noprefixroute scope: link 
           WAN IP: 190.188.188.84 

:disappointed_relieved:

Disable IPv6 in network manager and or your router.

(edit) above suggestion was the solution^^^

Try the following procedure to help identify what is causing this issue.

Turn off your wifi via your function keys (airplane mode etc).

Run the command below to output a live log detailng your current network activities:

journalctl -fu NetworkManager 

Let the command run in the terminal and log all current network activity.

Try reinitiating your network connection while the logging is taking place with the following command:

sudo systemctl stop NetworkManager; sudo ip link set eno1 down; sudo modprobe -r r8168; sudo modprobe -r r8169; sleep 3; sudo modprobe r8169; sudo ip link set eno1 up; sudo systemctl start NetworkManager

Log at least 50 lines of output around when you are trying to initiate a connection to your network.

Post important excerpts from the log around failure events.

From now on please post both the input and output of any command or script that is run.

Please post:

dmesg | grep -iE 'enp|eth|r816'
2 Likes

@tbg Yes, I installed a BIOS update two weeks ago.

Did these problems coincide with the bios update?

If so, perhaps it might be a good idea to try rolling back to the prior bios.

See the above additions on my last post^^^

Also please confirm that you have executed any procedure that I have requested you to perform. I must know exactly what you have or haven't done.

After disable IPv6 into the router and Network Manager, voilá!

Now working fine again! So... the problem is IPv6 with this BIOS (?) + r8169 + 5.x kernel.

Thanks a lot to all! :clap:

Whew you were beginning to worry me there for a minute that this would be a really tough one. I'm glad that fixed it for you. :sweat_smile:

1 Like

Hi All! I'm here again because after apply the last update (with 5.2.4-1-MANJARO kernel) the problem back. I cant use with the wired connection, the interface is in looping trying to connect.
The state on NetworkManager constantly are in: "setting network address" and finally show the message: Interface Disabled

I dont know what happens in a point time of the last months but my wired connect magically stop of work fine and continuously fail.

I haven't changed anything other than installing the system updates :frowning:

Have you tried the older lts 4.19 kernel.

1 Like

Yes, I rollback to the previous kernels and the problem persist. I check the last network manager logs and don't remember seeing these lines before:

ago 07 12:55:38 mustang NetworkManager[26141]: [1565193338.8520] device (eno1): state change: ip-config -> deactivating (reason 'user-requested', sys-iface-state: 'managed')
ago 07 12:55:38 mustang NetworkManager[26141]: [1565193338.8528] audit: op="device-disconnect" interface="eno1" ifindex=6 pid=11056 uid=1000 result="success"
ago 07 12:55:38 mustang NetworkManager[26141]: [1565193338.8529] device (eno1): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
ago 07 12:55:38 mustang NetworkManager[26141]: [1565193338.8657] dhcp4 (eno1): canceled DHCP transaction
ago 07 12:55:38 mustang NetworkManager[26141]: [1565193338.8658] dhcp4 (eno1): state changed unknown -> done

Maybe something changed and this may be a clue, but I can't find the solution!

I would also test the 5.0 real time kernel as well as 5.3rc.

Please specify which driver (kernel module) is causing you this issue, internal (r8169), or 3rd party external (r8168)..

Well... I changed the cable (again, the previous time not change nothing) and problem resolved. It's really rare because has been works fine on -windows- :see_no_evil::hear_no_evil::speak_no_evil: hahaha

Thanks a lot to all!

Actually that really isn't that rare. Linux is often more fussy about poor cabling than Windows. What is rare is that those on help threads will ever believe that (when you tell them and upgrade their cabling). :smile:

Glad you got it working.

3 Likes

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

Forum kindly sponsored by