Atheros AR5001 [168c:001c] Wifi not working after suspend/resume

Bug #769092 reported by Kristijan on 2011-04-22
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

There is problem with wireless connection after suspend/resume. After resuming computer from sleeping it tries to connect to my wlan, but it doesn't connect. Those bars for wireless are going up and down and after a while it askes me to retype password for wlan. I retype it and after a minute or two it askes again.
If I try to suspend/resume it again, all wlan connections are gone. Have to restart computer to see connections.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-8-generic 2.6.38-8.42
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: SB [HDA ATI SB], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'SB'/'HDA ATI SB at 0xcf5fc000 irq 16'
   Mixer name : 'Realtek ALC268'
   Components : 'HDA:11c11040,11790001,00100200 HDA:10ec0268,1179ff0c,00100003'
   Controls : 13
   Simple ctrls : 8
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xcfeec000 irq 46'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 4
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Fri Apr 22 16:57:08 2011
LiveMediaBuild: Ubuntu 11.04 "Natty Narwhal" - Beta amd64 (20110413)
MachineType: TOSHIBA Satellite A210
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/hostname.seed boot=casper initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-8-generic N/A
 linux-backports-modules-2.6.38-8-generic N/A
 linux-firmware 1.50
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/12/2007
dmi.bios.vendor: TOSHIBA
dmi.bios.version: V1.80
dmi.board.name: IALAA
dmi.board.vendor: TOSHIBA
dmi.board.version: 1.00
dmi.chassis.asset.tag: *
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnTOSHIBA:bvrV1.80:bd10/12/2007:svnTOSHIBA:pnSatelliteA210:pvrPSAELE-03Q009G3:rvnTOSHIBA:rnIALAA:rvr1.00:cvnTOSHIBA:ct10:cvrN/A:
dmi.product.name: Satellite A210
dmi.product.version: PSAELE-03Q009G3
dmi.sys.vendor: TOSHIBA

Kristijan (lapor) wrote :
summary: - Wifi not working after suspend/resume
+ Atheros AR5001 [168c:001c] Wifi not working after suspend/resume

Could you test with a newer kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/ to see if it is already fixed there?

Kristijan (lapor) wrote :

Ok. I will test it. But to be sure: I have to download all the files from that link you paste it, and install all the .deb files?

Ricardo Graça (devius) wrote :

This has been affecting me for years now and on various distros. I have a Ralink rt2860 and the connection is WEP. It's as if the router somehow blocks my computer after suspend. It doesn't happen all the time though. Maybe the connection to the router isn't terminated before suspend, causing the router to think the computer is still connected, and causing subsequent connection attempts from the same device to fail.

Kristijan (lapor) wrote :

After couple of attempts I managed to install new kernel. But just file: linux-image-... I couldn't install anything else, because Ubuntu Software Center freezes. And now, when I try to suspend computer it just turns itself off. I don' t know what's wrong.
In System Monitor it says that it's using linux kernel 2.6.39-999 (the last one).

@Devius: that is a good explanation what is going wrong. But do you maybe know how to fix this? I would be very grateful.

Ricardo Graça (devius) wrote :

@Kristijan I have no idea how to fix it and that was just a guess. Rebooting the computer always restores the connection, but that's hardly a solution for this. The problems you have are with WEP, WPA or both types of connection?

Kristijan (lapor) wrote :

My connection is WPA/WPA2.

Sorry Kristijan, I forgot to subscribe myself to this bug and so did not see your subsequent comments.

To install the mainline kernel download the two *amd64 and the *all.deb from http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/ into a a new folder, e.g. /home/your_home_name/mainline. See to it that the are the only deb files in that folder. In a terminal then type:
sudo dpkg -i --recursive /home/your_home_name/mainline

@Devius
Try my suggestions in bug 773018 comment 3.

Kristijan (lapor) wrote :

I installed new kernel, but it's still not connecting after suspend/resume. After 4th suspend/resume in a row, it connected as it should after the first one.

Try unloading the wireless driver before suspending with:
sudo modprobe -rv ath5k

and load it with:
sudo modprobe -v ath5k
after resume

Does it work then?

Kristijan (lapor) wrote :

I tried it and it works well.
But now brightness changes. When I resume it, it is darker but it is on 100%. If I put it on 0%, it is as bright as it should be. It is reverse as it should be. But I would say, it's another bug.

ps. should I use this: "sudo modprobe -rv ath5k" everytime I want to suspend my computer. For now, I have no choice, but I sure hope it get fix. And bytheway, thanks for the current solution. Now I can at least put my computer to suspend :)

Brad Figg (brad-figg) on 2011-05-05
Changed in linux (Ubuntu):
status: New → Confirmed
Sören Brinkmann (soebri) wrote :

I see similar behavior after I updated from Maverick to Natty (didn't have any problems on Maverick).
After a fresh boot everything works well.
After a suspend only a hidden network is reported, although there are plenty in my neighborhood. I did not yet try to unload/reload the network driver (will do when @home) but a simple "service restart network-manager" doesn't help.

Glad to hear unloading the module works as a workaround. Yes, it will have to be done before every suspend.

Looking at:
https://wiki.archlinux.org/index.php/Pm-utils#Creating_your_own_hooks

this should be able to automate that:

#!/bin/bash
case $1 in
    hibernate)
        modprobe -r ath5k
        ;;
    suspend)
        modprobe -r ath5k
        ;;
    thaw)
        modprobe ath5k
        ;;
    resume)
        modprobe ath5k
        ;;
    *) echo "somebody is calling me totally wrong."
        ;;
esac

I remember, there is something even easier for simply unloading a module before suspend. So instead of the above do this:

make a file:
sudo nano /etc/pm/config.d/suspend_ath5k
with the following single line in it:
SUSPEND_MODULES="ath5k"

as described in man pm-action.

Ezra Reeves (ezrareeves) wrote :

I also have this problem and the workaround that I am using is to add the module to the "Modules" section in /etc/default/acpi-support. When adding it I noticed the following note:

# Add modules to this list to have them removed before suspend and reloaded
# on resume. An example would be MODULES="em8300 yenta_socket"
#
# Note that network cards and USB controllers will automatically be unloaded
# unless they're listed in MODULES_WHITELIST

In my case I have a ralink 2860 card, the module that Ubuntu used out of the box didn't work so I had to use the module provided by the manufacturer. I'm curious if other people with this problem are also using different modules and those modules are not being unloaded as intended because of it. I don't know enough about how the network modules are unloaded perhaps someone else does.

Interesting that there are two places for unloading modules before suspend:
/etc/pm/config.d/
/etc/default/acpi-support
Does anyone know which is to be preferred?

@Ezra Reeves
The out of the box driver for the Ralink 2860 card (rt2800pci) should work, at least if two things are taken care of:
1) there is a bug with pcie_aspm (PCI bus power saving) that is fixed with the kernel now in natty-proposed. This bug breaks the WLAN after a suspend when pcie_aspm is activated (e.g. on battery)

2) with PEAP with TKIP/MSCHAPv2 the module needs to be loaded with "nohwcrypt=1" according to bug 777215.

If you find the out of the box module to have another bug it would be helpful if you made a separate bug report about this with ubuntu-bug linux so that it can be investigated and fixed.

Could you make your question about module unloading more specific?

Ezra Reeves (ezrareeves) wrote :

Wolfgang: It seems I had spoken too soon about the bug being fixed for me, it was working fine that night several times in a row but the next day I was still experiencing the problem.

To clarify my question, The /etc/default/acpi-support file states network cards are automatically unloaded, how does it know which modules to unload. Is it not a bug if they are not being automatically unloaded?

I will try the default module using your suggested fixes thank you for the info.

Kristijan (lapor) wrote :

My screen broke down on my laptop. So, I will not be able to help with this bug. As soon I will fix it I will continue with testing.
Thanks.

kubunsero (jebefe) wrote :

Hello everyone.

I had a similar problem with my wifi device (RALINK RT2860STA) on my PC Medion Akoya Mini (E1210) using kubuntu 11.04. When starting the system after suspend or hibernate, and battery power instead of power supply, the wifi could not connect.

I solved it using the solution given in
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/689004/comments/9

With this solution:

sudo touch / etc / pm / power.d / pcie_aspm

I got my wifi back to wake up from suspend or hibernate.

On the other side and for those with the same device (RALINK RT2860STA) comment that there is another added problem that makes the connection will sometimes slow or even freeze with this device. I solved it the way I describe in
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/774421/comments/6

Adding the following lines in /etc/modprobe.d/blacklist.conf:

blacklist rt2800pci
blacklist rt2x00pci
blacklist rt2860

my wifi (with device RALINK RT2860STA) go well.

Greetings.

kubunsero (jebefe) wrote :

Hi again

In the previous comment i wrote incorrectly:

sudo touch / etc / pm / power.d / pcie_aspm

The correct is:

sudo touch /etc/pm/power.d/pcie_aspm

 (space only after sudo and after touch)

Greetings

Kristijan, thank you for reporting this and helping make Ubuntu better. This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please provide the information following https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume ? As well, can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ . However, note you can only test Suspend, not Hibernate, when using a LiveCD. If the issue remains, run the following command in the development release from a Terminal (Applications->Accessories->Terminal) as it will automatically gather and attach updated debug information to this report.

apport-collect -p linux <BUGNUMBER>

Additionally, if you could try to reproduce this with the upstream mainline kernel that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.

Please let us know your results. Thanks in advance.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Kristijan (lapor) wrote :

I just test 11.04 and never really use it. I waited for 11.10 and been using it ever since. With this edition (11.10) I had some minor problems with suspend/resume. Sometimes it didn't resume. But after a while, everything started to work flawlessly. After some kernel update, probably.
So now it works as it should, but I still didn't test it on Precise Pengolin. But I assume, that if it works in 11.10 with older kernel, it should work in 12.04 also.

The bug is fixed, but I can't tell in which kernel build.

Thanks for your time.

Kristijan, this bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in linux (Ubuntu):
status: Incomplete → Invalid
Kristijan (lapor) on 2012-05-06
Changed in linux (Ubuntu):
status: Invalid → New
Brad Figg (brad-figg) on 2012-05-06
Changed in linux (Ubuntu):
status: New → Confirmed
Kristijan (lapor) wrote :

I am now using 12.04 and it started again. It was all fine in 11.10, but in 12.04 it just makes the same weird stuff as is described above.

I have no idea what went wrong, but this is not good.

Kristijan, could you please provide the information following https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume ?
Additionally, if you could try to reproduce this with the upstream mainline kernel that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.

Please let us know your results. Thanks in advance.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Kristijan (lapor) wrote :

So I've installed new kernel "linux-image-3.4.0-030400rc6-generic_3.4.0-030400rc6.201205061835_amd64.deb" and restart it. Now I have Unity 2D and when I tried suspend it doesn't want to resume. I'm left with black screen and about 5 pixels of green, blue and red colours where the mouse pointer should be. I can only restart it.

I'm going to change back to previous kernel, so at least I'll have Unity 3D.

tags: added: running-unitykernel-bug-exists-upstream
removed: needs-upstream-testing running-unity
Kristijan (lapor) on 2012-05-08
tags: added: kernel-bug-exists-upstream running-unity
removed: running-unitykernel-bug-exists-upstream
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu laptop testing tracker.

A list of all reports related to this bug can be found here:
http://laptop.qa.ubuntu.com/qatracker/reports/bugs/769092

tags: added: laptop-testing
To post a comment you must log in.