Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

Need help with peripherals or devices?
Post Reply
Message
Author
User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

[CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#1 Post by Danielsan »

Hi Folks,

I'll try to fix, on Debian Bullseye, this unstable connection with this ethernet card but I could not.

This is the card:

Code: Select all

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
This are the log with the firmware-realtek installed:

Code: Select all

sudo ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether a8:5e:45:a6:cf:ac brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.9/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
       valid_lft 21283sec preferred_lft 21283sec
    inet6 fe80::aa5e:45ff:fea6:cfac/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever


cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback


sudo dmesg | egrep 'enp2s0|r8169'
[    1.342829] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.361695] libphy: r8169: probed
[    1.361826] r8169 0000:02:00.0 eth0: RTL8168h/8111h, a8:5e:45:a6:cf:ac, XID 541, IRQ 125
[    1.361828] r8169 0000:02:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    1.362497] r8169 0000:02:00.0 enp2s0: renamed from eth0
[    3.442507] r8169 0000:02:00.0: firmware: direct-loading firmware rtl_nic/rtl8168h-2.fw
[    3.468268] Generic FE-GE Realtek PHY r8169-200:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-200:00, irq=IGNORE)
[    3.664540] r8169 0000:02:00.0 enp2s0: Link is Down
[    7.301775] r8169 0000:02:00.0 enp2s0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.301792] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready
[  858.732448] r8169 0000:02:00.0 enp2s0: Link is Down
[  867.815729] r8169 0000:02:00.0 enp2s0: Link is Up - 1Gbps/Full - flow control rx/tx
Then I removed the firmware and installed r8168-dkms:

Code: Select all

 sudo dmesg | egrep 'enp2s0|r8168'
[    1.324632] r8168: loading out-of-tree module taints kernel.
[    1.324723] r8168: module verification failed: signature and/or required key missing - tainting kernel
[    1.325633] r8168 Gigabit Ethernet driver 8.048.03-NAPI loaded
[    1.340065] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[    1.342069] r8168  Copyright (C) 2020  Realtek NIC software team <nicfae@realtek.com> 
[    1.342676] r8168 0000:02:00.0 enp2s0: renamed from eth0
[    3.461416] enp2s0: 0xffffbb120003d000, a8:5e:45:a6:cf:ac, IRQ 123
[    7.811982] r8168: enp2s0: link up
[    7.811998] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready

lsmod | grep r8168
r8168                 569344  0
It worked for a while but the connection became unstable, it looks like the driver is rejected. Anyway then I reinstalled the firmware as well but the situation is still the same, not sure what should I do, the wiki refers only to the wireless cards:

https://wiki.debian.org/rtl819x

Others pages viewed:
https://tuxbyte.com/how-to-get-your-rea ... ted-guide/
http://adam.rosi-kessel.org/weblog/2008 ... wn-problem
https://askubuntu.com/questions/1052971 ... e-troubles
https://forum.debianizzati.org/viewtopic.php?t=55207
http://forums.debian.net/search.php?st=0&sk=t&sd=d&sr=posts&keywords=realtek&start=45

I thought those issues with Realtek card were resolved... Anyway thanks in advance!!!
Last edited by Danielsan on 2021-03-30 20:32, edited 1 time in total.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#2 Post by Segfault »

The probability is high you have hardware failure. In other words, you wouldn't be the first one who has Realtek NIC gone bad. Get Intel, they make real NIC's. Realtek NIC is like winmodem, and Intel is like real hardware modem, if you remember those.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#3 Post by Head_on_a_Stick »

Danielsan wrote:not sure what should I do
Did you try disabling autoneg?

The ArchWiki suggests disabling IPv6 (ask the interweb how) but it is an apparently controversial and non-cited assertion.
deadbang

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#4 Post by Danielsan »

Segfault wrote:The probability is high you have hardware failure. In other words, you wouldn't be the first one who has Realtek NIC gone bad. Get Intel, they make real NIC's. Realtek NIC is like winmodem, and Intel is like real hardware modem, if you remember those.
The big issue is that I am trying to fix it by remote, everything attempt failed is a pain in the heck to restore the previous condition. I already suggested that quick solution is buying a new discrete INTEL PCI ethernet card, by any chance do you have any recommended model to suggest?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#5 Post by Head_on_a_Stick »

I have this one:

Code: Select all

% lspci -nn | grep Network
04:00.0 Network controller [0280]: Intel Corporation Wireless-AC 9260 [8086:2526] (rev 29)
%
It only cost £20 and it works perfectly under buster.
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#6 Post by stevepusser »

Head_on_a_Stick wrote:I have this one:

Code: Select all

% lspci -nn | grep Network
04:00.0 Network controller [0280]: Intel Corporation Wireless-AC 9260 [8086:2526] (rev 29)
%
It only cost £20 and it works perfectly under buster.
You must have too much blood in your coffeestream :lol: , since daniel's problem card is an wired NIC...unless you mean for him to go wireless.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#7 Post by Head_on_a_Stick »

Arse. Sorry OP, I'm an idiot.
deadbang

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#8 Post by Danielsan »

Head_on_a_Stick wrote:Did you try disabling autoneg?

The ArchWiki suggests disabling IPv6 (ask the interweb how) but it is an apparently controversial and non-cited assertion.
No I haven't and what I haven't done as well is blacklisting the rtl8169 but I guess since I uninstalled the realtek-firmware it shouldn't be available now...

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#9 Post by Danielsan »

Head_on_a_Stick wrote:Arse. Sorry OP, I'm an idiot.
No you don't! You are a great dude! 8)

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Realtek rtl8168/rtl8169 - is there a proven fix?

#10 Post by Danielsan »

We moved forward buying an Intel adapter... :roll:

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#11 Post by ticojohn »

I am running Bullseye and Buster (two different drives) and I have the same, or similar, device on my Gigabyte MB.

description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
The only issue I had was if I was on Bullseye and restarted the computer the network would lock up. I did some research and I think I found a solution. I installed the r8168-dkms package, which seems to be geared more towards that chip. Here is the package description from Synaptic.
r8168 is the Linux device driver released for RealTek RTL8111B/RTL8168B,
RTL8111/RTL8168, RTL8111C/RTL8111CP/RTL8111D(L), RTL8168C/RTL8111DP/RTL8111E,
RTL8168E/RTL8111F/RTL8411, RTL8111G/RTL8111GUS/RTL8411B(N), RTL8118AS,
RTL8111H(S)/RTL8118/RTL8119i
Gigabit Ethernet controllers with PCI-Express interface.
Don't know if that was the real cure to the problem as there were also some updates and upgrades at around the same time. If you see this message before you buy the new gear maybe you can check it out.
I am not irrational, I'm just quantum probabilistic.

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#12 Post by Danielsan »

I installed that package but it didn't change the issue, still the same troubles with the Realtek adapter.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#13 Post by ticojohn »

Danielsan wrote:I installed that package but it didn't change the issue, still the same troubles with the Realtek adapter.
Well, I didn't know if it would help, or not. But I thought it might be worth trying since there was no cost involved. Like others said, it may well be a hardware failure.
I am not irrational, I'm just quantum probabilistic.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#14 Post by ticojohn »

I know that this thread has been closed but wanted to add another bit of info. I found that the realtek r8169 driver may have an issue. Not the driver, per say, but the chip. When you do a shutdown the chip is apparently disabled and the linux driver doesn't know how to enable the chip, short of a complete power off. See this from the following link.

https://en.opensuse.org/SDB:Realtek_8169_driver_problem
The Realtek Windows driver disables the NIC at Windows shutdown time. The current linux r8169 driver does not know how to turn on the NIC from this disabled state, therefor the device will not respond, even if the driver loads and reports that the device is up.
I never noticed this with Buster but it has become an issue with Bullseye. I resolved this by installing the realtek-dkms module.
I am not irrational, I'm just quantum probabilistic.

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#15 Post by Danielsan »

ticojohn wrote: I never noticed this with Buster but it has become an issue with Bullseye. I resolved this by installing the realtek-dkms module.
Couldn't find it...

rtimai
Posts: 6
Joined: 2016-09-22 08:53

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#16 Post by rtimai »

I read Ticojohn's and Danielsan's comments, and I wanted to add my 2 cents to their comments to this closed thread. My system:

~$ lspci -nn | grep Network
02:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 2230 [8086:0887] (rev c4
~$ lsb_release -ds; cat /etc/debian_version; uname -srm; gnome-shell --version; echo $XDG_SESSION_TYPE
Debian GNU/Linux 11 (bullseye)
11.1
Linux 5.10.0-9-amd64 x86_64
GNOME Shell 3.38.6
wayland

A few months after upgrading to Bullseye, using the default Realtek r8169 kernel module driver without problems, my wired (ethernet) connection suddenly began to be disabled upon resume-after-suspend. I saw comments elsewhere that the proprietary Realtek r8101 driver could solve this issue, and so I installed it (also, `sudo sh -c 'echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf'`)

This appeared to solve the resume failure, only for a few days, then the issue returned. The REALLY ODD thing I discovered was, removing, then re-inserting the r8101 driver (sudo modprobe -r r8101 && sudo modprobe r8101) not only fixed the instance when the connection failed, but fixed the issue permanently -- I only had to perform the remove/re-insert procedure once.

So, maybe this might help some. At least worth a try, possible with other drivers as well.

The other thing is, I have not been able to find any information about removing the proprietary r8101 and restoring the supported r8169 driver anywhere.

~$ sudo modprobe r8169
modprobe: FATAL: Module r8169 not found in directory /lib/modules/5.10.0-9-amd64
[sudo] password for rtimai:

There are no .ko files in that folder, but buried deep below that in

/lib/modules/5.10.0-9-amd64/kernel/drivers/net/ethernet/realtek/

...and I'm afraid to tamper with it... If anyone can provide authoritative information about how to revert BACK to the supported r8169 driver, I'd appreciate it. This information is not explicitly provided anywhere I can find. The compiled installation of the r8101 driver does not provide an undo procedure.

neelus
Posts: 1
Joined: 2022-01-07 18:22

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#17 Post by neelus »

I just wanted to add my findings. I am trying to "re-install" debian on my NVidia TK1 dev board. Two days ago I was running the Buster installer and I had no problem with my ethernet driver. I updated the bootloader and the netboot installer files to Bullseye and now suddenly the installer is complaining it cannot find a network device. It is asking me to select a driver and trying to select r8192 does not work. The actual device is RTL8111GS.

After reverting my netboot files to Buster (which is failing on finding kernel modules) and the installer asks to load proprietary drivers and it could install them and I can ping my remote computer.

I am not very familiar with Debian, but the installer has changed which is blocking my LAN device.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#18 Post by steve_v »

Realtek network chips are like pot noodles, there are 50 brands using the same base recipe, new and "improved" flavours every month, and they all still taste vaguely like cardboard... And yet people just keep eating them, because they're dirt cheap.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

trogvar
Posts: 1
Joined: 2022-01-18 12:20

Re: [CLOSED]Realtek rtl8168/rtl8169 - is there a proven fix?

#19 Post by trogvar »

Had same issue with my Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
ASUS PN30 mini pc platform.
OS - Debian 11
PC connected to router Asus RT-N11P by CAT6 ethernet patchcord.

[Tue Jan 18 13:49:44 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:50:54 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:50:57 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:51:50 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:51:52 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:52:42 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:52:44 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:53:14 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:53:17 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:55:28 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:55:41 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:55:43 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:55:49 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control rx/tx
[Tue Jan 18 13:55:54 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:56:03 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:56:06 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:56:11 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control rx/tx
[Tue Jan 18 13:58:49 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:58:56 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control off
[Tue Jan 18 13:58:58 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 13:59:04 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control rx/tx
[Tue Jan 18 14:01:17 2022] r8169 0000:01:00.0 enp1s0: Link is Down
[Tue Jan 18 14:01:19 2022] r8169 0000:01:00.0 enp1s0: Link is Up - 100Mbps/Full - flow control rx/tx

Tried different drivers from R8618 8.048.03 to 8.049.02 and R8169 v.6.029.00.
Nothing helped.

Changed firmware on my router and the error is gone!
Last edited by trogvar on 2022-01-18 12:30, edited 1 time in total.

Post Reply