You are not logged in.

#1 2018-09-08 15:39:56

saronno
Member
Registered: 2009-10-02
Posts: 213

[SOLVED] Network malfuctioning with realtek chip based card ..

I have a very weird problem with my network card (integrated in the main board).
It started a couple of mounths ago.

When you start, or restart or even if you wake up the pc from sleep, network hangs.
DHCP server from my router give him the IP and everything seems fine but network works
bad and if you ping a website you get just a packet ot two back (sending 10-15 packets to the server).

So I wrote a little script to reset everything.

#!/bin/bash
systemctl stop NetworkManager
modprobe -r r8169
modprobe r8169
systemctl start NetworkManager

As you can see, I use NetworkManager, and the script restart it and reload the network card module.

Sometimes it works immediatly. Sometime I have to use it 2-3-4 times before everything is again in good working condition.
Network works fine until you put again the pc at sleep or shut it down and/or restart.

Router works fine with every other computer in the network.
With this PC I use a lan cable. I obviously change the cable with other cables I have ... no success. I change of course port
on the router ... same story. Again, other pc works fine with the same cables and ports.

It's not a PITA, but it's annoying to restart the network 2-3 times before having it working properly.

What could the problem be?

TIA

Last edited by saronno (2018-09-10 16:31:44)

Offline

#2 2018-09-10 04:28:10

tbg
Member
Registered: 2017-06-22
Posts: 72

Re: [SOLVED] Network malfuctioning with realtek chip based card ..

Script stopping Network Manager, lowering your adapter, and and rmmodding r8169 before suspending. On resume, modprobe r8169, raise your adapter and then start network manager. You can automate the process with a systemd service unit for suspend and resume.

Offline

#3 2018-09-10 15:57:58

saronno
Member
Registered: 2009-10-02
Posts: 213

Re: [SOLVED] Network malfuctioning with realtek chip based card ..

tbg wrote:

Script stopping Network Manager, lowering your adapter, and and rmmodding r8169 before suspending. On resume, modprobe r8169, raise your adapter and then start network manager. You can automate the process with a systemd service unit for suspend and resume.

Ok, I could give a try. But why do I have this problem I never had before?
Why sometimes I have to launch the above script once, sometimes twice ... other time 3-4 times.
It's completely random so it become very difficult to understand the cause ...

Offline

#4 2018-09-10 16:30:51

saronno
Member
Registered: 2009-10-02
Posts: 213

Re: [SOLVED] Network malfuctioning with realtek chip based card ..

Ok, I found the real problem: my card is based on rtl8111e. By default, r8169 is used with stock kernel and somehow it works but not flawless.
r8168 is needed to work properly. So I just installed the community package and blacklisted r8169.

It is also on the wiki ... my fault I didn't check there https://wiki.archlinux.org/index.php/Ne … 11.2F8168B

Offline

#5 2018-09-10 21:25:13

tbg
Member
Registered: 2017-06-22
Posts: 72

Re: [SOLVED] Network malfuctioning with realtek chip based card ..

It varies depending on the kernel version which driver is more compatible. Some kernels recently may play better with the r8169 driver, and some the r8168. Switch up whenever you find you are having an issue on a new kernel. This has been changing a lot recently. Sometimes scripting will correct the problem, and other times a kernel downgrade or driver switch may be required.

Offline

Board footer

Powered by FluxBB