Re: Power management in NM
On Thu, 2015-03-12 at 14:27 +0200, Andrey Batyiev wrote: Hello 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 switch? 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? Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Power management in NM
Hello 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 switch? Thanks, Andrey ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Can't change Power Management using NM
I tried using boot.local to run the command (following several recommendations on forums). Has (also?) worked out fine. Will try your way also. Thanks On Fri, Nov 16, 2012 at 2:24 PM, Dan Williams d...@redhat.com wrote: On Mon, 2012-11-12 at 22:11 -0300, Felipe Lema wrote: I am using ath9k. I haven't found any documentation on module parameters for loading, so any suggestions are appreciated. iw dev wlan0 set power_save [on|off] as long as you have 'iw' of course, which is essentially the replacement for iwconfig. Dan Thanks for clearing this up On Mon, Nov 12, 2012 at 2:37 PM, Dan Williams d...@redhat.com wrote: On Mon, 2012-11-12 at 11:26 -0300, Felipe Lema wrote: Hi, everybody Using opensuse 12.2, I can't get my laptop to boot to xfce desktop with Power Management off on device wlan0 (wireless). This is typically an driver bug and should probably be fixed there. What wifi hardware do you have? For the time being though, you could set power management independently of NetworkManager via rc.local or something like that. 802.11 PM should ususally be invisible to the user because the computer should be automatically adjusting it as necessary to provide the best power control and performance. That's where we want to be. Dan # /usr/sbin/iwconfig | grep -i power man lo no wireless extensions. eth0 no wireless extensions. Power Management:off However, I *can* change power management using iwconfig (grep'ing afterwards confirms that I disabled power management). # iwconfig wlan0 power off ; echo return code: $? return code: 0 I've tried changing WIRELESS_POWER to 'none' and 'no' in /etc/sysconfig/network/ifcfg-wlan0 but I've had no luck with it What can/should I do? Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Can't change Power Management using NM
On Mon, 2012-11-12 at 22:11 -0300, Felipe Lema wrote: I am using ath9k. I haven't found any documentation on module parameters for loading, so any suggestions are appreciated. iw dev wlan0 set power_save [on|off] as long as you have 'iw' of course, which is essentially the replacement for iwconfig. Dan Thanks for clearing this up On Mon, Nov 12, 2012 at 2:37 PM, Dan Williams d...@redhat.com wrote: On Mon, 2012-11-12 at 11:26 -0300, Felipe Lema wrote: Hi, everybody Using opensuse 12.2, I can't get my laptop to boot to xfce desktop with Power Management off on device wlan0 (wireless). This is typically an driver bug and should probably be fixed there. What wifi hardware do you have? For the time being though, you could set power management independently of NetworkManager via rc.local or something like that. 802.11 PM should ususally be invisible to the user because the computer should be automatically adjusting it as necessary to provide the best power control and performance. That's where we want to be. Dan # /usr/sbin/iwconfig | grep -i power man lo no wireless extensions. eth0 no wireless extensions. Power Management:off However, I *can* change power management using iwconfig (grep'ing afterwards confirms that I disabled power management). # iwconfig wlan0 power off ; echo return code: $? return code: 0 I've tried changing WIRELESS_POWER to 'none' and 'no' in /etc/sysconfig/network/ifcfg-wlan0 but I've had no luck with it What can/should I do? Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Can't change Power Management using NM
Hi, everybody Using opensuse 12.2, I can't get my laptop to boot to xfce desktop with Power Management off on device wlan0 (wireless). # /usr/sbin/iwconfig | grep -i power man lo no wireless extensions. eth0 no wireless extensions. Power Management:off However, I *can* change power management using iwconfig (grep'ing afterwards confirms that I disabled power management). # iwconfig wlan0 power off ; echo return code: $? return code: 0 I've tried changing WIRELESS_POWER to 'none' and 'no' in /etc/sysconfig/network/ifcfg-wlan0 but I've had no luck with it What can/should I do? Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Can't change power management using NM
Hi, everybody Using opensuse 12.2, I can't get my laptop to boot to xfce desktop with Power Management off on device wlan0 (wireless). $ /usr/sbin/iwconfig | grep -i power man lo no wireless extensions. eth0 no wireless extensions. Power Management:off However, I can change power management using iwconfig (grep'ing afterwards confirms that I disabled power management). # iwconfig wlan0 power off ; echo return code: $? return code: 0 I've tried changing WIRELESS_POWER to 'none' and 'no' in /etc/sysconfig/network/ifcfg-wlan0 but I've had no luck with it What can/should I do? Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Can't change Power Management using NM
On Mon, 2012-11-12 at 11:26 -0300, Felipe Lema wrote: Hi, everybody Using opensuse 12.2, I can't get my laptop to boot to xfce desktop with Power Management off on device wlan0 (wireless). This is typically an driver bug and should probably be fixed there. What wifi hardware do you have? For the time being though, you could set power management independently of NetworkManager via rc.local or something like that. 802.11 PM should ususally be invisible to the user because the computer should be automatically adjusting it as necessary to provide the best power control and performance. That's where we want to be. Dan # /usr/sbin/iwconfig | grep -i power man lo no wireless extensions. eth0 no wireless extensions. Power Management:off However, I *can* change power management using iwconfig (grep'ing afterwards confirms that I disabled power management). # iwconfig wlan0 power off ; echo return code: $? return code: 0 I've tried changing WIRELESS_POWER to 'none' and 'no' in /etc/sysconfig/network/ifcfg-wlan0 but I've had no luck with it What can/should I do? Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Can't change Power Management using NM
I am using ath9k. I haven't found any documentation on module parameters for loading, so any suggestions are appreciated. Thanks for clearing this up On Mon, Nov 12, 2012 at 2:37 PM, Dan Williams d...@redhat.com wrote: On Mon, 2012-11-12 at 11:26 -0300, Felipe Lema wrote: Hi, everybody Using opensuse 12.2, I can't get my laptop to boot to xfce desktop with Power Management off on device wlan0 (wireless). This is typically an driver bug and should probably be fixed there. What wifi hardware do you have? For the time being though, you could set power management independently of NetworkManager via rc.local or something like that. 802.11 PM should ususally be invisible to the user because the computer should be automatically adjusting it as necessary to provide the best power control and performance. That's where we want to be. Dan # /usr/sbin/iwconfig | grep -i power man lo no wireless extensions. eth0 no wireless extensions. Power Management:off However, I *can* change power management using iwconfig (grep'ing afterwards confirms that I disabled power management). # iwconfig wlan0 power off ; echo return code: $? return code: 0 I've tried changing WIRELESS_POWER to 'none' and 'no' in /etc/sysconfig/network/ifcfg-wlan0 but I've had no luck with it What can/should I do? Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list