Wired ethernet stops working after a few minutes after update to kernel 6.1.53-1

After the update from kernel 6.1.51-1-MANJARO to 6.1.53-1-MANJARO my ethernet card started to behave strangely. After a reboot it comes up nicely, network works, but after some time of one to several minutes, it suddenly stops working and in the journal I see the messages:

Sep 21 17:30:51 mycomp kernel: enp2s0: pci link is down 
Sep 21 17:30:51 mycomp kernel: enp2s0: cmd = 0xff, should be 0x07 

which repeats every 2 to 3 seconds.

The ethernet card according to lspci -knn is a:

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
	Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1043:205f]
	Kernel driver in use: r8168
	Kernel modules: r8169, r8168

lsmod | grep r8168 on the new kernel sais:

r8168                 221184  0

while on the old one it was:

r8168                 532164  0

So the size is quite different.

Is this a kernel/driver bug? Or is there anything I can do? (Apart from downgrading the kernel).

Yes. :slight_smile:

Yep, I suspected as much. :wink:

Yep, suspect identified. :wink:

Yes, there is. First of all — for the record — we are currently working on fixing the broken r8168 driver. But… If your hardware is newer than, say, five years old, then you are better off with the in-kernel r8169 driver.

r8168 is an out-of-tree driver, which means that it’s supplied by Realtek, but it’s not part of the official kernel sources upstream. The reason why Manjaro supplies this driver and uses it as the default for RTL8111/8168/8411 is that some older variants of this chipset would not work with the official in-kernel r8169 driver.

So, again, if your hardware isn’t older than five years, then what you must do is fire up the Manjaro Settings Manager and uninstall the r8168 driver. Then, check whether a blacklist file exists on r8169 under /etc/modprobe.d, and if it does, delete it.

Then reboot, and r8169 will be loaded, and you will have Ethernet again. :wink:


Try replacing r8168 driver with r8169 driver

sudo modprobe -r r8168; sudo modprobe r8169

If that works, r8168 driver and blacklist for r8169 can be removed

sudo mhwd -r pci network-r8168

Thanks a lot for the clarification and suggestions @Aragorn and @nikgnomic!

Very helpful, so at least I know now where the problem is.

Unfortunately, the notebook is from 2016 and the r8169 driver does not work. Excerpt from journalctl after trying to load it:

Sep 23 10:47:01 mycomp kernel: r8169 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible
Sep 23 10:47:01 mycomp kernel: r8169 0000:02:00.0: Mem-Wr-Inval unavailable
Sep 23 10:47:01 mycomp kernel: r8169 0000:02:00.0: unknown chip XID fcf, contact r8169 maintainers (see MAINTAINERS file)

So, no luck there.
@Aragorn, you say bugfixing is underway. Am I correct in assuming that upgrading to a newer Manjaro kernel e. g. the 6.4 or 6.6 lines will be to no avail in this respect?

Anyway, the notebook still has working WiFi, so the problem is not really urgent.

r8168 driver is partially working after latest update in Testing branch - working on kernel 6.1 but not 6.5
R8168 driver not loaded on kernel 6.5 after Testing update 2023-09-22

I have seen this sort of error before for audio devices

r8169 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible`

If the NIC is in hibernated state (D3cold) it might have been hibernated by fast startup feature on Windows OS
But if your system is not dual-booting, or fast startup is turned off, this may be a useful indicator for other users that a system requires r8168 driver

1 Like

There’s no Windows on any of my computers, so that’s not the problem on my system. :smile: Seems like my network device is too old for the r8169 driver.

I just tested the notebook with the 6.5 kernel, but same problem there with the r8168 driver (and also with the r8169 driver not working with my hardware).

I now downgraded the kernel to the previous LTS version 5.15.131-1-MANJARO and it looks like the r8168 driver is working fine there. - At least the problem has not come up after some 15 minutes, now.

Ok, forget what I said: Just now, the r8168 driver stopped working on the 5.15.131-1-MANJARO kernel, too. :unamused: - So same problem there, as well!

Ok, revert, revert, revert what I said above!!

The r8169 driver is working after all!! @nikgnomic your hint about the hibernate state got me thinking. What I tried before was just sudo modprobe -r r8168; sudo modprobe r8169 as you suggested above after the network problem had occured. That resulted in the

r8169 0000:02:00.0: Unable to change power state from D3cold to D0, device inaccessible`

error message and the r8169 driver did not work. But obviously that was only due to the messed up state the hardware was left in after the failed r8168 driver.

Now I tried to do a complete sudo mhwd -r pci network-r8168, then I shut down the system, powered off and restarted. After that the r8169 driver seems to work just fine. And I am back on kernel 6.1.53-1-MANJARO.

Thanks a lot, guys!!! Problem seems to be solved!

And my system even has improved: Using a standard mainline kernel driver now. I’m thrilled! :smiley:


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