Page 1 of 1

Solution for freezes when scp/ftp/nfs with most linux dist

Posted: Thu Jul 28, 2011 1:40 pm
by coredump
Hello,

i found the solution for the freezes when making high network i/o over the wired network cards of the fitpc2i.
The kernel module r8169 the default kernel uses is seriously broken and the cause for this issue, btw the right module is r8168 we will compile and use now.
It has nothing to do with acpi bugs or c-states. its simply the broken r8169 module.

To fix this simply install the prop. driver from realtek.
(build-essentials must be installed)
Download the driver r8168-8.024.00.tar.bz2 from:

http://www.realtek.com/downloads/downlo ... Down=false

--the following steps have to be performed as root--

copy it to /usr/src/
cd /usr/src/
tar xvfj r8168-8.024.00.tar.bz2
cd r8168-8.024.00
make clean modules
make install
depmod -a
echo "blacklist r8169" >> /etc/modprobe.d/blacklist-network
echo "blacklist r8169" >> /etc/modprobe.d/blacklist.conf
update-initramfs -u
to be completely sure r8169 is removed, perform rmmod r8169

reboot the system.

Check if the correct driver is used after reboot by performing

ethtool -i eth0

should give:
driver: r8168
version: 8.024.00-NAPI
firmware-version:
bus-info: 0000:02:00.0

Tested on ubuntu 11.04, debian stable and testing. Worked, no more freezes when making network traffic.

Kind regards
Timo from Germany.

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Fri Jul 29, 2011 12:12 am
by rambler
Thanks for this - I'll give it a try.

I've just upgraded to CentOS 6.0 from CentOS 5.4 and have switched over to using the Wireless LAN interface because of the lockups. I had no problems with ethernet on CentOS 5.4

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Fri Aug 05, 2011 12:04 am
by joda
I'm trying out this as well. Had the same problems with CentOS/Redhat EL6.

/Johan

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Sun Aug 07, 2011 12:35 am
by joda
Seems to be working (so far) when using the Realtek supplied driver.

Thanks a bunch!

/Johan

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Mon Aug 15, 2011 3:30 am
by rambler
The r8168 driver is also available in the ELRepo repository so if you're running CentOS 6/RHEL 6/SL 6 you can just:

Code: Select all

rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm
yum install kmod-r8168
It will also take care of disabling the r8169 module.

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Sun Aug 28, 2011 10:37 pm
by Andos
I have the ethernet freeze problem as well on fit-pc2.
I tried following your guide but I get theese make errors:

Code: Select all

:/usr/src/r8168-8.025.00$ sudo make clean modules 
make -C src/ clean
make[1]: Entering directory `/usr/src/r8168-8.025.00/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers Module.markers *.order
make[1]: Leaving directory `/usr/src/r8168-8.025.00/src'
make -C src/ modules
make[1]: Entering directory `/usr/src/r8168-8.025.00/src'
make -C /lib/modules/2.6.31-34-fitpc2/build SUBDIRS=/src modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.31-34-fitpc2'
scripts/Makefile.build:44: /src/Makefile: No such file or directory
make[3]: *** No rule to make target `/src/Makefile'.  Stop.
make[2]: *** [_module_/src] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.31-34-fitpc2'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/r8168-8.025.00/src'
make: *** [modules] Error 2
I should have all necessary packages installed but I might be mistaken.

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Sun Aug 28, 2011 11:15 pm
by Andos
Nevermind, I used the dkms method:
http://djlab.com/2010/10/fixing-rtl8111 ... an-ubuntu/

That seemed to work like a charm :)

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Wed Mar 07, 2012 1:20 am
by magi
Thanks for pointing this out. I bought a fit-pc2i, installed Ubuntu 11.10, and ran into this problem big time. If I use the ethernet interfaces significantly at all, the machine freezes completely.

I tried using Realtek's r8168 driver, but found that it breaks vlan tagging. (If I disable the hardware acceleration for vlan tagging on the tx path and leave it enabled for the rx path, it kind of works but still breaks. Go figure.) And that's in addition to the difficulty installing and building the r8168 driver. Also, I tried reporting these bugs to Realtek and didn't get a response. So no thanks.

I then found https://bugs.launchpad.net/ubuntu/+sour ... bug/839393, in which people suggested that newer r8169 drivers (in the Linux 3.1 kernel releases) work better, so I tried that, and they do indeed run better.

Then I installed a Linux 3.2 kernel underneath my Ubuntu 11.10 installation, and that worked even better.

So in my experience, stay away from the r8168 driver, and stay away from the r8169 driver included in the 3.0 kernel, but by the 3.2 kernel, r8169 should be usable (no freezes and vlan tagging works).

I sure wish fit-pc would have documented this somewhere obvious, and I wouldn't have wasted hours figuring it out, though.

I also wish there were some models of fit-pc that don't use realtek network adapters.

Re: Solution for freezes when scp/ftp/nfs with most linux di

Posted: Sat Mar 10, 2012 10:28 am
by sfzhi
I have been using the stock r8169 driver for a few months, first with kernel 3.0, now with 3.1, without any problems. I haven't tried VLAN though.