Re: NetworkManager and rf_kill





On Tue, May 6, 2008 at 7:24 PM, Dan Williams <dcbw redhat com> wrote:
On Tue, 2008-05-06 at 18:08 +0200, Khashayar Naderehvandi wrote:
> Hi list,
>
> When disabling wireless network using nm-applet, NM does not seem to
> disable the device (by means of /sys/class/net/wlan0/device/rf_kill).
> This is true both of the 0.6.6 version that Ubuntu Hardy ships and a
> quite recent svn build that I've compiled myself. The svn build is on
> a machine with the ipw2200 driver and the 0.6.6 version is on a
> machine which uses the iwlwifi driver on 4965 chipset.
>
> Is this a bug that I should report, or is it a not yet implemented
> feature?

NetworkManager marks the device as down, ie !IFF_UP.  Devices that are
marked down should enter the lowest possible power saving mode,
unfortunately that's not consistent behavior across drivers.  That's how
power-save works for wired devices and should work for wireless ones.
However, it turns out that there are some parts (iwlwifi for example)
that cannot detect rfkill unless firmware is loaded, which they do only
when the device is up.  To fix that, NM is going to switch to simply
turning off the TX power of the device.

Unfortunately, we need better support from HAL here, since HAL is not
quite verbose enough to tell NM that the radio is hardware-rfkilled or
software-rfkilled, which means NM can't know whether or not you can
re-enable the radio via software or whether the user actually flipped a
switch.

Once that is fixed, I'll flip NM over to turning off TX power and then
it will probably Just Work for you.

Thank you very much for the thorough reply. I'd like to add one more comment. I have since posting in this thread updated the iwl4965 driver and switched over to NM from SVN on both my machines. The updated iwl4965 driver can now control the little led I have on my laptop indicating whether wifi is active or not (I have confirmed that indication to be accurate by using powertop). This led turns on and off when I use the HW switch. Surprisingly, I noticed that it's also turned off when I deactivate the network altogther using the nm-applet. However, only deactivating wireless keeps the led on. I'm not sure what exactly this means in relation to the above. It's just an observation that surprised me. Surely, even though there are the obstacles you've stated, nm-applet could tell NM to put the wifi in low power mode when wireless is deactivated?

I might have completely misunderstood something though, in which case I'm sorry for babbling on :-)

Regards,
K.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]