WiFi not resuming from RAM suspension

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

WiFi not resuming from RAM suspension

Postby mankurt » Jul 17th, '13, 07:22

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.
mankurt
 
Posts: 6
Joined: Jul 17th, '13, 07:06

Re: WiFi not resuming from RAM suspension

Postby doktor5000 » Jul 17th, '13, 19:15

Can you please show the output of
Code: Select all
lspcidrake -v | grep NET
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: WiFi not resuming from RAM suspension

Postby mankurt » Jul 18th, '13, 10:28

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.
mankurt
 
Posts: 6
Joined: Jul 17th, '13, 07:06

Re: WiFi not resuming from RAM suspension

Postby doktor5000 » Jul 18th, '13, 19:37

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: WiFi not resuming from RAM suspension

Postby mankurt » Jul 18th, '13, 20:56

Tried all three options, none worked so far... thanks mate
mankurt
 
Posts: 6
Joined: Jul 17th, '13, 07:06

Re: WiFi not resuming from RAM suspension

Postby doktor5000 » Jul 18th, '13, 22:55

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: WiFi not resuming from RAM suspension

Postby mankurt » Jul 19th, '13, 05:12

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:
mankurt
 
Posts: 6
Joined: Jul 17th, '13, 07:06

Re: WiFi not resuming from RAM suspension

Postby jiml8 » Jul 19th, '13, 16:35

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).
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: WiFi not resuming from RAM suspension

Postby doktor5000 » Jul 19th, '13, 19:38

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: WiFi not resuming from RAM suspension

Postby mankurt » Jul 20th, '13, 13:39

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.
mankurt
 
Posts: 6
Joined: Jul 17th, '13, 07:06

Re: WiFi not resuming from RAM suspension

Postby mankurt » Jul 20th, '13, 16:24

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
mankurt
 
Posts: 6
Joined: Jul 17th, '13, 07:06

Re: WiFi not resuming from RAM suspension

Postby ciprianstoica » Sep 10th, '13, 15:37

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?
ciprianstoica
 
Posts: 7
Joined: Aug 29th, '11, 10:14

Re: WiFi not resuming from RAM suspension

Postby zeebra » Sep 27th, '13, 09:43

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.
zeebra
 
Posts: 125
Joined: Sep 7th, '13, 21:20

Re: WiFi not resuming from RAM suspension

Postby cleong » Nov 26th, '13, 23:39

Unchecking "allow access point roaming" fix the problem in my case. I have a Lenovo B570.
cleong
 
Posts: 2
Joined: Feb 22nd, '13, 18:40

Re: WiFi not resuming from RAM suspension

Postby paultgg » Feb 6th, '14, 04:32

This happens to me in KDE, but not in XFCE. Not sure why, but the wireless DOES come back up for me in XFCE.
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest