Realtek 8168B (r8169) interface not working following suspend

Reported by iMac on 2011-04-27
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Linux
Incomplete
Unknown
linux (Fedora)
Unknown
Unknown
linux (Ubuntu)
Undecided
Unassigned

Bug Description

After suspending and resuming, the network adapter appears to be active (Link UP) however it is not able to properly communicate data and appears in network-manager as disconnected due to the inability to negotiate DHCP successfully.

The workaround, in my case, is to execute this "fixnet" script following the resume to unload an reload the r8169 module. In 11.04 the network manager automatically reconnects at this point.

imac@repo:/usr/local/bin$ cat fixnet

#!/bin/sh
rmmod r8169
modprobe r8169

imac@repo:/usr/local/bin$ lspci -v | grep -i realtek
0a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

Here is a typical dmesg, showing the link up after resume (@5958) followed by my script execution (starting @ 6105).

[ 5956.140651] r8169 0000:0a:00.0: eth0: link down
[ 5958.247724] r8169 0000:0a:00.0: eth0: link up
[ 6105.570173] r8169 0000:0a:00.0: PCI INT A disabled
[ 6105.604106] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 6105.604141] r8169 0000:0a:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 6105.604191] r8169 0000:0a:00.0: setting latency timer to 64
[ 6105.604248] r8169 0000:0a:00.0: irq 45 for MSI/MSI-X
[ 6105.610321] r8169 0000:0a:00.0: eth0: RTL8168c/8111c at 0xffffc90002098000, 00:1e:ec:f2:0f:f3, XID 1c4000c0 IRQ 45
[ 6105.624882] r8169 0000:0a:00.0: eth0: link down
[ 6105.624896] r8169 0000:0a:00.0: eth0: link down
[ 6105.636108] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 6108.331777] r8169 0000:0a:00.0: eth0: link up
[ 6108.332388] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 6118.770054] eth0: no IPv6 routers present

Upstream we see this here: https://bugzilla.kernel.org/show_bug.cgi?id=12296

This problem also affects Maverick

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-8-generic 2.6.38-8.42
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: fglrx
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: SB [HDA ATI SB], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: imac 2744 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xd2400000 irq 16'
   Mixer name : 'IDT 92HD71B7X'
   Components : 'HDA:111d76b2,103c30fd,00100302 HDA:11c11040,103c137e,00100200'
   Controls : 22
   Simple ctrls : 14
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xd2310000 irq 46'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 4
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Wed Apr 27 10:16:01 2011
HibernationDevice: RESUME=UUID=5828f841-5250-4229-bfc5-af24c6f41811
MachineType: Hewlett-Packard HP Pavilion dv7 Notebook PC
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=52543d1c-6080-4cdf-80e0-30b9af3748f7 ro crashkernel=384M-2G:64M,2G-:128M splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.52
SourcePackage: linux
UpgradeStatus: Upgraded to natty on 2011-04-06 (21 days ago)
WpaSupplicantLog:

dmi.bios.date: 08/17/2009
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: F.49
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 30FD
dmi.board.vendor: Compal
dmi.board.version: 01.99
dmi.chassis.type: 10
dmi.chassis.vendor: Compal
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnHewlett-Packard:bvrF.49:bd08/17/2009:svnHewlett-Packard:pnHPPaviliondv7NotebookPC:pvr1:rvnCompal:rn30FD:rvr01.99:cvnCompal:ct10:cvrN/A:
dmi.product.name: HP Pavilion dv7 Notebook PC
dmi.product.version: 1
dmi.sys.vendor: Hewlett-Packard

iMac (imac-netstatz) wrote :
iMac (imac-netstatz) on 2011-04-27
description: updated
iMac (imac-netstatz) wrote :

Rebooted into Debian Squeeze and confirmed the same problem (no NIC connectivity) there too when suspending, so upstream seems legit. My debian hostname is "beta" .. but it is uptodate.

Appears to be same driver version, different and earlier kernel.

beta:/home/imac# uname -a
Linux beta 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64 GNU/Linux

The dmesg below shows the resume at 95, followed by the module reload at 136.

[ 95.444796] r8169: eth0: link up
[ 95.444809] r8169: eth0: link up
[ 95.835738] CPU0 attaching NULL sched-domain.
[ 95.835746] CPU1 attaching NULL sched-domain.
[ 95.878302] CPU0 attaching sched-domain:
[ 95.878308] domain 0: span 0-1 level MC
[ 95.878311] groups: 0 1
[ 95.878318] CPU1 attaching sched-domain:
[ 95.878321] domain 0: span 0-1 level MC
[ 95.878323] groups: 1 0
[ 105.700043] eth0: no IPv6 routers present
[ 136.352612] r8169 0000:0a:00.0: PCI INT A disabled
[ 140.484821] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 140.484857] r8169 0000:0a:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 140.484903] r8169 0000:0a:00.0: setting latency timer to 64
[ 140.485308] r8169 0000:0a:00.0: irq 29 for MSI/MSI-X
[ 140.486594] eth0: RTL8168c/8111c at 0xffffc9000065e000, 00:1e:ec:f2:0f:f3, XID 1c4000c0 IRQ 29
[ 140.499596] r8169: eth0: link down
[ 140.499608] r8169: eth0: link down
[ 140.500450] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 143.065489] r8169: eth0: link up

Changed in linux:
status: Unknown → In Progress
Brad Figg (brad-figg) on 2011-05-03
Changed in linux (Ubuntu):
status: New → Confirmed
iMac (imac-netstatz) wrote :

No change in Oneiric Beta 1

tags: added: oneiric
iMac (imac-netstatz) wrote :

Still not working after suspend on current 12.04 Beta (3.2.0-18-generic #29-Ubuntu)

0a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
 Subsystem: Hewlett-Packard Company Device 30fc
 Flags: bus master, fast devsel, latency 0, IRQ 45
 I/O ports at 2000 [size=256]
 Memory at d1010000 (64-bit, prefetchable) [size=4K]
 Memory at d1000000 (64-bit, prefetchable) [size=64K]
 Expansion ROM at d1020000 [disabled] [size=64K]
 Capabilities: [40] Power Management version 3
 Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
 Capabilities: [70] Express Endpoint, MSI 01
 Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
 Capabilities: [d0] Vital Product Data
 Capabilities: [100] Advanced Error Reporting
 Capabilities: [140] Virtual Channel
 Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
 Kernel driver in use: r8169
 Kernel modules: r8169

iMac (imac-netstatz) wrote :

After suspend, network manager is doing its interface discover animation,

I just pull up a terminal and run this little script, and Network Manager blinks (as the interface disappears and comes back) and eth0 comes back up.

imac@repo:~$ cat /usr/local/bin/fixnet
#!/bin/sh
rmmod r8169
modprobe r8169

I've been doing this for years.. linux 3.2.0 and still no fix.. seems strange.

Dan (wavingecko) wrote :

oh i got this problems, too.
Using Gigabyte 990FXA-UD7 Mainboard with 8111 LAN-Chipset
8169 works for 2 days and dies
8168 wount work. i tried a lot of hints from ubuntu-forums but it wont works
i tried on ubuntu 11.04, 11.10 and 12.04

iMac (imac-netstatz) wrote :
Download full text (4.0 KiB)

I just retried this today (after noting a new tag upstream, I was thinking I have not seen this in a while) and was unable to reproduce the problem using the suspend feature. I note that I now have a 3.2 kernel and see some info on jumbo frames in my dmesg. No other notable changes jump out at me in the outputs below.

imac@repo:~$ dmesg | grep r8169
[ 2.146842] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2.146873] r8169 0000:0a:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 2.146948] r8169 0000:0a:00.0: setting latency timer to 64
[ 2.147003] r8169 0000:0a:00.0: irq 45 for MSI/MSI-X
[ 2.147546] r8169 0000:0a:00.0: eth0: RTL8168c/8111c at 0xffffc9000278a000, 00:1e:ec:f2:0f:f3, XID 1c4000c0 IRQ 45
[ 2.147550] r8169 0000:0a:00.0: eth0: jumbo features [frames: 6128 bytes, tx checksumming: ko]
[ 40.985137] r8169 0000:0a:00.0: eth0: link down
[ 40.985147] r8169 0000:0a:00.0: eth0: link down
[ 43.084541] r8169 0000:0a:00.0: eth0: link up

imac@repo:~$ uname -a
Linux repo.ianbmacdonald.com 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

imac@repo:~$ sudo lspci -vvv -d 10ec:8168
[sudo] password for imac:
0a:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
 Subsystem: Hewlett-Packard Company Device 30fc
 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0, Cache Line Size: 64 bytes
 Interrupt: pin A routed to IRQ 45
 Region 0: I/O ports at 2000 [size=256]
 Region 2: Memory at d1010000 (64-bit, prefetchable) [size=4K]
 Region 4: Memory at d1000000 (64-bit, prefetchable) [size=64K]
 Expansion ROM at d1020000 [disabled] [size=64K]
 Capabilities: [40] Power Management version 3
  Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
  Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
 Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
  Address: 00000000fee0300c Data: 4191
 Capabilities: [70] Express (v1) Endpoint, MSI 01
  DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <8us
   ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
  DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
   RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
   MaxPayload 128 bytes, MaxReadReq 4096 bytes
  DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
  LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
   ClockPM+ Surprise- LLActRep- BwNot-
  LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
   ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
  LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
 Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
  Vector table: BAR=4 offset=00000000
  PBA: BAR=4 offset=00000800
 Capabilities: [d0] Vital Product Data
  Unknown small resource type 00, will not decode more.
 Capabilities: [100 v1] Advanced Error Reporting
  UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCm...

Read more...

Changed in linux:
status: In Progress → Incomplete

iMac, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/771857/comments/7 regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

tags: added: maverick needs-upstream-testing
tags: added: precise
Changed in linux (Ubuntu):
status: Confirmed → Invalid
ghomem (gustavo) wrote :

Still a problem on 12.04 LTS with kernel 3.8.0-31-generic #46~precise1-Ubuntu.

ghomem (gustavo) wrote :

We found that after a resume / suspend cycle the interface goes back to work if it is put in promiscuous mode. This was found by accident while running tcpdump to see if there was traffic going through.

This can be tested afer resume with:

1.

ifconfig eth0 promisc
activate interface in Network Manager
.... will work

2. deactivate interface in Network Manager

3.

ifconfig eth0 -promsic
activate interface in Network Manager
... will fail

Therefore, the problem can be worked around by creating /etc/pm/power.d/10_eth0_promisc with

----------------------------------------
#!/bin/bash

ifconfig eth0 promisc
----------------------------------------

and give this file execution permissions.

This will ensure that after resume the interface comes up in promiscuous mode.

ghomem (gustavo) wrote :

Previous comment applies to kernel

3.11.4-031104-generic

that we upgraded the system to, to check wether it would solve the problem (it didn't).

ghomem, if you have a bug in Ubuntu, the Ubuntu Kernel team, Ubuntu Bug Control team, and Ubuntu Bug Squad would like you to please file a new report by executing the following in a terminal while booted into a Ubuntu repository kernel (not a mainline one) via:
ubuntu-bug linux

For more on this, please read the official Ubuntu documentation:
Ubuntu Bug Control and Ubuntu Bug Squad: https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue
Ubuntu Kernel Team: https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Filing_Kernel_Bug_reports
Ubuntu Community: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Please note, not filing a new report would delay your problem being addressed as quickly as possible.

No need exists to comment here at this time. After reading the above documentation in it's entirety, if you have further questions, you are welcome to redirect them to the appropriate mailing list or forum via http://www.ubuntu.com/support/community/mailinglists , or you may contact me directly.

Thank you for your understanding.

Peng (pengwg) wrote :

I have the same problem once upgraded to 13.10. I have never had this problem before. It's a gigabyte motherboard.

lspci | grep -i ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)

Peng (pengwg) wrote :

It appears my problem is related to the network-manager bug other than the kernel.
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1027202

peng, if you have a bug in Ubuntu, the Ubuntu Kernel team, Ubuntu Bug Control team, and Ubuntu Bug Squad would like you to please file a new report by executing the following in a terminal while booted into a Ubuntu repository kernel (not a mainline one) via:
ubuntu-bug linux

For more on this, please read the official Ubuntu documentation:
Ubuntu Bug Control and Ubuntu Bug Squad: https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue
Ubuntu Kernel Team: https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Filing_Kernel_Bug_reports
Ubuntu Community: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Please note, not filing a new report would delay your problem being addressed as quickly as possible.

No need exists to comment here at this time. After reading the above documentation in it's entirety, if you have further questions, you are welcome to redirect them to the appropriate mailing list or forum via http://www.ubuntu.com/support/community/mailinglists , or you may contact me directly.

Thank you for your understanding.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.