Bug 586808 - Wireless cannot be enabled if it is not enabled at boot time.
Wireless cannot be enabled if it is not enabled at boot time.
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Lenny Szubowicz
Red Hat Kernel QE team
:
Depends On:
Blocks: 846704 1269638
  Show dependency treegraph
 
Reported: 2010-04-28 08:09 EDT by Josh
Modified: 2015-10-08 13:26 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-08 13:26:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
rfkill output (336 bytes, text/plain)
2010-04-30 14:24 EDT, Josh
no flags Details
dmesg outputs (41 bytes, text/plain)
2010-05-11 22:35 EDT, Josh
no flags Details
dmesg output from bootup with wireless turned off (50 bytes, text/plain)
2010-05-11 22:35 EDT, Josh
no flags Details
dmesg output from switching wireless on after being off at bootup (55 bytes, text/plain)
2010-05-11 22:36 EDT, Josh
no flags Details
dmesg output from bootup with wireless turned on (49 bytes, text/plain)
2010-05-11 22:36 EDT, Josh
no flags Details
dmesg output from switching wireless off after being on at bootup (59 bytes, text/plain)
2010-05-11 22:37 EDT, Josh
no flags Details
dmesg output from switching wireless on after being switched off (62 bytes, text/plain)
2010-05-11 22:37 EDT, Josh
no flags Details
Debug rfkill polling (662 bytes, patch)
2010-05-17 15:57 EDT, reinette chatre
no flags Details | Diff
dmesg output from bootup with wireless turned off (56.71 KB, text/plain)
2010-05-18 20:46 EDT, Josh
no flags Details
iwl3945 debugging files. dmesg's at various points and some rfkill logs (179.34 KB, application/x-gzip)
2010-05-21 08:20 EDT, Josh
no flags Details
dmesg output of unloading dell-laptop/iwl3945 (77.98 KB, text/plain)
2010-06-08 07:36 EDT, Josh
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Linux Kernel 15303 None None None Never

  None (edit)
Description Josh 2010-04-28 08:09:44 EDT
Description of problem:
My laptop has a hardware switch for the wireless.  If the hardware switch is turned off at boot then RHEL6 will not enable the wireless even if I turn the hardware switch on.  If the hardware switch _is_ on during boot then I can enable/disable the wireless using the switch and RHEL6 recognizes and reacts to the change.

Version-Release number of selected component (if applicable):
2.6.32-19.el6.i686

How reproducible:
Always

Steps to Reproduce:
1. Turn off laptop
2. Disable wireless using the hardware switch
3. Turn on laptop
4. Turn on wireless using the hardware switch
  
Actual results:
Wireless is not enabled.

Expected results:
Wireless is enabled.

Additional info:
Using a Dell Latitude D420.
lspci:
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

The iwl3945 module (which I assume is the wireless module) is loaded even when the switch is turned off at boot.
Comment 2 RHEL Product and Program Management 2010-04-28 09:25:22 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Taunus 2010-04-30 02:59:22 EDT
The same thing happens on rhel 5.5

Maybe you can try this workaround.
- turn on the wireless from the hw switch
- right click the networkmanager icon and disable wireless
- right click the networkmanager icon and enable wireless

Does it find networks after that?
Comment 4 John W. Linville 2010-04-30 11:01:15 EDT
Alternatively "ifconfig wlan0 up" after disabling rfkill...
Comment 5 John W. Linville 2010-04-30 13:27:56 EDT
Please post the output of running "dmesg" immediately after disabling rfkill (i.e. enabling wireless).

I don't have an iwl3945-equipped box running RHEL6, but I do have one with F-12.  Both the -99.fc12 kernel and the -19.el6 (i.e. stock RHEL6 Beta) kernel running on the F-12 userland work exactly as expected (i.e. disabling rfkill causes NetworkManager to immediately start connecting).  This suggests to me that this isn't a kernel issue and therefore that some userland component must be involved.

Dan, any suggestions?
Comment 6 John W. Linville 2010-04-30 13:37:58 EDT
Also, please run "rfkill event" and turn the rfkill on and off -- post the output here...thanks!
Comment 7 Josh 2010-04-30 14:20:44 EDT
The problem is intermittent.

(In reply to comment #3)
> The same thing happens on rhel 5.5
> 
> Maybe you can try this workaround.
> - turn on the wireless from the hw switch
> - right click the networkmanager icon and disable wireless
> - right click the networkmanager icon and enable wireless
> 
> Does it find networks after that?    

The wireless option is greyed out.

(In reply to comment #4)
> Alternatively "ifconfig wlan0 up" after disabling rfkill...    

# ifconfig wlan0 up
SIOCIFFLAGS: Unknown error 132

(In reply to comment #5)
> Please post the output of running "dmesg" immediately after disabling rfkill
> (i.e. enabling wireless).
> 
> I don't have an iwl3945-equipped box running RHEL6, but I do have one with
> F-12.  Both the -99.fc12 kernel and the -19.el6 (i.e. stock RHEL6 Beta) kernel
> running on the F-12 userland work exactly as expected (i.e. disabling rfkill
> causes NetworkManager to immediately start connecting).  This suggests to me
> that this isn't a kernel issue and therefore that some userland component must
> be involved.
> 
> Dan, any suggestions?    

There is no output in dmesg after I enable wireless.
Comment 8 Josh 2010-04-30 14:24:27 EDT
Created attachment 410566 [details]
rfkill output
Comment 9 Josh 2010-04-30 14:44:30 EDT
I tested starting wireless from both a cold boot and a reboot, both failed to enable wireless when rfkill was disabled.
Comment 10 Taunus 2010-05-04 04:02:18 EDT
About the workaround I posted: it works on rhel 5.5 and Thinkpad t400
Comment 11 John W. Linville 2010-05-11 13:22:49 EDT
Given that this is a Dell laptop, I think this may be a duplicate of another issue that Matthew already addressed...?
Comment 12 Josh 2010-05-11 13:25:53 EDT
i am more than happy to test any new packages
Comment 13 Matthew Garrett 2010-05-11 13:31:31 EDT
Is there anything in dmesg when you flick the switch and the wireless fails to wake up?
Comment 14 Josh 2010-05-11 22:29:07 EDT
(In reply to comment #13)
> Is there anything in dmesg when you flick the switch and the wireless fails to
> wake up?    

Unfortunately there is not.

I booted my laptop up with the switch turned off then ran:

$ dmesg > dmesg.off
<turned switch on>
$ dmesg > dmesg.switched
$ diff dmesg.off dmesg.switched # no output

I booted my laptop up with the switch turned on then ran:

$ dmesg > dmesg.on ( i removed the wireless mac address stuff)
< turned switch off >
$ dmesg > dmesg.switched.off
< turned switch on >
$ dmesg > dmesg.switched.off.on

I've attached all of the files for reference.
Comment 15 Josh 2010-05-11 22:35:11 EDT
Created attachment 413307 [details]
dmesg outputs
Comment 16 Josh 2010-05-11 22:35:51 EDT
Created attachment 413308 [details]
dmesg output from bootup with wireless turned off
Comment 17 Josh 2010-05-11 22:36:22 EDT
Created attachment 413309 [details]
dmesg output from switching wireless on after being off at bootup
Comment 18 Josh 2010-05-11 22:36:44 EDT
Created attachment 413310 [details]
dmesg output from bootup with wireless turned on
Comment 19 Josh 2010-05-11 22:37:11 EDT
Created attachment 413311 [details]
dmesg output from switching wireless off after being on at bootup
Comment 20 Josh 2010-05-11 22:37:43 EDT
Created attachment 413312 [details]
dmesg output from switching wireless on after being switched off
Comment 21 Matthew Garrett 2010-05-12 14:06:43 EDT
Ok. In that case I don't think it's in any way related to the platform driver - that can be verified by unloading dell-laptop and checking that the switch still does nothing. Passing back to Linville.
Comment 22 John W. Linville 2010-05-12 15:03:16 EDT
Looks like the iwl3945 firmware isn't loaded if you boot with rfkill on...
Comment 23 reinette chatre 2010-05-17 14:59:10 EDT
(In reply to comment #22)
> Looks like the iwl3945 firmware isn't loaded if you boot with rfkill on...    

Isn't that correct behavior? rfkill on means interface down and we only load firmware when interface comes up. Even so, iwl3945 is supposed to do polling of rfkill register if firmware is not loaded so rfkill status should always be available.
Comment 24 reinette chatre 2010-05-17 15:05:51 EDT
I am looking at comment #8 again and I cannot see how driver can help here since it seems that no matter what the rfkill switch position is the hard rfkill state is always on.
Comment 25 John W. Linville 2010-05-17 15:14:17 EDT
Isn't iwl3945 responsible for setting the hard rfkill state?
Comment 26 reinette chatre 2010-05-17 15:57:13 EDT
Created attachment 414652 [details]
Debug rfkill polling

It does not seem to be getting anything though.

We can try something here to look into what driver is seeing

Josh, could you please repeat the "booting with wireless off" test but load the iwl3945 module with "modprobe iwl3945 debug=0x63fff" - this will show us if the polling is picking anything up. In addition to this, please run with the attached patch that will show us if the polling is actually running please note that this will produce a lot of information in your logs since I expect a printout every 2 seconds.
Comment 27 Josh 2010-05-17 16:25:23 EDT
(In reply to comment #26)
> Created an attachment (id=414652) [details]
> Debug rfkill polling
> 
> It does not seem to be getting anything though.
> 
> We can try something here to look into what driver is seeing
> 
> Josh, could you please repeat the "booting with wireless off" test but load the
> iwl3945 module with "modprobe iwl3945 debug=0x63fff" - this will show us if the
> polling is picking anything up. In addition to this, please run with the
> attached patch that will show us if the polling is actually running please note
> that this will produce a lot of information in your logs since I expect a
> printout every 2 seconds.    

Can you give me a quick guide on how to apply that patch?

Is it something like:

$ wget kernel.srpm
$ rpm -Uvh kernel.srpm
$ < add patch to build section and .spec file >
$ rpmbuild kernel.spec
# rpm -Uvh kernel

Thanks
Comment 28 reinette chatre 2010-05-17 16:32:17 EDT
yikes ... I don't know how to do this in RedHat. 

John, could you please help? I'll make notes and will hopefully not need to ask again.
Comment 29 John W. Linville 2010-05-17 16:44:25 EDT
Josh, yes that is the basic process.  If you don't already have it, the kernel SRPM is available here:

   ftp://ftp.redhat.com/pub/redhat/rhel/beta/6/source/SRPMS/kernel-2.6.32-19.el6.src.rpm

You probably also want to add a buildid definition in the spec file.  There is an example in the comments near the top of the file.

Is that information sufficient for you to be able to build a kernel w/ the patch?  If not, let me know...
Comment 30 Josh 2010-05-18 20:46:44 EDT
Created attachment 414992 [details]
dmesg output from bootup with wireless turned off

(In reply to comment #26)
> Created an attachment (id=414652) [details]
> Debug rfkill polling
> 
> It does not seem to be getting anything though.
> 
> We can try something here to look into what driver is seeing
> 
> Josh, could you please repeat the "booting with wireless off" test but load the
> iwl3945 module with "modprobe iwl3945 debug=0x63fff" - this will show us if the
> polling is picking anything up. In addition to this, please run with the
> attached patch that will show us if the polling is actually running please note
> that this will produce a lot of information in your logs since I expect a
> printout every 2 seconds.    

The module was loaded at bootup so I ran:
# modprobe -r iwl3945
# modprobe iwl3945 debug=0x63fff
Then I tried switching the switch off (enabling wireless)
$ dmesg > dmesg.out

Switching the switch on and off didn't seem to change the output of dmesg.  As you said, there were lots of lines added to dmesg as my system was on.
Comment 31 reinette chatre 2010-05-19 02:19:35 EDT
Strange ... the logs confirm that the driver is not obtaining any change in state of rfkill. 

Josh, when you switched rfkill back on and off ... did you perhaps do it very quickly? Note that the polling is done every two seconds, so if you swith rfkill on and off again in that time the rfkill change will not be picked up.

Also, could you please provide logs with printk timing? You can obtain this when compiling with CONFIG_PRINTK_TIME
Comment 32 John W. Linville 2010-05-19 10:56:49 EDT
Also, 'dmesg -n 8' before the test (just to be sure)?
Comment 33 Josh 2010-05-21 08:20:01 EDT
Created attachment 415658 [details]
iwl3945 debugging files.  dmesg's at various points and some rfkill logs

(In reply to comment #31)
> Strange ... the logs confirm that the driver is not obtaining any change in
> state of rfkill. 
> 
> Josh, when you switched rfkill back on and off ... did you perhaps do it very
> quickly? Note that the polling is done every two seconds, so if you swith
> rfkill on and off again in that time the rfkill change will not be picked up.
> 
> Also, could you please provide logs with printk timing? You can obtain this
> when compiling with CONFIG_PRINTK_TIME    

I've attached the dmesg logs from my latest test with CONFIG_PRINTK_TIME enabled.  I also ran rfkill in case that helps.  Sorry it took so long to get this to you, I had some trouble compiling my kernel.  Thanks for your help!

-josh
Comment 34 reinette chatre 2010-05-28 18:45:23 EDT
(In reply to comment #29)
> Josh, yes that is the basic process.  If you don't already have it, the kernel
> SRPM is available here:
> 
>   
> ftp://ftp.redhat.com/pub/redhat/rhel/beta/6/source/SRPMS/kernel-2.6.32-19.el6.src.rpm
> 
> You probably also want to add a buildid definition in the spec file.  There is
> an example in the comments near the top of the file.
> 
> Is that information sufficient for you to be able to build a kernel w/ the
> patch?  If not, let me know...    

Sorry, but is there not perhaps a spot where I can just download this kernel source without having to build it? I have not looked into getting a Fedora virtual system yet, seems like this is a priority now.

I am unable to reproduce this behavior in our current driver so I would like to see if I can reproduce in this kernel.
Comment 35 reinette chatre 2010-05-28 19:14:39 EDT
(In reply to comment #34)
> Sorry, but is there not perhaps a spot where I can just download this kernel
> source without having to build it? I have not looked into getting a Fedora
> virtual system yet, seems like this is a priority now.

Never mind, I found some space on my system in which I can install Fedora.
Comment 36 reinette chatre 2010-06-02 01:27:42 EDT
(In reply to comment #21)
> Ok. In that case I don't think it's in any way related to the platform driver -
> that can be verified by unloading dell-laptop and checking that the switch
> still does nothing. Passing back to Linville.    

Josh, have you perhaps tried Matthew's suggestion above?
Comment 37 Josh 2010-06-08 07:36:02 EDT
Created attachment 422150 [details]
dmesg output of unloading dell-laptop/iwl3945

(In reply to comment #36)
> (In reply to comment #21)
> > Ok. In that case I don't think it's in any way related to the platform driver -
> > that can be verified by unloading dell-laptop and checking that the switch
> > still does nothing. Passing back to Linville.    
> 
> Josh, have you perhaps tried Matthew's suggestion above?    

I removed both dell-laptop and iwl3945 then loaded dell-laptop then iwl3945 and was able to use the rfkill switch.

There are some weird messages in dmesg but at least one of them was from me running # modprobe iwl3945 dell-laptop

-josh
Comment 38 Matthew Garrett 2010-06-08 08:25:16 EDT
What if you don't reload dell-laptop?
Comment 39 Josh 2010-06-09 08:05:32 EDT
(In reply to comment #38)
> What if you don't reload dell-laptop?    

Here's what I've discovered.  If I boot up with the wireless disabled via the hardware switch I can enable my wireless with the following steps:

# modprobe -r dell_laptop
# modprobe -r iwl3945
<enable wireless with the switch>
# modprobe iwl3945 (the firmware is loaded by iwl3945 but wireless still doesn't work)
<disable wireless with the switch, wait a couple seconds>
<enable wireless with the switch>
SUCCESS!

I hope this information helps some how.
Comment 40 reinette chatre 2010-06-10 19:10:10 EDT
fwiw there seems to be a similar issue with sony-laptop that can be viewed at https://bugzilla.kernel.org/show_bug.cgi?id=15303
Comment 41 John W. Linville 2010-06-18 11:08:06 EDT
So, where does this leave us?
Comment 42 collura 2010-06-21 04:15:57 EDT
related link upstream

https://bugs.kde.org/show_bug.cgi?id=219703
Comment 43 reinette chatre 2010-06-21 17:31:27 EDT
(In reply to comment #41)
> So, where does this leave us?    

I do not see anything driver can do here ... if driver is left on its own things seem to work. 

I'd like to defer to Matthew to answer this question ... especially after re-reading his comment #21.
Comment 45 RHEL Product and Program Management 2010-07-15 10:00:46 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 46 RHEL Product and Program Management 2011-10-07 11:00:06 EDT
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 48 Josh 2015-10-07 16:01:35 EDT
I no longer use this device so this bug can be closed in my opinion.

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