Re: Power management in NM

On Thu, 2015-03-12 at 14:27 +0200, Andrey Batyiev wrote:

I'm trying to figure out power management policies in NM. My app sometimes need 
to connect to Wi-Fi network even if user powered down Wi-Fi card (to save 
battery charge). Main problem here is an airplane/aircraft/flight mode, when 
user expects Wi-Fi to be offline at all times.

My question is: am I correct, there is no way to distinguish between situation 
"Wi-Fi is powered down for power savings" and situation "Wi-Fi is powered down 
because of airplane regulations"? As far as I am understand right now, NM have 
only enable/disable switch for each device type, and there is no global 
"airplane mode" switch, right? What is your opinion on implementing such 

From a kernel and userspace perspective, these are both the same thing.
The mechanism to do this for both is setting airplane mode, because only
with airplane mode does the device actually power down and save battery.

There are two ways the user can set airplane mode.  First is through a
hardware switch on the laptop which cannot be reversed programmatically.
The second is through a 'soft block' which *can* be reversed
programmatically, which is typically what UI elements will do when you
turn on airplane mode from the GUI or CLI.

Unfortunately there's no good way to determine intent from either of
these, and worse, some laptops don't have a hardware button but rely
entirely on the software mechanisms to set airplane mode.

My only thought is that if wifi is only soft-blocked, then perhaps the
application could ask the user whether it should be allowed to connect
or not, and if the user says yes then it can turn off the softblock and
attempt to connect.  Maybe that would work?


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