So NM 1.1.93-0ubuntu1 includes the patch default_powersave_on.patch,
which is pretty simple, it just modifies the NMSettingWireless code to
default powersave to 1:
===================================================================
--- a/libnm-util/nm-setting-wireless.c
+++ b/libnm-util/nm-setting-wireless.c
@@ -675,7 +675,7 @@ nm_setting_wireless_get_hidden (NMSettin
guint32
nm_setting_wireless_get_powersave (NMSettingWireless *setting)
{
- g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), 0);
+ g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), 1);
return NM_SETTING_WIRELESS_GET_PRIVATE (setting)->powersave;
}
@@ -885,6 +885,9 @@ verify (NMSetting *setting, GSList *all_
static void
nm_setting_wireless_init (NMSettingWireless *setting)
{
+ NMSettingWirelessPrivate *priv = NM_SETTING_WIRELESS_GET_PRIVATE
(setting);
+
+ priv->powersave = 1;
}
static void
@@ -1283,7 +1286,7 @@ nm_setting_wireless_class_init (NMSettin
g_object_class_install_property
(object_class, PROP_POWERSAVE,
g_param_spec_uint (NM_SETTING_WIRELESS_POWERSAVE, "", "",
- 0, G_MAXUINT32, 0,
+ 0, G_MAXUINT32, 1,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
}
...unfortunately, the NM1.2 treats powersave=1 as IGNORE:
/**
* NMSettingWirelessPowersave:
* @NM_SETTING_WIRELESS_POWERSAVE_DEFAULT: use the default value
* @NM_SETTING_WIRELESS_POWERSAVE_IGNORE: don't touch existing setting
* @NM_SETTING_WIRELESS_POWERSAVE_DISABLE: disable powersave
* @NM_SETTING_WIRELESS_POWERSAVE_ENABLE: enable powersave
*
* These flags indicate whether wireless powersave must be enabled.
**/
typedef enum {
NM_SETTING_WIRELESS_POWERSAVE_DEFAULT = 0,
NM_SETTING_WIRELESS_POWERSAVE_IGNORE = 1,
NM_SETTING_WIRELESS_POWERSAVE_DISABLE = 2,
NM_SETTING_WIRELESS_POWERSAVE_ENABLE = 3,
_NM_SETTING_WIRELESS_POWERSAVE_NUM, /*< skip >*/
NM_SETTING_WIRELESS_POWERSAVE_LAST =
_NM_SETTING_WIRELESS_POWERSAVE_NUM - 1, /*< skip >*/
} NMSettingWirelessPowersave;
...and the code in NMDeviceWiFi will only enable powersave if the value
returned from NMSettingWireless is 3:
if (powersave == NM_SETTING_WIRELESS_POWERSAVE_IGNORE)
return;
nm_platform_wifi_set_powersave (NM_PLATFORM_GET,
nm_device_get_ifindex (device),
powersave ==
NM_SETTING_WIRELESS_POWERSAVE_ENABLE);
** Changed in: network-manager (Ubuntu)
Importance: Undecided => High
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1557026
Title:
Network Manager sets powersave off by default in xenial
Status in network-manager package in Ubuntu:
Confirmed
Bug description:
Nwetwork Manager sets Power Management:off in iwconfig by default.
It can be changed per connection by adding powersave=1.
In 14.04 powersave was set on by default and could be disabled per connection.
That seemed to be reasonable.
If the default has been changed for some reason, it is better to make a NM
global setting.
It is not handy to change every connection manually, and most users will not
be able to do it.
After upgrade to 16.04 power consumption will increase.
It is also funny that pm-tools set powersave on, but NM reverts this
setting.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: network-manager 1.0.4-0ubuntu10
ProcVersionSignature: Ubuntu 4.4.0-12.28-generic 4.4.4
Uname: Linux 4.4.0-12-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Mar 14 18:41:38 2016
IfupdownConfig:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
InstallationDate: Installed on 2016-02-29 (13 days ago)
InstallationMedia: Ubuntu 14.04.4 LTS "Trusty Tahr" - Release amd64
(20160217.1)
IpRoute:
default via 192.168.1.1 dev wlan0 proto static metric 600
169.254.0.0/16 dev wlan0 scope link metric 1000
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.125
metric 600
NetworkManager.state:
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true
SourcePackage: network-manager
UpgradeStatus: Upgraded to xenial on 2016-03-12 (1 days ago)
modified.conffile..etc.NetworkManager.NetworkManager.conf: [modified]
mtime.conffile..etc.NetworkManager.NetworkManager.conf:
2016-03-13T01:40:30.748775
nmcli-dev:
DEVICE TYPE STATE DBUS-PATH
CONNECTION CON-UUID CON-PATH
wlan0 wifi connected /org/freedesktop/NetworkManager/Devices/1
Voxnet eafa9e18-fa85-4d9a-a705-6a3e97a45fbc
/org/freedesktop/NetworkManager/ActiveConnection/1
eth0 ethernet unavailable /org/freedesktop/NetworkManager/Devices/2 --
-- --
lo loopback unmanaged /org/freedesktop/NetworkManager/Devices/0 --
-- --
nmcli-nm: Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code
2: Error: Object 'nm' is unknown, try 'nmcli help'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1557026/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp