My laptop has a Realtek RTL8168 Ethernet card, which works pretty well. Except at some times, where the connection just gets dropped and I have to un- and replug the cable in order to reset the connection.
I've tried the preinstalled r8169 module, but now I'm using the r8168 module built with the source from Realtek's website. The problem occurs with both driver modules.
$ lspci | grep Ethernet
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
$ dmesg
#stops working, no reports
#unplugging
[ 9324.277753] r8168: eth0: link down
[ 9328.636380] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
#replugging
[ 9334.316610] r8168: eth0: link up
[ 9334.316744] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
#Working again
PS: With grep NetworkManager /var/log/syslog, I've fould the following, around the time such a connection interruption happened:
#EDIT:These messages are printed when I plug out the cable. Before, there is nothing
Jan 28 23:40:31 dracarys NetworkManager[912]: <info> (eth0): carrier now OFF (device state 100, deferring action for 4 seconds)
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> (eth0): device state change: activated -> unavailable (reason 'carrier-changed') [100 20 40]
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> (eth0): deactivating device (reason 'carrier-changed') [40]
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> (eth0): canceled DHCP transaction, DHCP client pid 6975
Jan 28 23:40:35 dracarys NetworkManager[912]: <warn> DNS: plugin dnsmasq update failed
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> Removing DNS information from /sbin/resolvconf
Jan 28 23:40:35 dracarys NetworkManager[912]: <info> NetworkManager state is now DISCONNECTED
#replug
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> (eth0): carrier now ON (device state 20)
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> Auto-activating connection 'Wired connection 1'.
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> Activation (eth0) starting connection 'Wired connection 1'
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jan 28 23:40:40 dracarys NetworkManager[912]: <info> NetworkManager state is now CONNECTING
And then it worked again
Any ideas on how to fix this? Let me know if you need additional information.
EDIT: $ modinfo r8168
filename: /lib/modules/3.13.0-37-generic/kernel/drivers/net/ethernet/realtek/r8168.ko
version: 8.038.00-NAPI
license: GPL
description: RealTek RTL-8168 Gigabit Ethernet driver
author: Realtek and the Linux r8168 crew <netdev@vger.kernel.org>
srcversion: 7600C3366E422907A1D79F1
alias: pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias: pci:v000010ECd00008168sv*sd*bc*sc*i*
depends:
vermagic: 3.13.0-37-generic SMP mod_unload modversions
parm: eee_enable:int
parm: speed:force phy operation. Deprecated by ethtool (8). (ushort)
parm: duplex:force phy operation. Deprecated by ethtool (8). (int)
parm: autoneg:force phy operation. Deprecated by ethtool (8). (int)
parm: aspm:Enable ASPM. (int)
parm: s5wol:Enable Shutdown Wake On Lan. (int)
parm: rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm: timer_count:Timer Interrupt Interval. (int)
parm: debug:Debug verbosity level (0=none, ..., 16=all) (int)
systool, which is a part ofsysfsutilspackage. It allows viewing with which parameters enabled/disabled the module is actually loaded during runtime. I'd suggest you download that, check what parameters are set for your r8168 module, and then play around with changing those options by adding them to /etc/modprobe/r8168.conf file. Among other things, instead of uplugging/replugging, restart the network-manager service withsudo service network-manager restart– Sergiy Kolodyazhnyy Feb 2 '15 at 6:11eee_enable, which is not activated. How exactly would I enable it? (But I doubt it would change anything) – s3lph Feb 2 '15 at 14:35eee_enableisnt the only thing I'd try to toggle. I'll post it in more details as an answer soon. – Sergiy Kolodyazhnyy Feb 2 '15 at 20:11