Wifi cant connect after suspend with highest cpu freq set

Bug #628310 reported by Darth Mowzy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When I change my cpu frequency to the highest value (2gz) then hibernate and resume I cannot see any access points.

I can get wifi working again by:
     - rebooting
     - changing the cpu scaling to a lower setting then hibernate/resume
     - changing the cpu scaling to a lower setting then `sudo rmmod ath9k; sudo modprobe ath9k;`

I am using Ubuntu 10.04 with ath9k drivers for AR5008.

$ lspci |grep Atheros
0e:00.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)

$ uname -r
2.6.32-24-generic

$ ifconfig
wlan0 Link encap:Ethernet HWaddr 00:1b:9e:92:7a:46
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:258520 errors:0 dropped:0 overruns:0 frame:0
          TX packets:188088 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:312495335 (312.4 MB) TX bytes:21874600 (21.8 MB)
          Interrupt:18 Memory:f8200000-f8210000

$ iwconfig
wlan0 IEEE 802.11g ESSID:off/any
          Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated
          Bit Rate:300 Mb/s
          Power Management:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0

$ iwlist wlan0 scan
wlan0 No scan results

Revision history for this message
Darth Mowzy (darthmowzy) wrote :

This is similar to this bug https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-2.6.28/+bug/361178

I already have linux backports generic installed.

tags: added: ar5008 atheros suspend
Darth Mowzy (darthmowzy)
description: updated
Revision history for this message
Darth Mowzy (darthmowzy) wrote :

I found out that cpu scaling is causing this issue.

description: updated
Darth Mowzy (darthmowzy)
summary: - Wifi cant connect after suspend - Atheros ar5008
+ Wifi cant connect after suspend with highest cpu freq set
Revision history for this message
Darth Mowzy (darthmowzy) wrote :

I installed Linux Mint, which is based on Ubuntu, to separate partition. I installed linux backports. The problem also exists on Linux Mint.

Revision history for this message
Darth Mowzy (darthmowzy) wrote :

The issue still exists but I created a workaround using a script to automatically remove and reload ath9k when resuming under /usr/lib/pm-utils/sleep.d

[CODE]#!/bin/sh

. "${PM_FUNCTIONS}"

module="ath9k"

fix_mouse()
{
    echo "\*\*\*\* FIXING THE MOUSE \*\*\*\*"
    /bin/chvt 1
    /bin/chvt 7
    #gtk-update-icon-cache /usr/share/icons/hicolor/
    echo "mouse should be fixed now"
}

fix_wifi()
{
    echo "\*\*\*\* FIXING THE WIFI \*\*\*\*"

    cur_freq=`sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq`
    min_freq=`sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
    echo "cpu speed is $cur_freq"
    echo "changing cpu speed to $min_freq"
    #cpufreq-selector -f $min_freq #TIME COMMAND TAKES A WHILE FOR SOME REASON
    cpufreq-set -f $min_freq #THIS COMMAND IS FASTER FOR SOME REASON
    echo "cpu speed set to $min_freq"

    echo "sleeping for 1 second"
    sleep 1
    echo "done sleeping"

    echo "removing module $module"
    rmmod $module
    echo "probing module $module"
    modprobe $module

    # echo "changing cpu speed back to $cur_freq"
    # cpufreq-selector -f $cur_freq
}

case "$1" in
    hibernate|suspend)
        echo "BLAH status: $1"
        ;;
    thaw|resume)
        echo "status: $1"
        fix_mouse

        #fix_wifi
        ;;
    *)
        exit $NA
        ;;
esac[/CODE]

Also, cpufreq-selector seems to have a bug which causes it to take 30 seconds to set the cpu speed. So I installed cpufreq-set which works instantly.

Revision history for this message
Renate (yollywau) wrote :

My TP-Link PCI-Card is AR 5008.

After pm-suspend, there isn't found the router, no IP. Iwlist scan - nothing. In Ubuntu lucid and maverick, and in aptosid the same problem.
I tried rmmod ath9k before suspend, but it didn't work. The device is found but no IP...
Pm-hibernate works.

Shimi Chen (shimi-chen)
affects: ubuntu → pm-utils (Ubuntu)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Please reply if this is still an issue on a supported release.

Changed in pm-utils (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.