Re: Prevent auto scan in wireless devices



On Wed, 2009-01-14 at 17:35 -0300, Aloisio Almeida wrote:
> On Wed, Jan 14, 2009 at 4:49 PM, Dan Williams <dcbw redhat com> wrote:
> > On Wed, 2009-01-14 at 16:29 -0300, Aloisio Almeida wrote:
> >> Well, you're right about stop background scans, it seems to change the
> >> way that NM was structured to work.
> >>
> >> But lets suppose the use case where you have a embedded system (or a
> >> notebook/netbook) and you're running on battery and you don't want use
> >> wireless that time and you don't have a rf switch button. You will
> >> loose power keeping your wireless card on scanning at each 20 seconds,
> >> using passive scan or not.
> >
> > There are always mechanisms to turn off the card if you don't have a
> > hardware switch; the largest hammer is to 'rmmod' the driver module.
> > The second largest hammer is to power the card down with 'iwconfig wlanX
> > txpower off' or something like that.  The third is to mark the
> > connection as not managed by NetworkManager during the time that you
> > want the wifi to be "off".
> 
> The main question is why lead to user the responsibility to save power
> if (in my point of view) nm can do it automatically. The "power

It shouldn't be up to the user, the system should be optimized for
maximum power saving already.  This means that if the wifi isn't being
actively used, the system shouldn't be powering the card on.  That
should be transparent to the user and requires no changes to
NetworkManager.

> saving" mode could be activated by user, by default or by an event
> came from power system management and it can prevent the system to
> waste power. Think as a embedded system user, you want a device that
> its default behavior is always save power.

Again, is scanning while associated *actually* wasting power?  If the
wifi chipset doesn't suck, it most likely isn't saving any power to not
scan.  If the user isn't using wifi, then the chip doesn't need to be
turned on, and NetworkManager will ignore it and not scan.

> > None of these require a hardware rfkill switch.  They all accomplish
> > what (I understand) you want:  no scanning when the user isn't connected
> > to an AP.
> >
> 
> As I said before, "no scanning" was the first idea to save power, it's
> not the main goal. I want a device that has a huge battery life. Turn
> on features only when asked by user is a good way. NM ( the wireless
> manager) can do this turning the wireless card off after some time
> disconnected and turn it on when user ask for it by user.

Yep.  You can certainly do this with a "turn wifi on" / "turn wifi off"
sort of thing in the UI, which most embedded devices have anyway.  There
are other ways to achieve the same functionality without having that
sort of user choice either.

But at the end of the day, if you want to save power, you'll want to
turn off the wifi chipset when the user isn't going to use it.

> I prefer to loose 2 or 3 seconds to get the first list of available
> APs than loose battery life during the X minutes (or hours) scanning
> and keeping the wireless card on. In desktops it doesn't matter, in
> notebooks it maybe doesn't affect so much, but in a embedded system i
> already noticed that it matters...

Again, does it *really* save power to not scan when the wifi is already
active?

Dan




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