Ubuntu: Wireless networking not working after resume in Ubuntu 14.04



Question:

[Update]:
The same problem exists in Kubuntu and is solved in the same manner.
[Solved]:
By applying the following command nmcli nm I got the following:

Before suspend

RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN        running         connected       enabled         enabled    enabled         enabled    

as can you see the state is connected and the rest are enabled and running

After suspend

RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN        running         asleep          enabled         enabled    enabled         disabled  

as can you see the state is asleep meaning our dear network manager is still napping, so to solve use the fallowing command line:
sudo nmcli nm sleep false
this tells the network manager to wake the hell up. to make this permenant :
create a script in /etc/pm/sleep.d containg the following (and don't forget to mark the script as executable):

#!/bin/sh    case "${1}" in          resume|thaw)          nmcli nm sleep false                  ;;  esac  

Thanks to this

The original problem:

I just downloaded Ubuntu 14.04 and installed on my laptop: ASUS X61SL with Intel P8400 Core2Duo x64 processor.
When I close the lid, the system is suspended, but when I open the lid again and resume, the wireless networking is not activited (networking as a whole is disabled), and when I select "Enable Networking" nothing happens.
This is the information about my wireless adapter:

$ lspci | grep -i wireless  02:00.0 Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)    

This problem wasn't present in Ubuntu 13.04, Linux Mint Debian Edition or Debian 7 wheezy (GNOME or KDE).

Edit: few test with the following results :
The problem effects my wireless and wired networking.
Note: I need to add the pci=nomsi line to grub in order to boot.
When logging out manually then suspend then resume then log in every thing works just fine.
When suspending directly while logged in the problem happens.
Locking and suspending causes the same problem as suspending directly.
Also this problem appearnlty affects log out function: if you chose log out from the user menu in unity panel then you wan't log out, but if you use the command line gnome-session-quit --logout then you can log out.
Now with lshw -C network output:
Normal (fully functional networking):

  *-network                        description: Ethernet interface         product: 191 Gigabit Ethernet Adapter         vendor: Silicon Integrated Systems [SiS]         physical id: 4         bus info: pci@0000:00:04.0         logical name: eth0         version: 02         serial: 00:24:8c:1e:f8:53         size: 10Mbit/s         capacity: 100Mbit/s         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation         configuration: autonegotiation=on broadcast=yes driver=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s         resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)    *-network         description: Wireless interface         product: AR928X Wireless Network Adapter (PCI-Express)         vendor: Qualcomm Atheros         physical id: 0         bus info: pci@0000:02:00.0         logical name: wlan0         version: 01         serial: 00:15:af:e2:13:db         width: 64 bits         clock: 33MHz         capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A ip=6.6.6.8 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn         resources: irq:16 memory:fdff0000-fdffffff  

After resume ("/etc/pm/config.d" does not contains "unload_modules"):

 *-network DISABLED               description: Ethernet interface         product: 191 Gigabit Ethernet Adapter         vendor: Silicon Integrated Systems [SiS]         physical id: 4         bus info: pci@0000:00:04.0         logical name: eth0         version: 02         serial: 00:24:8c:1e:f8:53         size: 10Mbit/s         capacity: 100Mbit/s         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation         configuration: autonegotiation=on broadcast=yes driver=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s         resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)    *-network DISABLED         description: Wireless interface         product: AR928X Wireless Network Adapter (PCI-Express)         vendor: Qualcomm Atheros         physical id: 0         bus info: pci@0000:02:00.0         logical name: wlan0         version: 01         serial: 00:15:af:e2:13:db         width: 64 bits         clock: 33MHz         capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn         resources: irq:16 memory:fdff0000-fdffffff  

When I added the file unload_modules to directory "/etc/pm/config.d" as suggested by here, after logging out, suspend ,resume then log in the networking works but I cannot connect to my wireless network.
Again the result of lshw -C network After resume ( "/etc/pm/config.d" contains "unload_modules"):

 *-network DISABLED               description: Ethernet interface         product: 191 Gigabit Ethernet Adapter         vendor: Silicon Integrated Systems [SiS]         physical id: 4         bus info: pci@0000:00:04.0         logical name: eth0         version: 02         serial: 00:24:8c:1e:f8:53         size: 10Mbit/s         capacity: 100Mbit/s         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation         configuration: autonegotiation=on broadcast=yes driver=sis190 driverversion=1.4 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s         resources: irq:19 memory:fddfcc00-fddfcc7f ioport:cc00(size=128)    *-network DISABLED         description: Wireless interface         product: AR928X Wireless Network Adapter (PCI-Express)         vendor: Qualcomm Atheros         physical id: 0         bus info: pci@0000:02:00.0         logical name: wlan0         version: 01         serial: 00:15:af:e2:13:db         width: 64 bits         clock: 33MHz         capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn         resources: irq:16 memory:fdff0000-fdffffff  

The contents of 'unload_modules" where:

SUSPEND_MODULES="$SUSPEND_MODULES ath9k"  SUSPEND_MODULES="$SUSPEND_MODULES sis190"  

Where 'ath9k' is my wireless module and 'sis190' is my Ethernet module.


Solution:1

The above answers did not work for me on 14.10. After a bit of trial-and-error, I ended up with this,

#!/bin/sh    case "${1}" in    resume|thaw)      nmcli r wifi off && nmcli r wifi on ;;  esac  

Put this in /etc/pm/sleep.d/10_resume_wifi
Make it executable sudo chmod 755 /etc/pm/sleep.d/10_resume_wifi and the problem should be fixed immediately.


Solution:2

I got a solution but it is just for restarting your network manager.

sudo service network-manager restart  

It is not the permanent solution.


Solution:3

The script that finally worked for me:

$ cat /etc/pm/sleep.d/10_resume_wifi   #!/bin/sh    case "${1}" in    resume|thaw) nmcli nm sleep false ;;  esac    $ ll /etc/pm/sleep.d/10_resume_wifi  -rwxr-xr-x 1 root root 70 mars  31 09:09 /etc/pm/sleep.d/10_resume_wifi  

The other answer has typos (they can be fixed I know), but never worked for me anyway.


Solution:4

This worked for me on Ubuntu 14.04 on Dell Precision laptop.

In a terminal enter:

sudo nano /etc/pm/sleep.d/10_resume_wifi  

Then paste in (ctrl+v):

#!/bin/sh  case "${1}" in  resume|thaw)      nmcli nm wifi on      ;;  esac  

Then make the script executable:

sudo chmod +x /etc/pm/sleep.d/10_resume_wifi  

Test out suspend and wake to see wifi on!!


Solution:5

Have you tried to make another script like this one enter in kate:

#/bin/sh        case ![1] in          ./bin/sh          network="true"          nmcli nm -c sleep=false -network      endasc  

and save it as jsin7 file in /etc/network, and call it network.d and this might work fine.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »