0

From time to time, when I resume from suspend my computer, the networking won't work (happens on my laptop too, both running 14.04).
The wireless icon located in the corner looks like networking unable, and when I click on it, I get a very limited options menu.
One of the options is 'enable networking' but when I click on it, nothing happens (although it is checked).

I saw in other questions that the wireless-network card turns of when suspending and maybe it just won't turn on.. If this is the case, how to turn it on?

Tzahi Leh
  • 281

1 Answers1

0

Following the comments above suggestion linked by Tzahi Leh I have the following script saved as /etc/pm/sleep.d/30_wakeup and executable which seems to resolve the issue. Previous portions of the script existed and were taken from this thread for speaker and bluetooth issues known in Ubuntu 14.04, but it wasn't until a recent update that I had to add the nmcli line:

#!/bin/bash

case "$1" in
suspend_hybrid|hibernate|suspend)
    # executed on suspend
    echo "Going to $1 at $(date)" >> /Data/sleep_log.txt
    rfkill block bluetooth
    ;;
thaw|resume) 
    # executed on resume
    # restart wireless, just in case
    restart network-manager > /dev/null
    # to resolve new issue, 27 Dec 2015 via: http://askubuntu.com/questions/452826/wireless-networking-not-working-after-resume-in-ubuntu-14-04?rq=1
    nmcli nm sleep false

    #wake up the speakers
    hda-verb /dev/snd/hwC1D0 0x1 set_gpio_mask 1
    sleep 1
    hda-verb /dev/snd/hwC1D0 0x1 set_gpio_direction 1
    sleep 1
    hda-verb /dev/snd/hwC1D0 0x1 set_gpio_data 1
    echo "waking up from $1 at $(date)" >> /Data/sleep_log.txt

    #bluetooth
    rfkill unblock bluetooth
    ;;
*)
    ;;
esac
John
  • 255