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

Post Reply
coredump
Posts: 1
Joined: Sat Jul 16, 2011 4:12 pm

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

Post 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.

rambler
Posts: 9
Joined: Sat Feb 06, 2010 1:22 am

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

Post 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

joda
Posts: 2
Joined: Fri Aug 05, 2011 12:01 am

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

Post by joda »

I'm trying out this as well. Had the same problems with CentOS/Redhat EL6.

/Johan

joda
Posts: 2
Joined: Fri Aug 05, 2011 12:01 am

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

Post by joda »

Seems to be working (so far) when using the Realtek supplied driver.

Thanks a bunch!

/Johan

rambler
Posts: 9
Joined: Sat Feb 06, 2010 1:22 am

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

Post 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.

Andos
Posts: 5
Joined: Wed Jan 06, 2010 8:25 pm

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

Post 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.

Andos
Posts: 5
Joined: Wed Jan 06, 2010 8:25 pm

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

Post by Andos »

Nevermind, I used the dkms method:
http://djlab.com/2010/10/fixing-rtl8111 ... an-ubuntu/

That seemed to work like a charm :)

magi
Posts: 1
Joined: Tue Dec 06, 2011 12:07 am

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

Post 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.

sfzhi
Posts: 16
Joined: Tue Aug 16, 2011 10:41 am

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

Post 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.

Post Reply

Return to “Linux on fit-PC2”