Created attachment 522638 [details]
/var/log/messages from where sleep begins until red X appears after resume
Description of problem:
Wifi works fine on system after boot-up. After system suspend (select it with software or close laptop lid) all comes back OK but wifi never connects. In KDE, icon in tray indicates "configuring network" for a while then indicates "waiting for authorization". Eventually a "key" icon appears over the normal wireless icon and after a few minutes a red X appears. In gnome, which I run less often, a dialog pops up with my WEP key filled in correctly. If I click OK the dialog comes back after a few seconds. After doing this a few times it too indicates that the wireless connection is not possible.
Version-Release number of selected component (if applicable):
Sep 6 00:10:04 nhpl kernel: [ 9767.128618] iwlagn 0000:0d:00.0: Detected Intel(R) Centrino(R) Wireless-N 1000 BGN, REV=0x6C
Sep 6 00:10:04 nhpl kernel: [ 9767.152465] iwlagn 0000:0d:00.0: loaded firmware version 188.8.131.52 build 35138
Linux nhpl 184.108.40.206-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Steps to Reproduce:
1. All running well (KDE). Close laptop lid
2. Allow laptop to suspend
3. Open lid
4. Enter password
5. Laptop resumes OK but wifi tries to connect for several minutes
6. Eventually gives up and red X appears instead of wifi icon
All seems OK after resume except wifi will not connect. Must do a re-boot for wife to come back.
Wifi should quickly reconnect after resume.
After resume, can plug in Ethernet and it connects and works fine.
Laptop is new HP Pavilion dv7-6195us
Message in log when wifi connection attempts fail seems to be related to authentication of the secret key as indicated by this message:
Sep 11 19:58:52 nphl NetworkManager: <info> (wlan0): device state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
Am now also running (K)ubuntu 11.04 on the laptop which has no problem with wifi resuming after suspend.
Several updates, including the kernel, have occurred on F15 over the last 1+ month since reporting this bug and same problem exists.
Note: After upgrade to (K)ubuntu 11.10 on the same laptop, the same bug now occurs there. It seems to be purely kernel related. When booting 11.10 with the previous 11.04 kernel, 4.6.38, instead of new, 3.0.0, wifi resumes OK. Also Ubuntu launchpad support had me try new kernel 3.1-rc10 and it did not help the problem.
See bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/880648
Same problem occurs on f16.
However fix for issue described in this lkml thread:
Specific fix presented here (from wwguy):
I created a new file called iwlagn.conf under /etc/modprobe.d containing a single line that causes the bt (bluetooth I assume) coexistence flag to be set false at startup in the iwlagn kernel module:
options iwlagn bt_coex_active=N
My laptop does not have bluetooth capability so possibly having this flag on, which is default, causes problems.
I don't know is this an ultimate fix or just a temporary workaround, but it definitely fixes the problem for me. Now wifi resumes after wake from sleep.
Unfortunately the latest f16 kernel, 3.1.6-1.fc16.x86_64, renders this fix ineffective and again cannot resume wifi after a sleep and must reboot.
Therefore must stay with older kernels for this to work and for wifi to resume after sleep:
3.1.5-6 is still OK
3.1.5-2 is still OK.
Wey-yi, the kernel that breaks here is the first one to include the compat-wireless-3.2-rc6 snapshot. Any idea why this code would break the bt_coex_active=0 work-around?
don't see any reason why bt_coex_active will not works.
Please set the debug flag to 0x01:
sudo modprobe iwlwifi debug=0x01
it should tell us is BT coex disable or active.
With latest f16 kernel 3.1.6-1.fc16.x86_64 the module iwlagn no longer exists and seems to be replace with iwlwifi. Since I was setting the bt_coex_active parameter using the /etc/modprobe.d/iwlagn.conf file, it was not being set for the new iwlwifi. So adding a iwlwifi.conf file containing this fixed the problem:
options iwlwifi bt_coex_active=0
Now can resume after sleep again with the latest f16 kernel.
By the way, I can use the "debug=0x01" parameter with iwlagn module with the previous kernel. But I get an error when I try to use the debug parameter with iwlwifi with the latest kernel. "modinfo iwlwifi" also does not list a "debug" parameter.
did you compile with CONFIG_IWLWIFI_DEBUG enabled?
I didn't compile the module (or kernel). It is the stock module (and kernel) from fedora 16 updates now at 3.1.7-1.fc16.x86_64.
I am not familiar with stock fedora, but my guess is CONFIG_IWLWIFI_DEBUG is not enabled by default.
Closing on the basis of comment 7...the "debug=" thing is a side issue, and not really relevant here.