2

I've just upgraded from 12.04 to 14.04, and when I disconnect the ethernet cable or I suspend, network manager keeps trying connecting 4-5 times, with failures, and then finally succeed. If I restart, the connection is ok, but if I disconnect again, the problem is back again.

This is the output of dmesg:

[ 1234.523258] PM: Syncing filesystems ... done.
[ 1234.743865] PM: Preparing system for mem sleep
[ 1234.744109] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 1234.746257] Freezing remaining freezable tasks ... (elapsed 1.504 seconds) done.
[ 1236.250482] PM: Entering mem sleep
[ 1236.250514] Suspending console(s) (use no_console_suspend to debug)
[ 1236.251018] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1236.251343] sd 0:0:0:0: [sda] Stopping disk
[ 1236.812155] PM: suspend of devices complete after 561.290 msecs
[ 1236.812530] PM: late suspend of devices complete after 0.371 msecs
[ 1236.828483] ehci-pci 0000:00:04.1: System wakeup enabled by ACPI
[ 1236.844052] ohci-pci 0000:00:04.0: System wakeup enabled by ACPI
[ 1236.860284] PM: noirq suspend of devices complete after 47.750 msecs
[ 1236.860415] ACPI: Preparing to enter system sleep state S3
[ 1236.861876] PM: Saving platform NVS memory
[ 1236.862162] Disabling non-boot CPUs ...
[ 1236.964057] smpboot: CPU 1 is now offline
[ 1236.964265] ACPI: Low-level resume complete
[ 1236.964265] PM: Restoring platform NVS memory
[ 1236.964265] Enabling non-boot CPUs ...
[ 1236.964265] x86: Booting SMP configuration:
[ 1236.964265] smpboot: Booting Node 0 Processor 1 APIC 0x1
[ 1236.863533] Initializing CPU#1
[ 1236.976181] CPU1 is up
[ 1236.977216] ACPI: Waking up from system sleep state S3
[ 1237.556134] ohci-pci 0000:00:04.0: System wakeup disabled by ACPI
[ 1237.572108] ehci-pci 0000:00:04.1: System wakeup disabled by ACPI
[ 1237.620274] PM: noirq resume of devices complete after 79.948 msecs
[ 1237.620451] PM: early resume of devices complete after 0.147 msecs
[ 1237.940033] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1238.012503] ata2.00: configured for UDMA/100
[ 1239.452092] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1239.456315] ata1.00: configured for UDMA/133
[ 1239.456825] sd 0:0:0:0: [sda] Starting disk
[ 1239.486112] PM: resume of devices complete after 1865.656 msecs
[ 1239.486478] PM: Finishing wakeup.
[ 1239.486481] Restarting tasks ... done.
[ 1239.503830] video LNXVIDEO:00: Restoring backlight state
[ 1239.691997] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 1239.692095] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 1239.692359] r8169 0000:03:00.0: irq 41 for MSI/MSI-X
[ 1239.735826] r8169 0000:03:00.0 eth0: RTL8168b/8111b at 0xf842a000, e0:cb:4e:2f:c4:f7, XID 18000000 IRQ 41
[ 1239.735831] r8169 0000:03:00.0 eth0: jumbo features [frames: 4080 bytes, tx checksumming: ko]
[ 1241.841344] r8169 0000:03:00.0 eth0: link down
[ 1241.841364] r8169 0000:03:00.0 eth0: link down
[ 1241.841639] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1243.636825] r8169 0000:03:00.0 eth0: link up
[ 1243.636843] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1244.281364] r8169 0000:03:00.0 eth0: link down
[ 1244.281395] r8169 0000:03:00.0 eth0: link down
[ 1244.281616] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1244.561344] r8169 0000:03:00.0 eth0: link down
[ 1244.561442] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1246.377956] r8169 0000:03:00.0 eth0: link up
[ 1246.377971] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1251.433358] r8169 0000:03:00.0 eth0: link down
[ 1251.433411] r8169 0000:03:00.0 eth0: link down
[ 1251.433481] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1253.072957] r8169 0000:03:00.0 eth0: link up
[ 1253.072974] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 3498.716445] r8169 0000:03:00.0 eth0: link down
[ 3501.273340] r8169 0000:03:00.0 eth0: link down
[ 3501.273452] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3501.673354] r8169 0000:03:00.0 eth0: link down
[ 3501.673419] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3503.203193] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3523.370577] r8169 0000:03:00.0 eth0: link up
[ 3523.370595] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
cs c
  • 21

3 Answers3

0

I had a similar issue with a Realtek ethernet card not coming back after resume from sleep under ubuntu 14.04, restarting network-manager fixes it for me.

  • To try once:

    $ sudo service network-manager restart
    

    (Reloading r8169 module also works)

  • To make it permanent, create a script in /etc/pm/sleep.d and make it executable:

    $ sudo cat > /etc/pm/sleep.d/90_restart_network_manager
    #!/bin/sh
    
    case "${1}" in
        resume|thaw)
            service network-manager restart;;
    esac
    $ sudo chmod 755 /etc/pm/sleep.d/90_restart_network_manager
    

For reference, the card is a RTL8105e:

$ dmesg | grep 'r8169.*RTL'
r8169 0000:01:00.0 eth0: RTL8105e at 0xf845c000, ...
lemonsqueeze
  • 1,634
0

From: http://www.techytalk.info/ubuntu-fix-network-stopped-working-after-resume-from-sleep/

I have a realtek r8169 NIC that ubuntu 14.04 does not like the suspend/restore process.

sudo gedit /etc/pm/config.d/unload_modules

(create it if if it does not exist) and then add to it:

SUSPEND_MODULES="$SUSPEND_MODULES r8169"

Reboot your machine.

Starting from the next boot, when you suspend and then get back to your session just select the connection you want to activate from network applet in the dropdown in the top-right corner.

Cheers!

MM

BTW, lspci say that I have this

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)

on my Dell Inspiron 7559 (7000 series)...

0

Amen, lemonsqueeze. I created a similar executable Bourne shell script in /etc/pm/sleep.d for 14.04 only. That worked fine under Upstart. Subsequently, I upgraded that particular machine to 16.04 (Systemd). New ball game:

  1. Create an executable Bourne shell script, /usr/local/bin/resume_r8169.sh:
MYNAME=`basename`
echo $MYNAME Begin
modprobe -v -r r8169
modprobe -v    r8169
echo $MYNAME End

Make sure that the script is executable (chmod -x).

  1. In directory /etc/systemd/system, create a resume_r8169.service file that looks like this:
[Unit]
Description=Work-around r8169 inability to resume service after suspend
After=suspend.target

[Service]
User=root
Type=oneshot
ExecStart=/bin/sh -c /usr/local/bin/resume_r8169.sh
TimeoutSec=0
StandardOutput=syslog

[Install]
WantedBy=suspend.target
  1. Then, install the service to Systemd by executing:
sudo systemctl enable /etc/systemd/system/resume_r8169.service
Richard Elkins
  • 474
  • 4
  • 7