2016-01-03 10:17:08

by Emmanuel Grumbach

[permalink] [raw]
Subject: power save settings for WiFi

Hi Dan,

I wanted to debug something with power save control and saw that NM
disables power save by default. This was a complete surprise for me.
This probably is because Ubuntu upgraded my NM version to 1.0.4.
I tried to enabled power save with:

nmcli c modify <MYSSID> 802-11-wireless.powersave 1

That command returns 0, but power save is still disabled. Note that
the decision to disable power save by default is a bit surprising.
I understand that some device may not behave well with power save
enabled, but then, I'd expect those (bad) devices to disable power
save in the driver level.

Any advice on how can I re-allow power save by default since the
command above didn't help?

thanks.

Emmanuel Grumbach
[email protected]


2016-01-04 16:14:59

by Dan Williams

[permalink] [raw]
Subject: Re: power save settings for WiFi

On Sun, 2016-01-03 at 12:17 +0200, Emmanuel Grumbach wrote:
> Hi Dan,
>
> I wanted to debug something with power save control and saw that NM
> disables power save by default. This was a complete surprise for me.
> This probably is because Ubuntu upgraded my NM version to 1.0.4.

Note that upstream NM 1.0.x does not support powersave, that was
apparently backported from NM 1.2.x by Ubuntu (?). So anything I'm
talking about here applies to NM 1.2...

> I tried to enabled power save with:
>
> nmcli c modify <MYSSID> 802-11-wireless.powersave 1
>
> That command returns 0, but power save is still disabled. Note that

This simply modifies the saved configuration, it doesn't modify the
runtime value. To change that, the connection must be bounced.
Upcoming NM versions will support live changes by reflecting what you
do with nmcli to the runtime state of the device (or IP
addresses/routes/etc). But not in 1.2 and lower.

So 'nmcli con up <MYSSID>' *should* enable powersave on the device.

> the decision to disable power save by default is a bit surprising.
> I understand that some device may not behave well with power save
> enabled, but then, I'd expect those (bad) devices to disable power
> save in the driver level.

When adding new features to NM (like powersave) we attempt to not
horribly break existing use-cases. Which, for users of devices where
powersave doesn't work very well, would mean breaking their connection
by enabling it by default. However, NM could have handled this better
by leaving the driver-default value enabled unless the user explicitly
sets the 'powersave' property. Which it should really do...

I've filed https://bugzilla.gnome.org/show_bug.cgi?id=760125 for that.

Dan