Ubuntu

have to reload ath_pci after suspend+resume

Reported by Martin Emrich on 2008-02-12
4
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Undecided
Unassigned

Bug Description

After suspending and resuming on my Thinkpad T41p + AR5212, the wireless driver is stuck; it shows the SSIDs available from before the suspend and does not find any new. A quick "rmmod ath_pci; modprobe ath_pci" fixes it.

In gutsy, this was not necessary.

Dan (danser) wrote :

Once #188261 is fixed, this can be worked around by adding a file to /etc/pm/config.d containing

SUSPEND_MODULES=ath_pci

Of course, it would be nice to have this by default...

Martin Emrich (emme) wrote :

Sorry, this did not help. Where can I find out if the script I placed there is used?

Seems that #190679 needs to be fixed too.

Applying both patches (#188261, #190679) to /usr/lib/pm-utils/functions
then adding a file to /etc/pm/config.d/ containing
SUSPEND_MODULES="ath_pci"
fixed my problem with Atheros wifi.

What is more adding another module to this file fixed my suspend problems caused by integrated USB cam.
SUSPEND_MODULES="ath_pci ehci_hcd "

hunger (hunger) wrote :

/etc/default/acpi-support has a variable for modules to remove on suspend. The comment there claims that network and usb modules get unloaded in any case. So ath_pci should get unloaded automatically (if acpi-support is still the way PM is handled in hardy).

Martin Emrich (emme) wrote :

This was actually the first thing I tried, but it did not help either (MODULES="ath_pci" is still in there).
Currently, I have a button on my panel linked to a script that unloads/loads the module, and I click it after every resume...

Ciao

Martin

hunger (hunger) wrote :

Isen't it great how well documented the whole suspend thingy is?

Here is how I think this whole thing works:

hal is triggered and runs /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux

That script in turn runs /usr/sbin/pm-suspend. That script basically parses the arguments it got from hal and calls functions stored in /usr/lib/pm-utils/functions, triggering pm_main there.

pm_main in turn calls the run_hooks function. That will run files found in /etc/pm/sleep.d/ and /usr/lib/pm-utils/sleep.d/ and will run them in order (which is imposed by sort). /usr/lib/pm-utils/sleep.d/50modules is responsible to load/unload modules. It removes all modules found in the SUSPEND_MODULES variable.

This variable is set in /usr/lib/pm-utils/functions, being initialized to "". /usr/lib/pm-utils/defaults is then sourced and can be used to override the value.

I am not sure whether /etc/default/acpi-support still works or not: in /usr/lib/pm-utils/functions the suspend is triggered by writing "mem" into the proper sysfs file... that might or might not trigger acpi-suspend to work its magic. It would be great,

So I added ath_pci into /usr/lib/pm-utils/defaults now... not sure whether this works as I currently can not test this;-)

Martin Emrich (emme) wrote :

Sorry for not commenting for some time, I had problems with #199802, too. Now as n-m is fixed again, I still have this problem here. Whenever my wireless network doesn't find the networks, I get one of these messages if I use wpa_supplicant from the command line:

Either I get this, over and over again very fast (ca. 2-3 cycles per second):

WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:30:bd:93:2e:1f
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:30:bd:93:2e:1f
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:30:bd:93:2e:1f
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:30:bd:93:2e:1f
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Associated with 00:30:bd:93:2e:1f
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
WPA: CCMP is used, but EAPOL-Key descriptor version (1) is not 2.
CTRL-EVENT-TERMINATING - signal 2 received
martin@gwaihir:~$

Or it just does not connect:

Trying to associate with 00:30:bd:93:2e:1f (SSID='emrich-og' freq=2462 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:30:bd:93:2e:1f (SSID='emrich-og' freq=2462 MHz)
Authentication with 00:00:00:00:00:00 timed out.
Trying to associate with 00:30:bd:93:2e:1f (SSID='emrich-og' freq=2462 MHz)
Authentication with 00:00:00:00:00:00 timed out.

With gutsy, it worked fine without reloading ath_pci, so it is a regression and I don't like the idea of "fixing" it by automatically reloading the module after suspend (if there's no viable alternative, I will do it of course).

Ciao

Martin

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers