31

Since I upgraded to Saucy Salamander 13.10, with every third suspend or so, the network is disabled and I'm unable to re-enable it. I've had to reboot to make it run again.

The network menu will have the option Enable network but clicking it will only produce a tick in the menu item, nothing else changes.

  1. How can I make it enable automatically after suspend?
  2. In the meantime, is there a workaround to at least manually re-enable it?

The PC is a Lenovo IdeaPad S205 using drivers r8169 and rt2800pci.

closed as off-topic by Braiam, chronitis, Kevin Bowen, qbi, Lucio Nov 1 '13 at 22:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – Braiam, chronitis, Kevin Bowen, qbi, Lucio
If this question can be reworded to fit the rules in the help center, please edit the question.

25

Use:

sudo touch /etc/pm/sleep.d/network-manager-resume
sudo chmod +x /etc/pm/sleep.d/network-manager-resume
sudo nano /etc/pm/sleep.d/network-manager-resume

Paste the following and save the file. This brings NetworkManager out of suspend mode:

#!/bin/sh

# This script gets NetworkManager out of suspend.
case $1 in
     suspend|suspend_hybrid|hibernate)
    # No need to do anything here.
        ;;
     resume|thaw)
    nmcli nm sleep false
        ;;
esac

Source: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1184262/comments/23

  • I accepted this answer but I'm removing it now because I just had another resume without Network Manager waking up. – Arild Oct 26 '13 at 14:23
  • 1
    After making the file executable, worked for me. – pylover Oct 29 '13 at 20:41
  • Of course, that makes sense. Re-accepted answer. – Arild Nov 3 '13 at 10:40
  • 1
    Sorry for unaccepting answer again, but I'm still having the same problem. I work around it by doing sudo nmcli nm sleep false when it happens. I haven't bothered to test development sources (as suggested in response to my bug report). Right now I'm just passively hoping 14.04 will have a fix. – Arild Apr 14 '14 at 8:09
  • I think it works for me, though I can't be completely sure, as it seemed rather sporadic when the error would occur. However, I did "sudo chmod +s nmcli" first, wouldn't that be necessary for this to work (or adding sudo in the script, and a NOPASSWD for nmcli in the sudoers file)? Or does the script execute with sudo privileges regardless? – EvenLisle Oct 4 '14 at 12:54
19

I have the same issue. Looks like it's related to power management that does not wake network-manager. After resuming, you can open a terminal and type:

sudo service network-manager restart

It should bring up the network.

  • 1
    Thanks. I just filed a bug for acpi-support, perhaps you can add to it: bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/1243300 I'm holding off accepting your answer because someone might come up with an actual fix. – Arild Oct 22 '13 at 16:52
  • wow, after so much toiling with many script this worked for me...Thanks – danidee Nov 9 '15 at 16:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.