Bug 26682 - Disabling killswitch after restart does not enable wifi, iwl4965
Summary: Disabling killswitch after restart does not enable wifi, iwl4965
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 14:32 UTC by Michael Doube
Modified: 2011-04-18 23:11 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.37
Subsystem:
Regression: No
Bisected commit-id:


Attachments
/var/log/messages during suspend-resume with killswitch state changing (12.56 KB, text/plain)
2011-01-14 14:32 UTC, Michael Doube
Details

Description Michael Doube 2011-01-14 14:32:06 UTC
Created attachment 43532 [details]
/var/log/messages during suspend-resume with killswitch state changing

If my notebook is booted or resumed with an enabled wifi killswitch (wifi off), disabling the killswitch does not turn on wifi.

However, this is dependent on the state of the killswitch during shutdown or suspend, or whether the killswitch state changed during shutdown/suspend.

Rules: start from a working system (Wifi Connected, killswitch off). Shutdown and restart with switch in test position.  Once restarted, disable killswitch and record result – does WiFi work?		

Shutdown-restart		
Killswitch state   Shutdown ON	            Shutdown OFF
Startup ON	   Wifi fails to turn on    Wifi fails to turn on
Startup OFF        OK                       OK
		
Suspend-resume		
Killswitch state   Suspend ON	            Suspend OFF
Resume ON          OK                       Wifi fails to turn on
Resume OFF         Wifi fails to turn on    OK
		
During a session: if wifi is working, the killswitch will work properly during the session.
Comment 1 John W. Linville 2011-01-14 14:43:16 UTC
What kernel version are you using?
Comment 2 Michael Doube 2011-01-14 15:10:58 UTC
Right now, 2.6.37 compiled from mainline.  This bug has been around for a while though - since at least 2.6.31 (which I reported downstream, ages ago).
Comment 3 John W. Linville 2011-03-29 17:59:16 UTC
After you turn-off the rfkill, does "ifconfig wlan0 up" bring the device up?
Comment 4 Michael Doube 2011-03-29 21:03:28 UTC
John,

I tried suspending with RF kill ON and resuming with RF kill OFF, then tried

ifconfig wlan0 up

and got this output

SIOCSIFFLAGS: Operation not possible due to RF-kill
Comment 5 wey-yi.w.guy 2011-03-29 21:42:29 UTC
not sure the following patch help

commit 3dd823e6b86407aed1a025041d8f1df77e43a9c8
Author: Don Fry <donald.h.fry@intel.com>
Date:   Sun Feb 6 09:29:45 2011 -0800

    iwlagn: Re-enable RF_KILL interrupt when down
    
    With commit 554d1d027b19265c4aa3f718b3126d2b86e09a08 only one RF_KILL
    interrupt will be seen by the driver when the interface is down.
    
    Re-enable the interrupt when it occurs to see all transitions.

Wey
Comment 6 Michael Doube 2011-03-30 09:42:53 UTC
Wey,

I checked out  commit 3dd823e6b86407aed1a025041d8f1df77e43a9c8
and compiled a kernel but it does not fix the issue.
Thanks,

Michael
Comment 7 wey-yi.w.guy 2011-03-30 19:57:49 UTC
ok, thansk for testing
so just want to be sure, it is for 4965 and you are using 2.6.37 kernel

Thanks
Wey
Comment 8 Michael Doube 2011-03-30 20:14:50 UTC
Wey,

lspci reports:
06:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

And the kernel at that commit was v2.6.37

Michael
Comment 9 Michael Doube 2011-03-30 21:39:52 UTC
Just tested 2.6.39-rc1 and the first situation is fixed:
If I boot with killswitch enabled (radio off), I can now enable radio by disabling killswitch.
Comment 10 wey-yi.w.guy 2011-03-30 22:18:20 UTC
1) Shutdown-restart        
Killswitch state   Shutdown ON                Shutdown OFF
Startup ON       Wifi fails to turn on    Wifi fails to turn on
Startup OFF        OK                       OK

2) Suspend-resume        
Killswitch state   Suspend ON                Suspend OFF
Resume ON          OK                       Wifi fails to turn on
Resume OFF         Wifi fails to turn on    OK

how about suspend-resume?

Thanks
Wey
Comment 11 Michael Doube 2011-03-31 08:11:54 UTC
Wey,

Unfortunately I just discovered that suspend-resume is broken in .39-rc1, so I can't test it; there is another bug to be fixed first... (specifically, resume hangs).
Comment 12 wey-yi.w.guy 2011-03-31 15:24:36 UTC
is the WiFi NIC hang the system, or something elae?

Thanks
Wey
Comment 13 Michael Doube 2011-03-31 16:04:43 UTC
Something else I think, syslog says:

Mar 31 16:54:34 doris kernel: [  657.300081] sky2 0000:07:00.0: eth0: disabling interface
Mar 31 16:54:35 doris kernel: [  657.589885] PM: Syncing filesystems ... done.
Mar 31 16:54:35 doris kernel: [  657.594636] PM: Preparing system for mem sleep
Mar 31 16:55:36 doris kernel: imklog 4.2.0, log source = /proc/kmsg started.
Mar 31 16:55:36 doris rsyslogd: [origin software="rsyslogd" swVersion="4.2.0" x-pid="661" x-info="http://www.rsyslog.com"] (re)start
Mar 31 16:55:36 doris rsyslogd: rsyslogd's groupid changed to 103
Mar 31 16:55:36 doris rsyslogd: rsyslogd's userid changed to 101
Mar 31 16:55:36 doris rsyslogd-2039: Could no open output file '/dev/xconsole' [try http://www.rsyslog.com/e/2039 ]
Comment 14 Michael Doube 2011-04-05 09:56:58 UTC
Wey,

I think it's the display driver:
https://bugzilla.kernel.org/show_bug.cgi?id=32692

Once that is fixed I can do more testing on this bug.
Comment 15 wey-yi.w.guy 2011-04-05 14:28:53 UTC
np, we encounter the same problem here :-)

Thanks
Wey
Comment 16 Michael Doube 2011-04-05 14:48:50 UTC
It seems that there is another bug, after 32692, that causes similar failure to resume, which I am tracking down with bisect... will let you know when I've found it.
Comment 17 Michael Doube 2011-04-18 23:11:48 UTC
OK, looks like this bug is fixed in 2.6.39-rc3, though I had to patch a bug in sony-laptop to get resume to work at all.  Hopefully Mattia's patch will make it into -rc4 so you can test it too.

I can now change kill switch state during suspend to ram and enable my WiFi if it was disabled during boot.

Note You need to log in before you can comment on or make changes to this bug.