Page 1 of 1

WiFi not resuming from RAM suspension

PostPosted: Jul 17th, '13, 07:22
by mankurt
Hi all,

On Mageia 3 KDE, my WiFi doesn't come back from sleep (RAM suspension), I need to restart it manually via network manager.
I have configured my connection to be controlled by network manager so that wasn't the problem, and I don't think it's a driver issue as well (Using an atheros chipset in a TP-Link wireless card on my PC). For now I am suspending with 'systemctl suspend' via konsole and problem being avoided, we'll see how it goes.

I am a newbie so sorry if this post is in the wrong place/is a duplicate of another thread I couldn't find/is smelling from alchohol. If it is please inform me how to correct it.

Thanks all and good day.

Edit: 'systemctl suspend' doesn't work as well. I still have to connect manually. Sometimes after connecting manually through network manager the network tray icon disappears. Appreciate any help.

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 17th, '13, 19:15
by doktor5000
Can you please show the output of
Code: Select all
lspcidrake -v | grep NET

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 18th, '13, 10:28
by mankurt
Hi,

There it is doktor:

Code: Select all
lspcidrake -v | grep NET
ath9k           : Atheros Communications Inc.|AR922X Wireless Network Adapter [NETWORK_OTHER] (vendor:168c device:0029 subv:168c subd:2093) (rev: 01)
alx             : Qualcomm Atheros|AR8161 Gigabit Ethernet [NETWORK_ETHERNET] (vendor:1969 device:1091 subv:1458 subd:e000) (rev: 10)


Thanks for trying to help.

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 18th, '13, 19:37
by doktor5000

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 18th, '13, 20:56
by mankurt
Tried all three options, none worked so far... thanks mate

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 18th, '13, 22:55
by doktor5000
With systemd you might want to put a small shell script removing/loading the ath9k module into /usr/lib/systemd/system-sleep/
Check https://wiki.archlinux.org/index.php/Sy ... stem-sleep

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 19th, '13, 05:12
by mankurt
OK so I don't know which language these codes use or how to figure out which script to add but based on what I got from the link you gave I add a file called load_ath9k_resume to /usr/lib/systemd/system-sleep/ and this is it:

Code: Select all
#!/bin/sh
case post/sleep in
  post/*)
    modprobe ath9k
    ;;
esac


For now it didn't work but I am sure I didn't write the code correctly so any help would be appreciated on that.
A question though. Assuming that this will work, does it also mean that executing 'modprobe ath9k' as root on resume from sleep should "wake" my wireless driver? Because I tried it and it doesn't...

Sorry for being such a newbie :shock:

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 19th, '13, 16:35
by jiml8
I would not expect there is any need to load a driver upon wakeup. That driver already has to be in place, I would think.

More probably the network interface was taken down to sleep, and is not being brought back up on wake up.

Try inserting one of these commands into the shell script you are running on wakeup:

ifup wlan0

or

ifconfig wlan0 up

or

ip link set wlan0 up (this is the currently approved command...the others are deprecated).

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 19th, '13, 19:38
by doktor5000
The need is more to unload the driver when suspending, and load it again on resume, as for some laptops it won't reconnect by itself.
Interface up/down will probably not help.

@mankurt:

The script should probably look like this
Code: Select all
#!/bin/bash
case "$1" in
        pre)
            rmmod -f ath9k
            ;;
        post)
            modprobe ath9k
            ;;
esac
exit 0

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 20th, '13, 13:39
by mankurt
I have tried so far many configurations from many sites of a file to put in /usr/lib/systemd/system-sleep/ including the one you offered here. None have worked so far, They seem to not make any effect at all (tried one that is supposed to kill network-manager to make it autoload itself again, but it didn't even manage to kill it). I am NOT forgetting to make files executable. I don't have any ideas how to proceed, I will keep researching hoping to find an answer and post it here in case someone else might have the same problem.

Re: WiFi not resuming from RAM suspension

PostPosted: Jul 20th, '13, 16:24
by mankurt
I've decided to attach a snapshot of what it looks like when my PC resumes from sleep. You can see the tray notification that it gives me when my mouse hovers around the network manager icon, and how the network manager looks when I open it, before I connect to my WiFi manually.

Image

Re: WiFi not resuming from RAM suspension

PostPosted: Sep 10th, '13, 15:37
by ciprianstoica
Hi everybody,

I have the same problem on my lenovo b590.
Wifi is not re-connecting after laptop goes out from sleep mode.

Mankurt have you found any working solutions until now?

Re: WiFi not resuming from RAM suspension

PostPosted: Sep 27th, '13, 09:43
by zeebra
I am using the ath9k driver for my wireless card, and I have no such problem. In this case I am running the stock Kernel, updated. When laptop comes out of sleep mode, it is either already connected or it reconnects immediately.

The issue could depend on how you have configured your wireless. I have selected that users can control it and that networkmanager can control it, in fact I have selected all the options(except roaming) at the end of the configuration.

Re: WiFi not resuming from RAM suspension

PostPosted: Nov 26th, '13, 23:39
by cleong
Unchecking "allow access point roaming" fix the problem in my case. I have a Lenovo B570.

Re: WiFi not resuming from RAM suspension

PostPosted: Feb 6th, '14, 04:32
by paultgg
This happens to me in KDE, but not in XFCE. Not sure why, but the wireless DOES come back up for me in XFCE.